filtering elements from a list, when list only has one element
I have a list of integers, stored in a pv object. I'd like to be able to filter out specific integer values from the list, and then return the result to the same pv object. I'm using the zl.filter object, which works fine, except when there's only one integer left in original list, and it's the same value that I'd like to filter out. In this case, the zl.filter object doesn't output anything, and so the pv object is not emptied (or set to 0). Maybe the patch makes things clearer. How to address?
Max Patch
Copy patch and select New From Clipboard in Max.
You can use a dedicated symbol indicating your [pv] object is "empty":
Max Patch
Copy patch and select New From Clipboard in Max.
Love it! Many thanks.