midievents
Decode/encode MIDI events.
What it does
- Decode MIDI events
- Check MIDI events (using
strictMode
) - Calculate needed buffer to encode MIDI events
- Encode MIDI events
What it doesn't do
Usage
var anyBuffer;
var events = [];
var parser = new MIDIEvents.createParser(new DataView(anyBuffer), 0, false);
var event = parser.next();
do {
events.push(event);
event = parser.next();
} while(event);
if(anyBuffer.length >= MIDIEvents.getRequiredBufferLength(events)) {
console.log('ok');
}
var destination = new Uint8Array(anyBuffer);
MIDIEvents.writeToTrack(events, destination);
## Contributing / Testing
Install them and run the following command :
npm install --dev
su npm install grunt-cli -g
grunt test
## Contributing
- Feel free to PR
- If you find MIDI events the library can't read, create a test an do a pull
request. I'll work on it asap.
- Run
npm run
to get a list of useful development commands.
License
MIT