I am trying to make a game on Scratch that works similarly to a radio but only for a specific genre. I uploaded a bunch of .mp3 files and started coding away whenever it struck me that it would take forever to load due to the number of songs Scratch had to process. Is there a way to optimize the loading time so it won't take a long time for the songs to render? Or better yet, only have the songs load when their ID is entered?
My goal is to make it a centralized place for the music, where pretty much if you load it online then go offline, as long as the tab isn't closed or reloaded you'll have access to the songs since they were pre-loaded.
If you want specifics, there are currently 20 song files uploaded to the project, all of which are about 2-4 minutes long.
Scratch projects load all of their files at once. Also, for safety reasons, you cannot load a file from an external source. Your best bet would be to compress the mp3 file or to reduce the audio quality of the music. You also might want to look into converting the mp3 files into an audio format that takes up less space.
However, keep in mind that you need to use public domain or other free music. If the song belongs to someone else, it's their property, and you don't have the legal right to use it on Scratch. If you do, that's pirating, and, while you're unlikely to get your Scratch project taken down, it's still something you shouldn't do.