[PD] default abstraction argument(s)
Frank Barknecht
fbar at footils.org
Thu Dec 16 08:07:16 CET 2004
Hallo,
Federico hat gesagt: // Federico wrote:
> my abstraction accepts two creation parameters ($1, $2).
> i want to make $2 optional, but it should default to value 1 if $2 was
> omitted.
>
> i tried in this way:
>
> [loadbang]
> |
> [trigger bang bang]
> | |
> [$2 ] [1 ]
> | /
> | /
> [float ]
>
> but if i omit $2, the float's value is 0 and not 1.
> how to test if a creation parameter was specified?
You test, if it's 0!
loadbang
|
[f $2]
|
[select 0]
| |
[default( |
| /
[s something]
Replace "default" with your default.
Ciao
--
Frank Barknecht _ ______footils.org__
More information about the Pd-list
mailing list