{"repo":"grimmdude/MidiPlayerJS","free":true,"listed":false,"github":"https://github.com/grimmdude/MidiPlayerJS","clone":"git clone https://github.com/grimmdude/MidiPlayerJS.git","description":"♬ MIDI parser & player engine for browser or Node. As a parser converts MIDI events into JSON. Works well with single or multitrack MIDI files.","language":"JavaScript","stars":398,"topics":["midi","midi-player","audio","javascript-library","es6"],"license":"MIT","category":"media-processing","readme_excerpt":"&#9836; MidiPlayerJS MidiPlayerJS is a JavaScript library which reads standard MIDI files and emits JSON events in real time. This player does not generate any audio, but by attaching a handler to the event emitter you can trigger any code you like which could play audio, control visualizations, feed into a MIDI interface, etc. Demos Neopixel Music by robertvorthman @robertvorthman Autocomposer by RJ Salvador @rjsalvadorr Simple Browser Player by Garrett Grimm @grimmdude Orchestra by Daniel Alejandro Cast @lexcast Getting Started Using MidiPlayerJS is pretty simple. Create a new player by instantiating MidiPlayer.Player with an event handler to be called for every MIDI event. Then you can load and play a MIDI file. Player Events There are a handful of events on the Player object which you can subscribe to using the Player.on() method. Some events pass data as the first argument of the callback as described below: Note that because of a common practice called \"running status\" many MIDI files may use Note on events with 0 velocity in place of Note off events. See Also Need to generate MIDI files programmatically? Check out MidiWriterJS — a JavaScript library for creating expressive multi-track MIDI files. Together they form a complete MIDI toolkit: - MidiPlayerJS — parse and play MIDI files with real-time event callbacks - MidiWriterJS — generate MIDI files programmatically Full API Documentation http://grimmdude.com/MidiPlayerJS/docs/","default_branch":null,"files":null,"tree":[],"storefront":"/r/grimmdude","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/grimmdude/MidiPlayerJS/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}