routing in pd (was: [PD] pd if-then-else)

Tas Pas tprotopgr at yahoo.gr
Wed Jul 19 12:53:01 CEST 2006


Thank you very much!

But what if I want to make a toggle switch whitch routes things?
If the swith is open, things will go left,
If the switch is closed, things will go right ...

 Hi,

> If I send values in a specific range, I want them to go somewhere.

in that case it seems like [moses] is your friend.
You can use multiple [moses] objects to define multiple ranges to route 
separately:

[moses 0]
 |           |
[s a]    [moses 1]
             |            |
           [s b]       [s c]

Then all negative values go out the left, all positive values out the right, 
and all zero values out the centre.

btw: if you wanted make [select] output the value, you could always store 
the value in a [i] (or [f]) before sending to select, and have the correct 
bang message routed to the first inlet of the corresponding [i].  Of course 
this is dirty cos you need as many [i]'s as 'select' parameters!  However, 
just about anything is possible...

Matt

-=-=-=-=-=-=-=-=-=-=-=-
http://www.loopit.org
-=-=-=-=-=-=-=-=-=-=-=-
----- Original Message ----- 
From: "Tas Pas" 
To: 

Sent: Wednesday, July 19, 2006 10:30 AM
Subject: routing in pd (was: [PD] pd if-then-else)


Thanks for your immediate answer.
The problem which occurs with [select] is that, when a match value reaches 
[select's] inlet, [select] sends a [bang] to the corresponding outlet and 
not the value it received and triggered the [bang].

What I want to do is to route the messages.
If I send values in a specific range, I want them to go somewhere.
If I send values beyond tha range, I want them to go somewhere else.
In procedural programming languages it can be done with "if-then-else" and a 
variable.
In pd the variable is not passed by the [select] and istead a [bang] message 
is sent.
Is there a way to use [select] and have the value in a outlet or something?

Thank you, and forgive me if I am writing in a confusing way.

Regards,

Terumi 






 		
---------------------------------
 Χρησιμοποιείτε Yahoo!
 Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων 
 http://login.yahoo.com/config/mail?.intl=gr 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060719/1eb293be/attachment.htm>


More information about the Pd-list mailing list