if statement - lists

Ben Carey's icon

Hi everyone -

a quick question regarding the if object. I am trying to limit the output of a list according to whether a variable is greater than one. Can if output lists?

What I would like to code is something like this:

if $i2 > 1 then "output list"

I have patched a work around using iter (attached) but was wondering if there was a command within the if object that I am missing that can do this for me?

Thanks,

Ben

Ben Carey's icon
Max Patch
Copy patch and select New From Clipboard in Max.

whoops - here is the patch:

ch's icon

Hi,

Max Patch
Copy patch and select New From Clipboard in Max.

[if] doesn't work with lists.
But you can use a simple gate :

7nches's icon

Hey,

Max Patch
Copy patch and select New From Clipboard in Max.

I think this is a bit more like what you are trying to do :

Ben Carey's icon

Thanks to you both for these workarounds - it always good to find several ways of doing the same thing!