[PD] even/odd conditional mod
Frank Barknecht
fbar at footils.org
Wed Aug 2 15:26:49 CEST 2006
Hallo,
João Miguel Pais hat gesagt: // João Miguel Pais wrote:
> I have a (variable) flow of ascending numbers triggered from until. I
> wanted to separate them into even and odd ones, so that each becomes a
> different treatment (eg. even get 0ed, odd get divided by 2). Is there a
> modulo option in expr? With that and an [expr if] it should be easy. Or
> does anyone has any other suggestions?
[t a a]
| \
[mod 2] \
| |
[pack 0 0]
|
[route 0 1]
I think, expr also has "mod" or "%"
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list
mailing list