I'm trying to write a script but I'm stuck.
I would like to detect 2 different controllers on the same script: a midi flute (USB plug) and a midi foot controller (plugged in Midi IN on my Focusrite), in order to have all the automation lanes on the same track and also, to avoid mapping every time.
I've taken the "Generic MIDI Keyboard.control.js" as base, I've modified the name and UUID and the number of midi port like that: host.defineMidiPorts(2,0)
Code: Select all
loadAPI(2); host.setShouldFailOnDeprecatedUse(true); host.defineController("Generic", "TEST Midi flute + Foot controller", "1.0", "6969FAD0-174B-11E9-B56E-0800200C9A66"); host.defineMidiPorts(2,0); host.addDeviceNameBasedDiscoveryPair(["MIDI Wind controller","Focusrite USB MIDI"],);
My problem is that the script doesn't take the input of both controllers. Only the second one.
In this case, only the foot controller plugged on the Focusrite will answer but not the Midi flute.
Do you have any idea to help me?
Thanks a lot, have a nice evening