understanding poly~

Jun 7, 2009 at 4:50pm

understanding poly~

Hi,

I’ve been scratching my head over this for a while now. I’m interested in using the poly~ object to create voice allocation for the playing back of samples from a buffer. I know that I am not using poly~’s full capabilities in terms of midi messages (velocity, note numbers etc) however I am stuck on how to implement the simple voice allocation function using the note $1 message (see attached patch below).

My problem might in part lie in the use of the target 0 command to stop all instances playing… as I stop the line object I also send a message to the thispoly~ object to free all voices… however now it seems that the problem is right from the beginning.

Am I not understanding something here? I have experimented with using a counter to change the instance manually using target each time I send a bang to play however this hasn’t seemed to work either. I’m very confused!

Thanks in advance for any help or explanations you can give me..

Ben

#44280
Jun 7, 2009 at 6:24pm

As ever, the tutorials are your friend. In your specific case, MSP tutorial 21 should show you the way – the sample tutorial uses an oscillator, but the material described starting with the section “The poly~ object” will tell you what you need to know – in your case you’d replace the oscillator with a play~ object and some logic to calculate the playback rate for a given pitch, but using the message “mute 0, 1″ and mute 0, 1″ messages and the “note” message to the poly~ object will do what you need.

#159212
Jun 7, 2009 at 7:50pm

Thanks Gregory… I’d been going through that very tutorial but seemed to have missed something. After starting the patch again from scratch I think I’ve worked it out now using the mute messagez as you suggested… thanks for the help!

#159213
Jun 8, 2009 at 5:55pm

http://www.youtube.com/watch?v=fn98BPNZ7rQ&feature=channel_page

maybe very simple , but maybe can help you !

#159214
Jun 8, 2009 at 7:02pm
emeidos wrote on Sun, 07 June 2009 18:50
I have experimented with using a counter to change the instance manually using target each time I send a bang to play however this hasn’t seemed to work either. I’m very confused!

this is what i do on a regular basis, because i hate the automatic stuff.

try my abstractions as one working example.

110.alloc requires an argument for number of voices, (up to 32):
[110.alloc 16]

alloc-slave can be hooked up to alloc – or be given
voices numbers from any other source – to send next
input to a specific voice.

-110

.

#159215
Jun 8, 2009 at 9:28pm

Thanks Roman… these abstractions are really useful I’ll definitely make use of them… will check out that video too ongo.. cheers!

#159216
Jun 9, 2009 at 1:17am

forgot this.

for things like “note-off” – in case thats how you
build your synth – you might want to use multiple
alloc.

the principle of voice rotation has that limit built in.
Smile

see here

max v2;
#N vpatcher 210 464 875 934;
#P user kslider 263 133 54 0 36 48 31 12 0 128 128 128;
#P newex 119 402 76 196617 print poly;
#P newex 180 320 76 196617 prepend 0;
#P newex 126 278 76 196617 route 0;
#P newex 126 253 76 196617 zl rev;
#P newex 126 225 76 196617 pack;
#P newex 192 129 34 196617 * 40;
#P slider 192 55 16 51 0 1;
#P newex 126 188 76 196617 makenote;
#P newex 62 355 76 196617 110.alloc 32;
#P newex 164 355 76 196617 110.alloc 32;
#P connect 7 1 1 0;
#P connect 0 0 9 0;
#P connect 1 0 9 0;
#P connect 10 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 10 1 2 1;
#P connect 8 0 0 0;
#P connect 7 0 8 0;
#P connect 3 0 4 0;
#P connect 4 0 2 2;
#P connect 2 1 5 1;
#P pop;

-110

#159217
Jun 9, 2009 at 10:10pm

thanks roman..

#159218

You must be logged in to reply to this topic.