I need to ask one question that will help, and maybe another.
In the test.pd you corrected for me: Why is "read" accepted on it's own and $0symbol is not? Are they both of type "symbol"?
-Jordan
Hello Jordan,
Well, you understood correctly that "$0" is the best way to localize certain variables in your patch. But if you're looking for more info, check the help documents in the /pd/doc/ folders called "dollarsigns" or "locality".
I think that what you might be MISunderstanding is the use of ATOMS. For example, your patch didn't work because:
- putting "$0sample" into a message box is very different than typing
"symbol $0sample" into an object box or message box.
- "Lists" come in two forms (sort of)...in one form, a list is really
just a group of messages or numbers...in another form, a list is created 'explicitly' by preceding a group of messages by the word "list". However, the strangest part is that most objects in PD will act differently depending on which form of list you send to them. I suggest you familiarize yourself with the [float], [symbol], [int], and [route] objects and do some reading about "atoms" in the pd/doc/ folders.
There's very good reason for all these little idiosyncrasies. As in all programming environments, it is very important to understand the usage of "content types". For example, a phone number like (555-1234) could be considered type "text" or type "number". If it is "number" then the program will assume that your answer is -679!! (a - b = c ...it's math) But if you want that phone number to remain a phone number, then you'd have to tell the programming environment that it's actually TEXT to prevent the computer from calculating it as a number.
Likewise, [soundfiler] wants a COMMAND. It wants to receive a sentence which says "read this file and put it into this array". It doesn't want to receive a LIST which says "I am a list"
[pack] wants to receive specific types of atoms. That's why we had to send it a "symbol" called "$0sample" instead of sending it TEXT (via your message box).
[pack] outputs a "list" though...that's what confused you I think.
I hope I've helped instead of confusing you.
Regards, Dave S
----- Original Message ----- From: "Jordan J" buck@defaced.net To: dave@davesabine.com Sent: Friday, December 06, 2002 2:33 AM Subject: Re: [PD] Pack problems
That helps. Okay, obviously I misunderstood something else. I thought I had read somewhere in the docs that if named something with a $0 in front it will be unique to that patch. Did I just partly misunderstand that?
-Thanks for your help.
Take a look at this attachment.
----- Original Message ----- From: "Jordan J" buck@defaced.net To: pd-list@iem.kug.ac.at Sent: Friday, December 06, 2002 1:49 AM Subject: [PD] Pack problems
I have included an example patch to show my problem.
http://defaced.net/buck/misc/test.pd
I have an array named "$0sample". I want to use "getpanel" and "soundfiler" to load a wav file into the array.
As you can see, my current method doesn't work.
Is there a proper way? Did I miss something here?
I hope someone can help and I thank you if you can.
-Jordan
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list