Here is a solution using built-in Pd objects (if you don't mind creating an abstraction).
See attached.
[inlet]
|
| [inlet]
| /
[f]
|
[sel 0 1]
|
| [outlet]
|
[outlet]
e
Thoralf Schulze wrote:
Hi there,
this is probably really noob.
I banged my head several times yesterday while trying to route a bang in pd - in other words: I wanted an object that takes bang at its left inlet and a simple 0/1 at its right. The bang should then be routed to either the left or the right outlet, according to the right inlet. The solution I finally came up with is to convert the bang to a number, use moses to do the actual routing and convert the numbers moses spits out to bangs again. Not quite an elegant solution, I guess - I appreciate any hints.
With kind regards, Thoralf.
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
#N canvas 401 41 539 344 12; #X obj 269 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 305 60 5 0 0 0 - - -; #X obj 180 150 f 0; #X obj 180 173 sel 0 1; #X obj 267 211 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 295 210 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 86 98 inlet; #X obj 139 100 inlet; #X obj 89 235 outlet; #X obj 147 238 outlet; #X obj 305 39 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X text 213 150 store the number , triggered on bang; #X text 234 172 select based on the stored number; #X text 449 305 //es; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 8 0; #X connect 3 1 5 0; #X connect 3 1 9 0; #X connect 6 0 2 0; #X connect 7 0 2 1; #X connect 10 0 1 0;