MIDI.js
MIDI.js copied to clipboard
Improve Soundfont generation
This PR performs two main goals:
- Parallelize Soundfont generation. Generally reduces the time to create a Soundfont by a factor of #cores.
- Fix a long standing compatibility issue between MIDI.js naming schemes and MIDI Association /
midilibnaming schemes.
For example, midilib uses "SynthBrass 1" -> https://github.com/jimm/midilib/blob/6c8e481ae72cd9f00a38eb3700ddfca6b549f153/lib/midilib/consts.rb#L280
and the MIDI association uses "SynthBrass 1" -> https://www.midi.org/specifications-old/item/gm-level-1-sound-set
but the MIDI.js calls this "Synth Brass 1" -> https://github.com/mudcube/MIDI.js/blob/a8a84257afa70721ae462448048a87301fc1554a/js/midi/gm.js#L44
There are others like "Bag pipe" vs "Bagpipe" that cause issues with generation.
Now we use the MIDI.js definitions because that is how most users will interact with the generated soundfonts.
As far as I know the project has been abandoned. I have a fork at https://github.com/mscuthbert/midicube which is taking PRs.