This time I've got a symbol, say "foo", and some numbers, say 3, and I'm trying to construct "read foo-3.wav".
Tried "makefilename $1-%d.wav", aiming to plug in the 3 and get "$1-3.wav", run that through a "set $1" to a message box -- but makefilename sends "$1-3.wav", and I haven't figured out how to strip the backslash off. If makefilename took "set", or handled lists, or didn't add the backslash; or if there were an "add3" that didn't inject spaces... but how do people prefer to do this kind of thing?
hi, makesymbol from zexy, this has some additional features. sÃme.
----- Original Message ----- From: eli+@gs211.sp.cs.cmu.edu To: "pd" pd-list@iem.kug.ac.at Sent: Monday, June 03, 2002 4:53 AM Subject: [PD] $ vars again
This time I've got a symbol, say "foo", and some numbers, say 3, and I'm trying to construct "read foo-3.wav".
Tried "makefilename $1-%d.wav", aiming to plug in the 3 and get "$1-3.wav", run that through a "set $1" to a message box -- but makefilename sends "$1-3.wav", and I haven't figured out how to strip the backslash off. If makefilename took "set", or handled lists, or didn't add the backslash; or if there were an "add3" that didn't inject spaces... but how do people prefer to do this kind of thing?
-- Eli Brandt | eli+@cs.cmu.edu | http://www.cs.cmu.edu/~eli/
sme wrote:
makesymbol from zexy, this has some additional features.
Ooh, this zexy library is very handy. Almost essential...
best usage would be makesymbol from the ZEXY library.
you have to create a "pack s 0", containg "foo" and "3" and send it to the object
"makesymbol %s-%s.wav" then into the message "read $1"
this should do your job
oliver
03.06.02 04:53:26, eli+@gs211.sp.cs.cmu.edu wrote:
This time I've got a symbol, say "foo", and some numbers, say 3, and I'm trying to construct "read foo-3.wav".
Tried "makefilename $1-%d.wav", aiming to plug in the 3 and get "$1-3.wav", run that through a "set $1" to a message box -- but makefilename sends "$1-3.wav", and I haven't figured out how to strip the backslash off. If makefilename took "set", or handled lists, or didn't add the backslash; or if there were an "add3" that didn't inject spaces... but how do people prefer to do this kind of thing?
-- Eli Brandt | eli+@cs.cmu.edu | http://www.cs.cmu.edu/~eli/
HI Eli,
I have to think about this. I don't know who's treating you to that backslash for one thing. Anyway, makefilename should indeed take a "set" message, and anyway, I forgot why I didn't think it was possible to feed it more than one variable...
cheers Miller
On Sun, Jun 02, 2002 at 10:53:26PM -0400, eli+@gs211.sp.cs.cmu.edu wrote:
This time I've got a symbol, say "foo", and some numbers, say 3, and I'm trying to construct "read foo-3.wav".
Tried "makefilename $1-%d.wav", aiming to plug in the 3 and get "$1-3.wav", run that through a "set $1" to a message box -- but makefilename sends "$1-3.wav", and I haven't figured out how to strip the backslash off. If makefilename took "set", or handled lists, or didn't add the backslash; or if there were an "add3" that didn't inject spaces... but how do people prefer to do this kind of thing?
-- Eli Brandt | eli+@cs.cmu.edu | http://www.cs.cmu.edu/~eli/