[PD] setting Messages

Johannes M Zmoelnig zmoelnig at iem.kug.ac.at
Wed Jul 18 14:31:38 CEST 2001


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.
> 
> 1) is it possible to manage space in message ?
> 2) is there a way to "set" a complex message via an inlet ?
> 

2)
using something like 
=--------------
|set $1 $2 $3 (
=--------------
|
=--
| (
=--

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"

you could then use 
=-------
|set $0(
=-------

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
> 
> 




More information about the Pd-list mailing list