this might help to clear up the confusion due to the different nature of $1, $2, etc in objects and message boxes...
the general ascii way to denote an object is inside square brackets [objectname]
message boxes are displayed a number of ways, but the most common seems to be a square bracket followed by backwards round bracket... ie [message(
************************
$1, $2 etc in OBJECTS
************************
here is a normal [pack] object with 3 floats:
[pack 10 50 100]
if we use this inside of an abstraction, instead of 10 50 100, we might want to use $1 $2 $3, so that every instance of the abstraction can be initiated with different values.
for example, we might make an abstraction called 'multi-tap.pd', and inside the abstraction there is [pack $1 $2 $3].
if we initiate this abstraction in another patch, we can use "creation arguements" to fill the $1 $2 $3 spaces.
eg.. [multi-tap 7 40 300]
inside this abstraction, for any OBJECT with $1 in it, the $1 will be substituted with '7'...$2 will be substituted with '40' and $3 will be substituted with '300'
so, [symbol $1-tigers] in this case will output 'symbol 7-tigers' when banged.
the exception to this case would be something like [symbol sample-$1.wav]. that won't work, because the $1 sign must come first.
********************************
$1, $2 etc in MESSAGE BOXES
********************************
message boxes can also use $1, $2 ..etc (but never $0) however, the function is very different.
dollar signs in message boxes will just pass on the information sent to their input. here are some examples:
this patch will print out 10 50 400:
[bang(
|
[pack 10 50 400]
|
[$1 $2 $3 (
|
[print]
this patch will only print out 50:
[bang(
|
[pack 10 50 400]
|
[$2 (
|
[print]
we can also add stuff after a dollar sign, like this:
[numberbox]
|
[symbol $1-array(
|
[print]
be careful though, as the following won't work. the $ must come first:
[numberbox]
|
[symbol array-$1(
|
[print]
***********************************************************************
for more information, right click on a message box for its help file.