if 9 streams are greater than x problem....

Robbie's icon

i am trying to find a computationally fast way of outing a 1 if 9 separate streams of data go over a threshold. Kind of like the below patch, but working... any ideas? thanks in advance, rgb

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

Timo Rozendal's icon
Max Patch
Copy patch and select New From Clipboard in Max.

does this work for you?

This assumes independent streams, if use change the [pak] into a [pack] it will only trigger on the leftmost input

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

your direction is possible as well, but you had some problem with the syntax and proper conditions, see a 3 input for dependent and independent streams here

I don't know which solution will be the more efficient, but this also depends on whether the streams are independent or not

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

You can save some patchchord rsi and several comparison objects by using a couple of zl objects to process each element of the list (this will work for lists of 'any' length by just adding extra inputs to the pack/pak object):

Whether its more cpu efficient than a single [if] I don't know.

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

The patch can be easily modified to allow you to specify individual thresholds for each list element (via coll lookup):