4 ms·
Nice work! I am working to improve the MIDI playback quality on my MIDI archive website, BitMidi (https://bitmidi.com https://bitmidi.com), and I think this mig
by feross 8y ago
Nice work! I am working to improve the MIDI playback quality on my MIDI archive website, BitMidi (https://bitmidi.com https://bitmidi.com), and I think this might help.
The main difficulty with a web-based MIDI player like BitMidi is that it's not feasible to force the user to wait for a 300+ MB SoundFont to download before starting in-browser playback. The current format I use ("patch" files) has a separate file for each instrument, so I can lazily load only the necessary instruments needed to play a single song. You can see the approach I use here: https://github.com/feross/timidity https://github.com/feross/timidity
Anyway, excellent work on this SoundFont!
- shams93 8y agoIdeally for a web midi player if you are able to generate all the general midi sounds using fm synthesis like the old 80s midi boxes you could have a really tiny download size but it would still sound really cool.
- feross 8y agoYeah, I'd love to be able to do this, but I'm not sure my audio abilities are up to it. Do you know of any existing JS projects that do this? Or good pointers to any information about the basics of synthesis?
- Asooka 8y agoCan't browsers just play midi files? I know we could in the 90s and 00s.
- weinzierl 8y agoThey can't play MIDI files directly but modern browsers can communicate with MIDI controllers which is quite cool.
- classichasclass 8y agoNot directly. This was usually done through a plug-in such as QuickTime.
- pygy_ 8y ago... QuickTime which itself can't play midi anymore.
- feross 8y agoSadly, browsers cannot play MIDI natively. Old version of IE used to be able to via the <bgsound> HTML tag but that's removed in modern versions and no other browsers support it. For fun, I actually rebuilt <bgsound> for the modern web using a Web Component. https://github.com/feross/bg-sound https://github.com/feross/bg-sound
- lightedman 8y agoThe 8MB GS patch for the SBLive card is one of the most top-notch MIDI soundfonts I've heard at that size, and is freely available all over the place.
- voltagex_ 8y agoJust spitballing some ideas: * Create some kind of soundfont variant that uses 32kbit Opus for each instrument - yes, 32kbit is enough for good quality sound * Offer a paid tier that renders the midi through something for playback, and/or hit up some companies for hosting