? Pd style $0 arguments

Sep 21, 2007 at 8:41am

? Pd style $0 arguments

Hi list !

My copy of MaxMSP just authorized this morning and I’ve spent the day
adapting from Pd. I’ve been searching tutorials and MaxMSP forum for
a convention like Pd’s $0. In Pd, $0 used as part of an obj’s
creation argument within a subpatch (ie. named send or receive) is
replaced with a random number. This allows several subpatches to
maintain their own namespace without recoding. Tried #0, to no avail.
Incidentally, I can’t get #1, #2, … to work either, I’d come across
mention of this convention on MaxMSPForums.
Cheers,


regards Todd
toddconover438@gmail.com

#33756
Sep 21, 2007 at 9:17am

On 21 sept. 07, at 10:41, Owen Cannon wrote:

> My copy of MaxMSP just authorized this morning and I’ve spent the day
> adapting from Pd. I’ve been searching tutorials and MaxMSP forum for a
> convention like Pd’s $0. In Pd, $0 used as part of an obj’s creation
> argument within a subpatch (ie. named send or receive) is replaced
> with a random number. This allows several subpatches to maintain their
> own namespace without recoding. Tried #0, to no avail. Incidentally, I
> can’t get #1, #2, … to work either, I’d come across mention of this
> convention on MaxMSPForums.

#0-#9 have to be at the beginning of symbols, so for instance [receive
#1_foo] works, but [send bar#0] won’t.

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://www.crfmw.be/max

#112892
Sep 21, 2007 at 9:30am

>
> My copy of MaxMSP just authorized this morning and I’ve spent the
> day adapting from Pd. I’ve been searching tutorials and MaxMSP
> forum for a convention like Pd’s $0. In Pd, $0 used as part of an
> obj’s creation argument within a subpatch (ie. named send or
> receive) is replaced with a random number. This allows several
> subpatches to maintain their own namespace without recoding. Tried
> #0, to no avail. Incidentally, I can’t get #1, #2, … to work
> either, I’d come across mention of this convention on MaxMSPForums.

hi,
the #-stuff only works in abstractions. i.e. save your subpatch
somewhere max can find it and load it into your main patch.
afaik #0 also needs some additional random string concatenated, like
#0yuyur.
*-vb

/* save as myAbstr.mxb */

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 68 72 87 196617 loadmess $0-oha;
#P newex 68 105 32 196617 print;
#P connect 1 0 0 0;
#P window clipboard copycount 2;

/* main patch */

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 89 61 50 196617 myAbstr;
#N vpatcher 20 74 433 362;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 61 85 87 196617 loadmess $0-oha;
#P newex 61 120 32 196617 print;
#P window linecount 0;
#P comment 57 55 124 196617 doesn’t work like this…;
#P connect 2 0 1 0;
#P pop;
#P newobj 76 92 33 196617 p sub;
#P newex 38 61 50 196617 myAbstr;
#P window clipboard copycount 3;

#112893

You must be logged in to reply to this topic.