So far I’ve been using MIDIIn.connect(inport: 0, device: 1);
to connect just to the MIDI Fighter as input device.
This way, my MIDIDef isn’t using the srcID keyword, it just looks at all incoming MIDI data, which is just coming from MIDI Fighter due to MIDIIn.connect(inport: 0, device: 1);
Now I want to listen to incoming MIDI from both IAC and MIDI Fighter, but want specific MIDIDefs to listen to either IAC or MIDIFighter. So I need to do MIDIIn.connectAll;
first, right?
Then I thought that the srcID keyword inside the MIDIDef would allow to tell a MIDIDef to listen either to the IAC or the MIDI Fighter. But regardless of srcID being 0 or 1, the MIDIDef does no longer react.
Please, what am I do wrong?
Furthermore, MIDIOut allows a .newByName message, which is more fool-proof than a device ID. Is there something like that for MIDIDefs?
Sorry for having so many questions, thanks much in advance!
Small note on switch: an else branch doesn’t need a dummy condition. If the number of items (arguments) is odd, not including the receiver, then the last function serves as an “else” – so { uid } may be omitted here.
Agreed that MIDI can be delicate. I once had to reboot my machine onstage because the stage crew had put the machine to sleep before my piece, and this killed the MIDI connection (but that was years ago…).