Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Soundfont generation #258

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Improve Soundfont generation #258

wants to merge 10 commits into from

Conversation

gleitz
Copy link

@gleitz gleitz commented Dec 22, 2020

This PR performs two main goals:

  1. Parallelize Soundfont generation. Generally reduces the time to create a Soundfont by a factor of #cores.
  2. Fix a long standing compatibility issue between MIDI.js naming schemes and MIDI Association / midilib naming 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" ->

'Brass': ['57 Trumpet', '58 Trombone', '59 Tuba', '60 Muted Trumpet', '61 French Horn', '62 Brass Section', '63 Synth Brass 1', '64 Synth Brass 2'],

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.

Small fix to the sox command
It was found that midilib uses names that are incompatible with MIDI.js

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", etc. here, we use the
MIDI.js definitions because that is how most users will interact with
the generated soundfonts.
MIDI.js uses a `clean` function to turn human readable names into
slugs for instrument names. This PR makes the builder's names match
that of MIDI.js

https://github.com/mudcube/MIDI.js/blob/a8a84257afa70721ae462448048a87301fc1554a/js/midi/gm.js#L11
Update to the FatBoy soundfont, which is free (https://fatboy.site/)
@mscuthbert
Copy link
Contributor

As far as I know the project has been abandoned. I have a fork at https://github.com/mscuthbert/midicube which is taking PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants