[PD] even/odd conditional mod
Piotr Majdak
piotr at majdak.com
Wed Aug 2 15:37:27 CEST 2006
João Miguel Pais wrote:
> Hi,
>
> 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?
What about the attached patch?
br, Piotr
--
Piotr Majdak
Institut für Schallforschung
Österreichische Akademie der Wissenschaften
Reichsratsstr. 17
A-1010 Wien
Tel.: +43-1-4277-29511
Fax: +43-1-4277-9296
E-Mail: piotr at majdak.com
WWW: http://www.kfs.oeaw.ac.at
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: even-odd.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060802/680b1c2f/attachment.asc>
More information about the Pd-list
mailing list