[PD] variable arguments to route

Frank Barknecht fbar at footils.org
Thu Jul 6 20:58:59 CEST 2006


Hallo,
David Merrill hat gesagt: // David Merrill wrote:

> I'm having trouble instantiating a route object with $1 type variable 
> arguments... I made the following object:
> 
> [route $1-id]
> 
> where $1 is an argument to the patch, 0 for instance - but messages like 
> 0-id are getting sent to the rightmost outlet (trash). Does route 
> require literal (non variable) arguments?

No, route with arguments works. I guess you're making a different
mistake. My crystal ball say, it is the one in attached patch. ;)

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 0 0 450 300 10;
#X obj 84 126 route \$1-id;
#X obj 84 101 inlet;
#X obj 84 155 outlet;
#X obj 156 156 outlet;
#X connect 0 0 2 0;
#X connect 0 1 3 0;
#X connect 1 0 0 0;
-------------- next part --------------
#N canvas 0 0 777 395 10;
#X obj 179 210 rid 0;
#X msg 179 112 0-id 123;
#X msg 264 109 list 0-id 123;
#X obj 179 265 print HIT;
#X msg 264 137 list 0-id 123;
#X obj 264 161 list trim;
#X text 164 307 Hint: Move [list trim] into the abstraction directly
in frot of the[route];
#X text 180 87 HIT;
#X text 268 86 MISS;
#X text 374 137 HIT again;
#X obj 209 236 print MISS;
#X connect 0 0 3 0;
#X connect 0 1 10 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 4 0 5 0;
#X connect 5 0 0 0;


More information about the Pd-list mailing list