Forums > Misc

if 9 streams are greater than x problem….

February 10, 2011 | 5:10 pm

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

– Pasted Max Patch, click to expand. –

February 24, 2011 | 9:08 am

does this work for you?

– Pasted Max Patch, click to expand. –

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

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

– Pasted Max Patch, click to expand. –

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


February 24, 2011 | 9:21 pm

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):

– Pasted Max Patch, click to expand. –

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

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

– Pasted Max Patch, click to expand. –

Viewing 3 posts - 1 through 3 (of 3 total)