A pure-JavaScript MIDI generator