Forums > MaxMSP

? Pd style $0 arguments

September 21, 2007 | 8:41 am

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


September 21, 2007 | 9:17 am

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


September 21, 2007 | 9:30 am

>
> 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;


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