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