Project

sf2_to_js

0.0
No release in over 3 years
Low commit activity in last 3 years
Output js files compatible with https://github.com/eagsalazar/midi.js
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

sf2_to_js

Gem and scripts to convert sf2 sound font files to js consumable by https://github.com/eagsalazar/midi.js

  • The sf2.js format is still subject to change!
  • required gems: midilib, fileutils, colorize, base64
  • required system (brew install): fluidsynth, oggenc

usage:

gem install sf2_to_js
require 'sf2_to_js'
sf = Sf2ToJs.new "./FluidR3_GM.sf2", [105], "~/soundfonts"
sf.to_js # -> ~/soundfonts/FluidR3_GM.Banjo.sf2.js

bin/sf2_to_js:

Generate .sf2.js files from the command line.

First:

gem install thor

Then:

sf2_to_js # -> lists commands
sf2_to_js help to_js # -> options for to_js
sf2_to_js to_js ~/Downloads/MagiCs5StringBanjo.sf2 -o ~/sf2/
# -> ~/sf2/FluidR3\_GM.Banjo.sf2.js