pattr and poly~ – How bindto to all voices?

Mar 17, 2007 at 2:35am

pattr and poly~ – How bindto to all voices?

SITUATION: I want to use pattr as a messaging/control system to control the same object in multiple voices of a poly~.

In the parent patch, I connect a UI object to a pattr. Then I bind the pattr to the same type of UI in a poly~

DESIRED RESULT: I want the parent UI object to control the poly~’s UI object in all voices of the poly~

ACTUAL RESULT: I can only get the parent UI object to control the poly~ UI object in voice 1.

Please see the two patches in this email for an example.

Thanks for any help.

Adam

SAVE ME AS A PATCH NAMED the_poly

max v2;
#N vpatcher 109 123 731 436;
#P window setfont “Sans Serif” 9.;
#P number 145 111 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname nbox_poly;
#P pop;

SAVE ME AS A PATCH NAMED the_parent

max v2;
#N vpatcher 575 386 1175 786;
#P window setfont “Sans Serif” 9.;
#P window linecount 3;
#P comment 47 266 216 9109513 ACTUAL RESULTS: the number box in this parent patch only controls “nbox_poly” in the first voice of the poly~.;
#P comment 45 214 216 9109513 DESIRED RESULTS: the number box in this parent patch simultaneously controls “nbox_poly” in each voice/instance of the poly~.;
#P window linecount 1;
#P message 302 113 40 9109513 target 2;
#P message 436 70 36 9109513 open 3;
#P message 396 70 36 9109513 open 2;
#P message 354 70 36 9109513 open 1;
#P newex 361 157 78 9109513 poly~ the_poly 3;
#P objectname poly_the_poly;
#P number 40 78 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 40 145 186 9109513 pattr for_testing poly_the_poly::nbox_poly;
#X prestore 1 0 38;
#P objectname for_testing;
#P window linecount 2;
#P comment 40 172 216 9109513 This pattr binds to the number box named “nbox_poly” in the poly~.;
#P connect 2 0 1 0;
#P connect 4 0 3 0;
#P connect 7 0 3 0;
#P connect 6 0 3 0;
#P connect 5 0 3 0;
#P pop;

#30866
Mar 17, 2007 at 10:34am

poly_the_poly::nbox_poly.1 = voice 1
poly_the_poly::nbox_poly.2 = voice 2

There is currently no “voice 0″ available for technical reasons.

jb

Am 17.03.2007 um 03:35 schrieb Adam Kendall:

> #P newex 40 145 186 9109513 pattr for_testing
> poly_the_poly::nbox_poly;

#99300
Mar 17, 2007 at 1:24pm

Ok, thanks. 0 would be good, but this is workable.

Now a question of curiousity:

I figured my problem had to do with an “array”-oriented labeling, like you indicated. I tried (2) and [2]. Since Max typically uses either () or [] to address multiples of something (like the poly~ windows use (), and I think objects use []), why is the convention here a dot?

Adam

#99301
Mar 17, 2007 at 1:30pm

Just one of the beautiful inconsistencies of your favorite visual
programming environment!

jb

Am 17.03.2007 um 14:24 schrieb Adam Kendall:

> why is the convention here a dot

#99302
Mar 19, 2007 at 6:34pm

Adam Kendall schrieb:
> SITUATION: I want to use pattr as a messaging/control system to
> control the same object in multiple voices of a poly~.
>
> In the parent patch, I connect a UI object to a pattr. Then I bind
> the pattr to the same type of UI in a poly~
>
> DESIRED RESULT: I want the parent UI object to control the poly~’s
> UI object in all voices of the poly~

Better use a send/receive pair instead of pattr, or an inlet with target
0 ….

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#99303
Mar 19, 2007 at 7:53pm

#99304

You must be logged in to reply to this topic.