Forums > MaxMSP

Multiple Conditions with variable Statements

May 5, 2014 | 3:39 am

Hi all,

I’ve built a simple patch to consider multiple conditions with variable statements (">" and "<" must be set dynamically, so i cannot use the [if] object).
Here is my patch below.
Since it should be much, much easier to achieve that, I’m wondering how you would simplify it.
Thanks a lot!

– Pasted Max Patch, click to expand. –

May 5, 2014 | 4:45 am

Yeah that looks a mess, and you should avoid having timing related objects in the mix there. (speedlim)

You can do something like this (just have objects dump out and go through all the logic you want in a chain, then gate/pack/whatever at the end to pick the comparison you need (so rather than picking which comparison to DO, you pick which comparison to USE).

OR do it in javascript, which would be better for this kind of nested logic.

– Pasted Max Patch, click to expand. –

May 5, 2014 | 9:43 am

Here’s another variation using [expr]. The trick is using 1 and 0 to turn on and off parts of the equation.

– Pasted Max Patch, click to expand. –

May 8, 2014 | 8:48 am

I’ve been busy and had no time for reply to you.
Thank you!
I’m going to try some slimming down now ;-)


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