Forums > MaxMSP

getting poly~ voices

August 19, 2011 | 11:44 am

hi,

apologies if this has been answered before – i tried searching, but please direct me to another thread if it has.

my question is this: is there a way for a patcher loaded into [poly~] can find out how many voices are loaded? e.g. to find out the "16" in [poly~ somepatch 16], in the same sort of way it can use [thispoly~] to find out it’s own voice number? (the reason for wanting to do this is so that i can set the phases of phasors for windowing relative to the number of voices in the subpatch, i.e. that the phase of each would be "voice number from [thispoly~] * (1/total number of voices)")

hope that makes sense.

thanks

stephen,


August 19, 2011 | 12:32 pm

the voice instance number is reported by the thispoly~ object out the left outlet when the object receives a bang…check out the manual page (link @ top right of help patcher) for thispoly~ : the mechanism is well explained,
imho.
g’luck
cfb


August 19, 2011 | 1:25 pm

sorry, i didn’t explain properly. i know [thispoly~] can get the voice number for that particular voice, but is there a way get the total number of voices for that poly object, like 16 voices or whatever?

thanks



pid
August 19, 2011 | 3:16 pm

hi 4lefts.

this isn’t possible from thispoly~, although it sure would be useful.

two things you can do:
1– from wherever you are feeding your requested voice numbers dynamically directly also feed this number into the patch via ‘target 0′.
2– a nice little hack a few people use is this one: (this time courtesy of a nobuyasu sakonda patch, but you’ll see many people use it. in fact there is a version of this in the examples folder somewhere i think):

– Pasted Max Patch, click to expand. –

August 19, 2011 | 5:30 pm

thanks pid – that’s a nice idea! good ol’ sakonda. where would granulation and stuff be without him?


Viewing 5 posts - 1 through 5 (of 5 total)