Hello all,
I'm trying to get a simple command - value relationship to work in PD with difficulty. Basically I want a message to have a simple syntax like R 10 which would set the red value of an object to 10. So basically I wanted to use a route to sort the messages according to the first symbol "R" for example. So I have a pack s f which I take it should pack the "R" and the value into one list. problem is that when I put a "print" on the output, rather than getting "R 10" I get "list R 10". Seems to me I'm missing some vital logic about symbols..
Any help would be appriciated.
(Oh course I could use other floats as the "commands") but that would be a lot less readable. "0 10" )
Thanks Ben
I don't know enough about the system to explain why you're getting
"list" prepending your output. But you could thwart that by following the "pack" with a message box of "$2 $3" or "route list" which would chop that pesky "list" off of your output.
. . David McCallum . Queen's University Electronic Music Studio Manager . and Noise Maker . http://mentalfloss.ca/sintheta/ .
On Tue, 21 May 2002, Ben Bogart - FMPM/F1999 wrote:
Hello all,
I'm trying to get a simple command - value relationship to work in PD with difficulty. Basically I want a message to have a simple syntax like R 10 which would set the red value of an object to 10. So basically I wanted to use a route to sort the messages according to the first symbol "R" for example. So I have a pack s f which I take it should pack the "R" and the value into one list. problem is that when I put a "print" on the output, rather than getting "R 10" I get "list R 10". Seems to me I'm missing some vital logic about symbols..
Ben Bogart - FMPM/F1999 wrote:
Hello all,
I'm trying to get a simple command - value relationship to work in PD with difficulty. Basically I want a message to have a simple syntax like R 10 which would set the red value of an object to 10. So basically I wanted to use a route to sort the messages according to the first symbol "R" for example. So I have a pack s f which I take it should pack the "R" and the value into one list. problem is that when I put a "print" on the output, rather than getting "R 10" I get "list R 10". Seems to me I'm missing some vital logic about symbols..
Any help would be appriciated.
hi !
simple solution: use messages instead of [pack]
|
better solution (to change the identifier dynamically)
|
mfg.cds.vfs IOhannes
(Oh course I could use other floats as the "commands") but that would be a lot less readable. "0 10" )
Thanks Ben
B. Bogart
hi,
somehow related is this problem I stumbled over recently:
dollar signs in messages seem to react strange when they get a two-part message that starts with a symbol instead of a float. In the attached patch, I used the example from the html-docs: [23 skidoo( sent to [$2 until $1( which works fine this way, but not the other way around:
[skidoo 23( ---> [$2 until $1(
results in "error: $2: argument number out of range"
Is this the intended behaviour?
Frank Barknecht _ ______footils.org__