Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mk-pmb/midijssf-from-sf2-pmb
Utilities for converting soundfonts from .sf2 to MIDI.js format.
https://github.com/mk-pmb/midijssf-from-sf2-pmb
Last synced: about 1 month ago
JSON representation
Utilities for converting soundfonts from .sf2 to MIDI.js format.
- Host: GitHub
- URL: https://github.com/mk-pmb/midijssf-from-sf2-pmb
- Owner: mk-pmb
- Created: 2017-08-21T02:31:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T14:45:15.000Z (about 7 years ago)
- Last Synced: 2024-10-02T11:17:32.141Z (2 months ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-javascript-audio - midijssf-from-sf2-pmb - utilities for converting soundfonts to MIDI.js format (Sound assets / SoundFonts)
README
midijssf-from-sf2-pmb
=====================Utilities for converting .sf2 wavetables to MIDI.js sound font format.
The space and lowercase "f" in "sound font(s)" is my attempt to help you
discern them from [the brand name](https://en.wikipedia.org/wiki/SoundFont).Usage
-----See the [`midijssf-timgm6mb-pmb`][tim6pmb] package for how to use this one.
Some hints:
* Beware that mono music usually won't survive the naive karaoke approach
(`sox`: `oops` effect). If you try to save bytes this way, really compare
the cost for each selected output format. Occasionally I have been surprised
by how small a difference it made.How it works
------------* For each selected instrument (including percussion) and each MIDI note:
* Make a MIDI file playing that note on that instrument.
* If things work out, this is done only once when the package is installed,
by running the `input-files.gen-all.js` script.
* Let `fluidsynth` convert the MIDI to FLAC audio, using the configured
`.sf2` wavetable.
* WAV or AU seemed more efficient but caused problems with the plumbing.
* Let `sox` convert the FLAC to WAV, and optionally trim trailing silence
in the process.
* Encode the samples to selected output formats (e.g. Vorbis, MP3)
and compile them into bundles
(MIDI.js sound font and/or Compact JSON WaveTable).Template variables
------------------Some options support variable. Their notation is `\v` (U+000B line tabulation)
followed by a single letter:* `d`: config.destDir
* `B`: config.sf2basename
* `b`: config.sf2basename.toLowerCase()
* `F`: current output audio format ID
* `f`: same but in lowercase
* `i`: current instrument ID (`001`…`128`, or `-10` for percussion)
* `I`: current instrument name (or config.chn10Name for percussion)
* `s`: same but in snake_caseKnown issues
------------* needs more/better tests and docs
[tim6pmb]: https://github.com/mk-pmb/midijssf-timgm6mb-pmb
License
-------ISC