Poly~ problems
Hello. I am trying to build an analogue-like synthesizer in Max Msp. I have managed to make all of the arrangements for the synth to produce the sound the way I want to, but when it comes to make it polyphonic using the Poly~ object like in this tutorial, It doesn't produce more than one sound at a time.
I have attached the principal program and the patch replicated in poly. I hope that you could really help me.
Regards to all.
PS: My synth is desinged to be controlled by a Akai MPK25 controller, so I desigened an interface for that in the principal patch.
i dont see anythign like a poly patcher there, but one thing is clear, as long as you are using send and receive inside a sound generator, it wont work in any kind of polyphonic, serial or parallel mode, because all data will always be sent to each instance or voice.
It's quite feasible to do this. The trick is to dynamically create target names for the send and receive objects that include the voice instance number. I use this technique so that I can have multiple (and different) VST plugins in a single poly~, with individual control over each VST object.
Thanks a lot for your answers. I have solved the problem by stop using send and receive for notes, while I'll still use that for the controlls of the synth (Osc wave, filter cutoff, etc) that I actually want to be the same for all voices.
You advice seams really helpful DHJDHJDHJ, could you give me an example of this dynamic names?
I'm near a computer where I have my code but the concept is simple
First remember that when you have a [poly~] object containg a patcher, there are N instances of that patcher created.
If you have a [thispoly~] inside a patcher that is instantiated through a [poly~] then a loadbang message into that [thispoly~] will result in a unique poly instance number being sent out to every instance.
Now, If you have [receive] objects in that patcher as well, then you can change the target names of those [receive] objects using the "set" message. If you include the instance number in the "set message", then the target name of a [receive] will be different for each instance. For instance, with three instances, concatenate the name "notes" with the instance number (using sprintf for example) will let you set receiver targets of note_1, note_2, note_3. You can send a MIDI event (say) to a particular instance by using [send] objects and defining (manually or programmatically) the target name. E.g. [send note_1] will send incoming values the the first instance. [send note_3] would send to the third instance.
The trick is the use of that loadbang and thispoly~ at initialization time.
Does that help?
I meant to say I'm NOT near a computer....