I have to send a midi message with chrome to a plugin in Reaper:
[0xB1, 11, 10] ctrl 11 sur canal 1 value=10
The port corresponds at home to my MidiThrough port 0.
The plugin in Faust language is likely to receive and process this midi message.
Is my code correct? Why it does not work.
newPort = '6FF5590044F4859ED50C5167BCFE9700A1798E39AA55A628E86D39011FAECD5D';
navigator.requestMIDIAccess()
.then(function(access) {
midiSend(access, 20, 64, 64);
});
function midiSend(mAccess, x, y, z) {
//var midiMessage = [0xB1, 11, 10]; // note on middle C, full velocity
var midiMessage = [0xB1, 11, 10];
var output = mAccess.outputs.get(newPort);
console.log("Output port " + output.id + " Message " + midiMessage);
output.send(midiMessage);
}