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
On Mon, Jan 17, 2005 at 03:19:43PM +0100, 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.
you defintiely want Zexy for stuff that should proably be core list/data manip operations (at least i think thats where demux is from)
#N canvas 0 0 454 304 12; #X obj 222 55 demux; #X obj 259 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 88 7 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1 ; #X obj 240 76 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 150 81 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X connect 0 0 4 0; #X connect 0 1 3 0; #X connect 1 0 0 1; #X connect 2 0 0 0;
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
Thank you for your answers. demux is what I've been looking for, although the sel - solution provides a really cool solution as well ...
Thanks, Thoralf.
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
Hi Thoralf,
I think you could use the select object for that; the select-object alternates the bang between the left and right outlet, depending on the creation argument [1/0] of the right inlet. If you send a bang to the left inlet via a message [1] the bang is routed to the left or right outlet, according to 1/0 [creation argument] on the right inlet.
Maybe this is what you want.
Ciao,
Sara
Quoting Thoralf Schulze thoralf_schulze@yahoo.de:
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
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;
Hi there,
[inlet]
| | [inlet] | / [f] | [sel 0 1] |
| [outlet] | [outlet]
It might be a good idea to put this into the documentation somewhere. Inevitably, everyone stumbles upon converting/routing datatypes when using pd, and the existing docs on this topic are a little on the short side ...
Speaking of docs, is the pd documentation project still alive? I could write something about VJing with pd.
With kind regards, Thoralf.
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de