Replies: 1 comment 1 reply
-
You can add a listener for a specific control change message number (documentation here) : const mySynth = WebMidi.inputs[0];
mySynth.channels[1].addListener("controlchange-controller123", e => {
document.body.innerHTML += e.subtype + "<br>";
}); Note that, when you listen to the generic "controlchange" event, the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I am very new to webMidi but have been trying to work out how to Recieve midi CC messages on channels 1-16 ect.
I have been able to addListener for pitchbend and also recieve CC messages
the addListner.midimessage returns 'channelcontrol' regardless if it's CC 1, 2 or any other so for example
mySynth.channels[1].addListener("midimessage", e => {
document.body.innerHTML+= ${e.message.type}
;
});
above returns 'channelcontrol' regardless of which CC is being sent to it.
Question is there a way to get it to detect individual CCs ? It sees 'pitchbend' are there any others?
const mySynth = WebMidi.inputs[0];
mySynth.channels[1].addListener("pitchbend", e => {
document.body.innerHTML+=
${"pitchbend" + e.value} <br>
;});
I found ways to control individual CC's via output
WebMidi.outputs[0].sendControlChange("volumecoarse", 54);
is there some way to track those individually via input? something like
WebMidi.inputs[0].recieveControlChange(volumecoarse.value);
or address them via CC number? thanks
-Jon
Beta Was this translation helpful? Give feedback.
All reactions