Discuss Scratch

RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

RokCoder's 100% Customisable Music Player

Import your own choice of music

Remix and let people vote on your songs

All music is played solely using the note blocks





About the project

This project is a remake of my original Music Player but uses my MIDI Toolkit. That means it is simplicity itself to create your own playlists! Tap ‘=’ to enter the toolkit, remove the existing songs and import your own! Remix the project and let people vote on your choice of songs!


Adding your own music

To sum this up -
  1. Using the editor, change the costume for the locked sprite to the unlocked costume. You can go back to full screen after this step
  2. Download the MIDI file that you want to use
  3. Drag it into this online converter to convert it to hex and copy to the clipboard
  4. Paste it into the Scratch project from the import option of the Toolkit menu
A more detailed guide to the three steps -
  1. You need to change the costume of the locked sprite. This is because the project uses cloud variables for storing votes and ratings. Changing the costume makes the project know that you've made a remix and this prevents the cloud data from being corrupted if you add or remove songs.

  2. There are many free sources for MIDI files on the internet including MidiWorld, FreeMidi, mFiles, VGMusic, MuseScore and BitMidi.

  3. Convert your MIDI file to he so that it can be imported into the project. I've found an online tool that will do this without the need to download or install anything to your computer. Simply go to the convertor, drag the .mid file onto the drop file here button and click the copy output to clipboard button.

  4. Run the Scratch project from the editor (i.e. you need to click See Inside). Press = to enter the menu, press 1 to select the import option, paste the hex into the box and press enter.
That's all there is to it! Your file will now have been added to the playlist. You can add and/or remove as many songs as you want by using the Toolkit Menu.


Making the voting work for your own songs

You need to remix the project in order to save it. Unfortunately Scratch has a slight issue with remixing cloud variables. The way to fix this is to manually rename all eight cloud variables in the project. You only need to do this once and just adding a number or letter to the end of each cloud variable will suffice.


Any other questions, issues, problems or feedback

Please feel free to add comments to this thread. It's always nice to know that people are using a project (and that it was actually worth my while typing out all of this information!)

Last edited by RokCoder (May 14, 2020 17:47:37)

Kismat12
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

Can you make it so that there is a textbook for me to paste the code? So that I do not have to go into the editor and do it? Then it would be way faster! It's laggy for me and win't go in the box. And I am inside the editor yes.
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

Kismat12 wrote:

Can you make it so that there is a textbook for me to paste the code? So that I do not have to go into the editor and do it? Then it would be way faster! It's laggy for me and win't go in the box. And I am inside the editor yes.

It had to be done from the editor before because you had to import data but you're right that, now you can paste the hex into the project, there's no longer the need for that. I've changed it into an ask box so it's much easier to paste into (including from outside of the editor). Hopefully this makes it easier. Please let me know how it goes

Last edited by RokCoder (Feb. 23, 2019 02:47:23)

NathanBros
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

Interesting work RokCoder!
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

NathanBros wrote:

Interesting work RokCoder!

Thanks If you have a go at adding some music, please let me know how it goes. I'm trying to make it as painless and easy as possible but need to get people's feedback in order to do that well.
Kismat12
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

It is not really a link, it's a MIDI file stored in my computer. I used the Hex thingy to convert it into a text or something, then I tried pasting it into the project, but it said that there was a error and my file wasn't right.
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

Kismat12 wrote:

It is not really a link, it's a MIDI file stored in my computer. I used the Hex thingy to convert it into a text or something, then I tried pasting it into the project, but it said that there was a error and my file wasn't right.

Ah. It's possible that the file actually isn't a type 1 MIDI file then. Most files are type 1 but a few are type 0 and a tiny amount are type 2. I can't tell without seeing it. What tool are you using to create it? I would suggest trying the process with a file that is definitely type 1 - http://download.midimi.org/midi-44896-download-proclaimers-500-miles.html for example. If that works then you know you're doing it correctly.
Kismat12
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

RokCoder wrote:

Kismat12 wrote:

It is not really a link, it's a MIDI file stored in my computer. I used the Hex thingy to convert it into a text or something, then I tried pasting it into the project, but it said that there was a error and my file wasn't right.

Ah. It's possible that the file actually isn't a type 1 MIDI file then. Most files are type 1 but a few are type 0 and a tiny amount are type 2. I can't tell without seeing it. What tool are you using to create it? I would suggest trying the process with a file that is definitely type 1 - http://download.midimi.org/midi-44896-download-proclaimers-500-miles.html for example. If that works then you know you're doing it correctly.
So is there any type of converter that changes a .mp3 file into a type 1 MIDI file?
Kismat12
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

Kismat12 wrote:

RokCoder wrote:

Kismat12 wrote:

It is not really a link, it's a MIDI file stored in my computer. I used the Hex thingy to convert it into a text or something, then I tried pasting it into the project, but it said that there was a error and my file wasn't right.

Ah. It's possible that the file actually isn't a type 1 MIDI file then. Most files are type 1 but a few are type 0 and a tiny amount are type 2. I can't tell without seeing it. What tool are you using to create it? I would suggest trying the process with a file that is definitely type 1 - http://download.midimi.org/midi-44896-download-proclaimers-500-miles.html for example. If that works then you know you're doing it correctly.
So is there any type of converter that changes a .mp3 file into a type 1 MIDI file?
Because what I tried doing is turning a youtube video into a .mp3 file then into a MIDI file using a other converter then used the hex thing to turn it into the numbers. What did I do wrong?
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

Kismat12 wrote:

So is there any type of converter that changes a .mp3 file into a type 1 MIDI file?
I haven't found any converters that work well so far. I suspect the good ones are ones that aren't free (though I'd be happy to be proved wrong). As I suggested before, you should try this with a MIDI file that we know works, such as the one I mentioned previously. That way you'd see how straightforward it really is. I really wouldn't attempt to convert MP3 files to MIDI. You should be able to find free MIDI of most songs without too much difficulty.
Kismat12
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

RokCoder wrote:

Kismat12 wrote:

So is there any type of converter that changes a .mp3 file into a type 1 MIDI file?
I haven't found any converters that work well so far. I suspect the good ones are ones that aren't free (though I'd be happy to be proved wrong). As I suggested before, you should try this with a MIDI file that we know works, such as the one I mentioned previously. That way you'd see how straightforward it really is. I really wouldn't attempt to convert MP3 files to MIDI. You should be able to find free MIDI of most songs without too much difficulty.
I will try it’s just the you can get viruses or innaproppriate pictures on some websites so it’s easier to stick to one thing, but I will try.
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

Kismat12 wrote:

I will try it’s just the you can get viruses or innaproppriate pictures on some websites so it’s easier to stick to one thing, but I will try.

You're right and it's good that you're being careful. The suggested MIDI sites that I linked to at the top are very mainstream so you shouldn't have any problems with those. I've also made it so you don't need to download a conversion tool any more as I know a lot of people wouldn't want to install extra software for the reasons you've mentioned.
Kismat12
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

I think one of the websites you suggested have inappropriate ads.
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

Kismat12 wrote:

I think one of the websites you suggested have inappropriate ads.

Thanks for letting me know. I use an ad-blocker so wasn't aware but I've checked and removed the site I think you're talking about from the list now.
Kismat12
Scratcher
100+ posts

Customisable Music Player (Add your own music!)

RokCoder wrote:

Kismat12 wrote:

I think one of the websites you suggested have inappropriate ads.

Thanks for letting me know. I use an ad-blocker so wasn't aware but I've checked and removed the site I think you're talking about from the list now.
Thanks!
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

If anyone knows of any other MIDI sites that are suitable then please let me know and I'll add them to the list.
dude341
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

Kismat12 wrote:

Kismat12 wrote:

RokCoder wrote:

Kismat12 wrote:

It is not really a link, it's a MIDI file stored in my computer. I used the Hex thingy to convert it into a text or something, then I tried pasting it into the project, but it said that there was a error and my file wasn't right.

Ah. It's possible that the file actually isn't a type 1 MIDI file then. Most files are type 1 but a few are type 0 and a tiny amount are type 2. I can't tell without seeing it. What tool are you using to create it? I would suggest trying the process with a file that is definitely type 1 - http://download.midimi.org/midi-44896-download-proclaimers-500-miles.html for example. If that works then you know you're doing it correctly.
So is there any type of converter that changes a .mp3 file into a type 1 MIDI file?
Because what I tried doing is turning a youtube video into a .mp3 file then into a MIDI file using a other converter then used the hex thing to turn it into the numbers. What did I do wrong?
MIDI and MP3 are completely different formats.
MP3 is streamed audio while MIDI is sequenced music. You use MIDI when creating songs in programs like FL Studio and Anvil Studio.
dude341
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

RokCoder wrote:

If anyone knows of any other MIDI sites that are suitable then please let me know and I'll add them to the list.
https://vgmusic.com/ is a good MIDI resource which contains MIDI versions of classic video game tunes. It also appears there are no ads when I turned off my adblock. I use this site all the time.
RokCoder
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

dude341 wrote:

RokCoder wrote:

If anyone knows of any other MIDI sites that are suitable then please let me know and I'll add them to the list.
https://vgmusic.com/ is a good MIDI resource which contains MIDI versions of classic video game tunes. It also appears there are no ads when I turned off my adblock. I use this site all the time.
Nice one - thanks. I've added it to the list.
dude341
Scratcher
1000+ posts

Customisable Music Player (Add your own music!)

There isn't actually really a problem with the voting, what I meant was is it possible to make it so other people other than the owner can see the votes people have made? E.G if I made a remix with my own songs, would I be able to modify the code so other people who aren't me could also see the votes? So they know if other people like the song.

Powered by DjangoBB