Hi Brien,

I got some help on a similar problem a while ago - check this out:

http://lists.puredata.info/pipermail/pd-list/2006-06/039027.html

The basic idea is that in order to use $2 and on, you have to pack the elements into a list.  Then when you send that list into an object, you can start accessing more than just $1.  In the dollarsign example it's not very clear, but it makes more sense here:
http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s6.5

There are a couple of things I'm not mentioning - if you use "subpatches" (abstractions) you can specify creation arguments.  That's what the dollarsign example in the control examples is doing.  But it sounds like you just need to pack into a list.

Good luck,
Kevin


On 7/19/06, briencrean@eircom.net <briencrean@eircom.net > wrote:
Hi List,

This is my first question, I am a newbie. I apologise if this has been asked before I have tried to find the answer in the archive and documentation but to no avail.

I have attached a simple patch below in txt format. I dont understand why when using the 'symbol' object I can instantiate the $1 variable to a string and when I try the same with the $2 variable it says "error: $2: argument number out of range".

My hope is to use the $1 and $2 as part of a message for a read message for the 'soundfiler' object so that I can read multiple sound files into multiple tables using a text file (which will contain the sound file names and table name).

#N canvas 406 51 458 308 12;
#X msg 229 22 word2;
#X obj 98 176 print \$1;
#X msg 74 23 word;
#X obj 105 89 symbol \$1;
#X obj 235 87 symbol \$2;
#X msg 109 135 \$1;
#X msg 224 137 \$2;
#X obj 226 177 print \$2;
#X connect 0 0 4 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 6 0;
#X connect 5 0 1 0;
#X connect 6 0 7 0;


Thanks for your help

Brien



-----------------------------------------------------------------
Find the home of your dreams with eircom net property
Sign up for email alerts now http://www.eircom.net/propertyalerts



_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



--
"[D]aily life [is] a theatrical landscape in which 'everyone has their price,' God (via televangelism) and happiness (smile buttons) become commodities, radio stations say they love you, and detergents have compassion for your hands.