poormidi is a very simple (and very poorful) web midi api wrapper!
meteor add tadfmac:poormidi
var midi = new poormidi();
midi.setHandler(onMIDIEvent);
function onMIDIEvent(e){
var message = e.data[0] & 0xf0;
if(message === 0x90){ // Note ON?
// anything!
}
}
// Note No.= 40, Velocity = 100
// poormidi will send midi message with channel 1 in default.
midi.sendNoteOn(40,100);
or
// MIDI ch.=1, Note No.= 40, Velocity = 100
midi.sendNoteOn(0, 40,100);
// Note No.= 40
// poormidi will send midi message with channel 1 in default.
midi.sendNoteOff(40);
// Control Number = 10, value = 100
// poormidi will send midi message with channel 1 in default.
midi.sendCtlChange(10,100);
Creative Commons Attribution 4.0 2015 by D.F.Mac.