Closed darkomenx closed 8 years ago
It is possible to retrieve information about the Input
by looking at the target
property of the event object. For example, to get the name of the device that triggered the event, you can use:
WebMidi
.getInputByName("_some-device_")
.addListener("noteon", "all", function (e) {
console.log(e.target.name);
});
Hi cotejp,
thank you for your sharing code about Web MIDI API. I don't see (or understand) if your library get the port information on the midi message event ? I would like to know where do the midi message from. If I have 4 midi port activate with eventListener for catch midi message I would like to know (and see in console.log) which device I have send a midi message not just the midi message.
Your libray do that ? If no do you think that is possible dealing with Web MIDI API ?
thank for your advice