Dear list.
I need some help !!! I whant to change what's in a message in a sub patch.
the $1 passing mecanisme don't work for message because they use $1 for another purpose.
I can use a "set $1" message instead and use an inlet.
but $1 can't contains space. the "/" don't work the same way than in sh (due to tk i have read somewhere) and cotting ("{''}") don't look to work.
thanks
hi
On Tue, 17 Jul 2001, HENRY Damien wrote:
Dear list.
I need some help !!! I whant to change what's in a message in a sub patch.
the $1 passing mecanisme don't work for message because they use $1 for another purpose.
I can use a "set $1" message instead and use an inlet.
but $1 can't contains space. the "/" don't work the same way than in sh (due to tk i have read somewhere) and cotting ("{''}") don't look to work.
- is it possible to manage space in message ?
- is there a way to "set" a complex message via an inlet ?
the easiest way (but not supported by pd), would be (in my opinion), to use something like $0, meaning "everything at the inlet" (not only a specified atom) pe: =-------- | 1 2 3 ( =-------- | =----------- |$0 hey $0 ( =----------- | =------ |print| =------ would output "1 2 3 hey 1 2 3"
a possibility to set "complex messages" using the zexy-external (for "glue", but i guess some other externals provide objects for concatenating lists too) might be
=--------------------- |1 2 3 this is a list( =--------------------- | =--------------- |t b l | =--------------= | | =----------= | |symbol set| | =----------- | | | =--------------= |glue | =--------------- | =----------- |route list| =----------= | =--- | ( =---
to get spaces into symbols (what do you mean, by spaces in "messages" ?) is more complicated: the straight forward (pure pd) use would be (as indicated some months ago), to use the makefilename object with something like :
=--- |32( =--- | =------------------------------ |makefilename space%cseparated| =------------------------------ | =------ |print|
gets "symbol space separated"
there you create a symbol that is containing the character 32 ("space"), but only 1 space can be inserted by this trick (and by the way, it is not very flexible)
easier might be the "list2symbol" object (zexy), that converts a list (or anything) into one single symbol, seperating list atoms by spaces.
so you can then set your message with a variable "message" containing spaces. unfortunately this message keeps its type (symbol), so that there is only one atom in the message (and not various, as it might look when you see it) hope this is clear (but i believe, this is *not* what you want)
mfg.cdas.srzt IOhannes
thanks
Thanks a lots. Sorry if that discution has been here before. I have study a litle your answer cos the diference between list, message and symbols was not so clear in my head...
your solution :
=--------------
|set $1 $2 $3 (
=--------------
=--
| (
=--
work well when you know the exact number of "atoms" in the mesage.
if you send "a b" you will have "a b 0" and more strange if you send "l a b c" you'll have "a b c" if the first symbol of the message is l or f (i guess for list and float ?)
this one :
=---------------------
|1 2 3 this is a list(
=---------------------
=---------------
|t b l |
=--------------=
=----------= |
|symbol set| |
=----------- |
=--------------=
|glue |
=---------------
=-----------
|route list|
=----------=
=---
| (
=---
=> is what exactly what i whant !!!! i 'm now discovering the symbol object that will change my life !!!! i'll do some doc about it !!!
the last one :
to get spaces into symbols (what do you mean, by spaces in "messages" ?) is more complicated: the straight forward (pure pd) use would be (as indicated some months ago), to use the makefilename object with something like :
=---
|32(
=---
=------------------------------
|makefilename space%cseparated|
=------------------------------
=------
|print|
gets "symbol space separated"
there you create a symbol that is containing the character 32 ("space"), but only 1 space can be inserted by this trick (and by the way, it is not very flexible)
easier might be the "list2symbol" object (zexy), that converts a list (or anything) into one single symbol, seperating list atoms by spaces.
so you can then set your message with a variable "message" containing spaces. unfortunately this message keeps its type (symbol), so that there is only one atom in the message (and not various, as it might look when you see it) hope this is clear (but i believe, this is *not* what you want) mfg.cdas.srzt IOhannes
was clear and interesting, but you were rigth : it was *not* what i was looking for.
many thanks.
Damien.
On Wed, 18 Jul 2001, HENRY Damien wrote:
Thanks a lots. Sorry if that discution has been here before. I have study a litle your answer cos the diference between list, message and symbols was not so clear in my head...
no, it hasn't been here; i just didn't know what exactly you were looking for, and of course parts have been discussed here.
your solution :
work well when you know the exact number of "atoms" in the mesage.
exactly this is the major drawback of this method. therefore : liga for $0
if you send "a b" you will have "a b 0" and more strange if you send "l a b c" you'll have "a b c" if the first symbol of the message is l or f (i guess for list and float ?)
it's the old discussion about "list"s and "anything"s again. the $1, $2, ... suppose that they refer to atoms of a list. a list is a list of atoms preceeded by a selector that is either "list" ("l") or a float.
therefore "1 2 it's you" will produce (with our "set $1 $2 $3"-message) "1 2 it's". "list my long list" will make "my long list" (ditto will "l my long list") "this is quite annoying" will only produce "is quite annoying" because the selector "this" will just be skipped by the $n-things
mfg.cdsa.st IOhannes
Johannes M Zmoelnig hat gesagt: // Johannes M Zmoelnig wrote:
exactly this is the major drawback of this method. therefore : liga for $0
As $0 is already taken for local variables, I would vote for bash-style $* in this matter.
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\