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.5http://crca.ucsd.edu/%7Emsp/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
Hallo, Kevin McCoy hat gesagt: // Kevin McCoy wrote:
There are a couple of things I'm not mentioning - if you use "subpatches" (abstractions) you can specify creation arguments.
Note that subpatches and abstractions are different beasts. Subpatches are objects inside a patch and they start with [pd ...] normally. They do *not* accept creation arguments. Abstractions however do. Abstractions are seperate *.pd-files.
Frank Barknecht _ ______footils.org_ __goto10.org__
Ah! Thanks for the clarification, Frank!
Kevin
On 7/19/06, Frank Barknecht fbar@footils.org wrote:
Hallo, Kevin McCoy hat gesagt: // Kevin McCoy wrote:
There are a couple of things I'm not mentioning - if you use
"subpatches"
(abstractions) you can specify creation arguments.
Note that subpatches and abstractions are different beasts. Subpatches are objects inside a patch and they start with [pd ...] normally. They do *not* accept creation arguments. Abstractions however do. Abstractions are seperate *.pd-files.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list