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
Am 19.07.2006 um 12:53 schrieb Tas Pas:
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 ...
gate (cyclone) can do that. or you build it yourself by multiplying
by 0 or 1
m.
Hallo, Tas Pas hat gesagt: // Tas Pas wrote:
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 ...
That's easy using [list prepend] and [route]
"anything" | "0 or 1" (or 2, 3, 4...) [list prepend 0] | [route 0 1 (2 3 4 ...)] | | ...
Frank Barknecht _ ______footils.org_ __goto10.org__