[PD] messages to messagebox
bbogart at ryerson.ca
bbogart at ryerson.ca
Mon Dec 9 16:57:51 CET 2002
Hi Kristof,
I'm not quite sure what your trying to do here. when you use $1 $2 in a message box those refer to the first and second elements of a list. When you put two strings in a message box "testrecv 10" that is not the same as a list!!! you have to pack those two elements into a list and then send that to the message box containing $1 $2. Take a look at this:
#N canvas 342 166 580 414 12;
#X obj 429 137 r testrecv;
#X floatatom 429 165 5 0 0;
#X msg 187 171 foo testrecv 10;
#X obj 51 27 netreceive 3000 1;
#X text 282 133 fails;
#X text 322 173 works;
#X msg 191 281 \; \$1 \$2;
#X obj 163 352 print patch;
#X msg 112 66 testrecv;
#X floatatom 203 67 5 0 0;
#X obj 142 118 pack s f;
#X connect 0 0 1 0;
#X connect 2 0 6 0;
#X connect 3 0 6 0;
#X connect 6 0 7 0;
#X connect 8 0 10 0;
#X connect 9 0 10 1;
#X connect 10 0 6 0;
Ben
----- Original Message -----
From: kristof lauwers <kristof.lauwers at logosfoundation.org>
Date: Monday, December 9, 2002 9:36 am
Subject: [PD] messages to messagebox
> Hi,
>
> I'm trying to control PD from another app over UDP, connecting a
> netreceive
> to a messagebox.
> Now i thought that, if i have a message with
>
> ;
> $1 $2
>
> (cfr. patch below)
>
> i could send for example "testrecv 10", and a receive named
> testrecv would
> receive the number. i found out that for some reason you need to
> send "foo
> testrecv 10" in stead..
> can anyone tell me why? - what's happening to the foo?
>
> test patch (with other messages in stead of the netreceive):
>
> #N canvas 511 168 1262 930 12;
> #X obj 429 137 r testrecv;
> #X floatatom 429 165 5 0 0 0 - - -;
> #X msg 164 130 testrecv 10;
> #X msg 187 171 foo testrecv 10;
> #X obj 51 27 netreceive 3000 1;
> #X text 282 133 fails;
> #X text 322 173 works;
> #X msg 191 281 \; \$1 \$2;
> #X connect 0 0 1 0;
> #X connect 2 0 7 0;
> #X connect 3 0 7 0;
> #X connect 4 0 7 0;
>
> regards,
>
> kristof
>
>
>
>
> ____________________________________
>
> kristof.lauwers at logosfoundation.org
>
> new url!! http://kristoflauwers.de.vu
> ____________________________________
>
>
> _______________________________________________
> PD-list mailing list
> PD-list at iem.kug.ac.at
> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
>
More information about the Pd-list
mailing list