[PD] pd if-then-else
Frank Barknecht
fbar at footils.org
Wed Jul 19 00:56:04 CEST 2006
Hallo,
Tas Pas hat gesagt: // Tas Pas wrote:
> How can I make the pd equivallent to the "if-then-else" structure in
> pd?
This depends on what you want to put in the if-clause. Some useful
objects to "branch" are [moses], [select], [route], [==],...
A typical idiom is a comparison operator combined with [select]:
|
[> 10]
|
[select 0 1]
| |
| > 10
|
<= 10
You can use [select some_symbol] to do something, if an incoming
symbol matches. Non-matching symbols get send to the second outlet of
this [select], so they would be the "else" clause.
[expr] has some shortcuts built in with its "if" operation. Check the
helpfile for an example.
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list
mailing list