[PD] if - empty list

Hans-Christoph Steiner hans at eds.org
Tue Apr 19 22:16:22 CEST 2005


There are many ways to do "if" in Pd.  It depends on what kind of data  
you are handling.  The key is to think in the Pd (Max, dataflow,  
whatever) way rather than trying to cram procedural programming into a  
Pd patch.

Floats:

[moses 5] = if ( x < 5) { outlet-1 } else { outlet-2 }

Symbols

[select foo] = if (x == "foo") { outlet-1 } else { outlet-2 }

There are other ways as well.

.hc

On Apr 19, 2005, at 6:10 AM, Dieter Untermieter wrote:

> hi
>
> thanks for your hints - they have been very helpful
>
> two new problems occured now:
> - is there anything like a "if"-object in pd. i think that i used such  
> a object in pd, but when i try to  create such a object pd tells me  
> that there is no if object.
> - and i am looking for a way to empty a list.
>
> any hints again?
>
> yours
> --  
> _______________________________________________
> NEW! Lycos Dating Search. The only place to search multiple dating  
> sites at once.
> http://datingsearch.lycos.com
>
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->  
> http://lists.puredata.info/listinfo/pd-list
>

________________________________________________________________________ 
____

"Looking at things from a more basic level, you can come up with a more  
direct solution... It may sound small in theory, but it in practice, it  
can change entire economies."

     - Amy Smith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2353 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050419/b91f564c/attachment.bin>


More information about the Pd-list mailing list