patcherargs

Sep 22, 2006 at 7:14pm

patcherargs

could anyone enlighten me about the idea behind
patcherargs … ? i dont get the helpfile. it might be
useful to understand it for future abstraction mb.

#27743
Sep 22, 2006 at 7:42pm

I use it to pass arguments to a patcher.
That way I can use the same abstraction
do differnet things depending on what
I pass it.

Anthony

—– Original Message —–
From: Roman Thilenius
Date: Friday, September 22, 2006 2:16 pm
Subject: [maxmsp] patcherargs

>
>
> could anyone enlighten me about the idea behind
> patcherargs … ? i dont get the helpfile. it might be
> useful to understand it for future abstraction mb.
>

#84285
Sep 23, 2006 at 6:38pm

Quote: Anthony Palomba wrote on Fri, 22 September 2006 13:42
—————————————————-
> I use it to pass arguments to a patcher.
> That way I can use the same abstraction
> do differnet things depending on what
> I pass it.

yeah right, that seem to be only difference to “normal”
use of arguments, with patcherargs you can use args with [p]s.

but how else does the use of patcherargs differ from using [loadbang]-[s #1] (…in an abstraction)?

#84286
Sep 23, 2006 at 7:02pm

you can use attributes, which is fantastic ;)

here is some example :

#P window setfont “Sans Serif” 9.;
#P flonum 52 243 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 52 214 58 196617 switch 2 1;
#P flonum 145 161 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 76 160 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 76 133 217 196617 route something something_else mode;
#P inlet 76 86 15 0;
#P newex 95 86 285 196617 patcherargs @something 666 @something_else 187 @mode 2;
#P window linecount 3;
#P comment 298 134 278 196617 in abstractions like this you can set a Default value , which can be changed by passing a message to the inlet , or by an attribute value…;
#P window linecount 1;
#P comment 76 47 100 196617 Some Abstraction;
#P fasten 2 1 4 0 375 124 81 124;
#P connect 7 0 8 0;
#P connect 3 0 4 0;
#P connect 4 1 6 0;
#P connect 4 0 5 0;
#P fasten 4 2 7 0 219 202 57 202;
#P fasten 6 0 7 2 150 180 105 180;
#P connect 5 0 7 1;
#P window clipboard copycount 9;

#84287
Sep 26, 2006 at 4:55am

Roman Thilenius wrote:
> could anyone enlighten me about the idea behind
> patcherargs … ? i dont get the helpfile. it might be
> useful to understand it for future abstraction mb.

It will output all (also more than 9) parameters as a list.
It will output nothing if there is no parameter specified.
It will pass attributes to the right outlet.
It will tell you when its done…

I tried hard to get some of that functionality in pre 4.5 Max. All
solutions have been ugly…
For example I found no way whatsoever to differentiate between a non set
parameter and a parameter set to 0. I would look for the 0 and just
assume its a non set parameter. That’s what I call ugly…

Stefan


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

#84288

You must be logged in to reply to this topic.