I’m working on a web app for creating sheet music, and I’d like to have some simple playback functionality in there. My solution would be to only use a piano sound, since it’s a simple sound that sounds natural no matter what length you give it. A piano has no “stopping” sound, it just stops sounding. Thus, ideal for my purposes.
So the idea would be to create a sound sample of every piano key over the duration of a few seconds, from the striking of a key until the moment all the sound is gone. These will be samples of somewhere between 10-30 seconds per key, which means 88 sound files of about 20 seconds.
And here is my “problem” (haven’t actually tried it yet), this is a lot of data, expecially when building for html5 target, since SoundJS needs at least three different file types for every sound, giving us a total of 88 * 3 = 264 sounds. And these are quite big files for their content, or at least the .wav files are. It might also be a lot to load from a web server, especially on slower internet connections.
So before I start creating these 264 sounds, I was hoping to see if there are some smart thinkers/guys with experience in SoundJS out here who have some tips or ideas to reduce my loading times and improve the performance of this app.
Does SoundJS load all the files no matter the browser? Or does it only load the files specifically meant for the browser?
Would it help to put all the sounds into one bigger file, and play from specific times (like using a sprite sheet), rather than from specific files? Or is it heavier on the machine to “scroll” to a specific part of a large sound file?
Will the browser actually handle realtime playing of all these sounds?