MIDIAccess - abudaan/JazzMIDIBridge GitHub Wiki
enumerateInputs()
Returns an array containing all MIDIInputDevices
enumerateOutputs()
Returns an array containing all MIDIOutputDevices
getInput(index)
Returns the input device with the specified index number
getOutput(index)
Returns the output device with the specified index number
createMIDIMessage(command,data1,data2,channel,timestamp)
Creates a new MIDI message. The last 2 arguments are optional.
//send the middle C at velocity 100 to the output
output.sendMIDIMessage(MIDIAccess.createMIDIMessage(JMB.NOTE_ON, 60, 100));
//send a message that presses the sustain pedal
output.sendMIDIMessage(MIDIAccess.createMIDIMessage(JMB.CONTROL_CHANGE, 64, 127));
//change the instrument on channel 12 to violin
output.sendMIDIMessage(MIDIAccess.createMIDIMessage(JMB.PROGRAM_CHANGE, 40, 0, 12));