[PD] dynamic receive names

Frank Barknecht fbar at footils.org
Fri Feb 28 00:35:55 CET 2003


Hallo,
Matthew Nish-Lapidus hat gesagt: // Matthew Nish-Lapidus wrote:
> i have a [receive] in an abstraction.  the abstraction has a number of
> creation arguments.  i want to be able to name the receive using 2
> arguments, for example [r $1-$2-foo].  is there any way to do something like
> this?  

Late answer, but I just for fun built a dynamic solution for your
problem as a pure abstraction with Pd's internal messages. It's
attached: "sender" takes 2 arguments, the name of a receive and a
send. It sends what it receives to the send-destination. Testpatch
shows how it goes. 

Both can be set dynamically. The solution can easily be made to work
for signal send~ and receives~ as well.

ciao
-- 
 Frank Barknecht                               _ ______footils.org__
-------------- next part --------------
#N canvas 172 363 655 407 10;
#N canvas 0 0 450 300 receive 0;
#X obj 145 115 r from_somewhere_else;
#X obj 145 144 s to;
#X connect 0 0 1 0;
#X restore 81 124 pd receive;
#X msg 314 313 \; pd-receive clear;
#X obj 311 193 pack s s;
#X msg 290 218 \; pd-receive clear \; pd-receive obj 145 115 r \$1
\; pd-receive obj 145 144 s \$2 \; pd-receive connect 0 0 1 0 \;;
#X obj 323 90 inlet;
#X obj 477 88 inlet;
#X text 533 89 Set send target;
#X text 171 91 Set receive name;
#X obj 390 150 symbol \$2;
#X obj 311 150 symbol \$1;
#X obj 370 90 loadbang;
#X msg 287 64 from_there;
#X msg 259 45 from_here;
#X msg 476 63 somewhere_else;
#X msg 476 40 somewhere;
#X obj 376 171 t b s;
#X connect 2 0 3 0;
#X connect 4 0 9 0;
#X connect 5 0 8 0;
#X connect 8 0 15 0;
#X connect 9 0 2 0;
#X connect 10 0 8 0;
#X connect 10 0 9 0;
#X connect 11 0 9 0;
#X connect 12 0 9 0;
#X connect 13 0 8 0;
#X connect 14 0 8 0;
#X connect 15 0 2 0;
#X connect 15 1 2 1;
-------------- next part --------------
#N canvas 127 139 752 363 10;
#X obj 40 92 s from;
#X obj 39 156 r to;
#X floatatom 39 190 5 0 0 0 - - -;
#X floatatom 40 66 5 0 0 0 - - -;
#X floatatom 432 190 5 0 0 0 - - -;
#X floatatom 432 66 5 0 0 0 - - -;
#X obj 432 92 s from_somewhere_else;
#X obj 432 156 r to_somewhere_else;
#X obj 180 153 sender from to;
#X msg 273 126 to_somewhere_else;
#X msg 180 87 from_somewhere_else;
#X connect 1 0 2 0;
#X connect 3 0 0 0;
#X connect 5 0 6 0;
#X connect 7 0 4 0;
#X connect 9 0 8 1;
#X connect 10 0 8 0;


More information about the Pd-list mailing list