i'm making an object to do MIDI routing via class compliant USB MIDI interface (Miditech Midiface 8x8).
so far it's based on Technobear's MIDI Thru object and routes MIDI from any of 9 available physical MIDI In ports to any of 9 physical MIDI Out ports (Axo MIDI ports included, so 9, not 8). this was not difficult to do, and it works as expected.
now i want to add more functionality for routing messages from certain MIDI In ports.
i want it to route incoming MIDI messages to different MIDI Out ports depending of MIDI channel of incoming messages — for example, if incoming message has MIDI channel 1, it's routed to MIDI Out 1, but if it has MIDI Channel 4, it's routed to MIDI Out 4.
there are many examples of MIDI Out objects in the library that send messages to certain port and channel, so this part of job is more or less clear.
what is not clear is the receiving part.
could anyone point me to the examples of objects that listen to certain MIDI channel? or maybe someone has an example of MIDI script doing this kind of job?
disclaimer: i will borrow your code unless it's under some resrictive license
thanks in advance.
P.S. why i need this and care about this — because in 2019, physical MIDI ports still work at 31250 baud rate. so the less messages in every single port — the better.