Closed elmcapp closed 2 years ago
This is one of the main differences between v2 and v3. In v3, channels now have their own object (InputChannel or OutputChannel). Therefore, to retrieve the channel, you must first retrieve the channel object using the target
property of the event and from there you can get the channel number:
WebMidi.inputs[0].addListener("controlchange", e => {
console.log(e.target.number);
});
By the way, the channel number is also available in the new message
property of the event by using: e.message.channel
.
In older version we could get the the channel (e.channel) In current version I can not get the channel