Is it possible to write a max4live patch to send midi to different ports? Here's what I'm trying to do:
Using a virtual midi cable like loopMIDI (Windows) or IAC (OS X), I've set up a large number of internal midi ports. I want to send all non-note midi like CC messages to all the ports. I want to send note-ons and note-offs to a single port. I want to allocate the ports on a first-come first-served basis. So the 1st note, say A4, goes to port #1, the 2nd note, say F4, goes to port #2, then A4 is released, freeing up port #1 for the next note, etc. The voice number outlet of the poly object seems perfect for this. I want to set up the patch so that it runs automatically without any user input. The exact number of ports used will vary depending on the particular musical piece. Ideally, one patch should handle it all, with a single user input specifying the number of ports. Alternatively, there could be a 4-port patch, a 5-port patch, etc. The maximum would probably be 12 ports, but could be higher.
Background: This is for microtonal purposes. The only way to retune most synths, including Live's instruments, is to run multiple instances of the synth and send each midi note to a different instance, using the pitch bend message to fine-tune the note. (Yes, I know, very kludgey. *Sigh*) Usually this is done by using midi channels, with the retuning software receiving a single-channel midi stream and sending out a multi-channel midi stream. Each synth instance then receives on a different channel. The retuning software I'm using is a midi-only VST plug-in. But Live puts all midi on channel 1, so that won't work. So I'm trying to use ports instead of channels. Each synth instance would then receive from a different port.
If there's some way a max4live patch can send midi to different channels, that would of course be preferable. But as the picture shows, it seems Live won't let that happen. The output meter in sampleTank shows midi on channel 1. BUT I am not very knowledgeable about Live or max/msp, perhaps there is a way?