I'm building a particular kind of synth I'd like to implement on max4live at the end.
I want to use the midiin information to feed a few oscillators (for a lack of a better term - or subpatches). These oscillators (let's say from a number of 4 to 8) are similar in structure but have different operating parameters so they are different one from each other.
Let's say we have 4 of these and max notes being played are just 4. They for simplicity numbered from 1 to 4.
In case of no midi playing they are all free. We the first noteon came in it must be routed to lowest oscillator available (1).
Let's say the first note is still one, I press another key on a controller or another midi noteon command is being received now the info must be routed to activate oscillator number 2.
For simplicity now let's assume the noteoff command will stop the mute the activated oscillator and free it for next usage.
I know there's a poly command in max but that seems to apply to instances of same subpatch / encapsulated code.
It is something that can be done? I'm working on it right now (not written any code just trying out solutions) - it kind like a router/selector with 1 in and 4 outs. Maybe would be more simple to built it as an external?