Forums > MaxMSP

if !!!

December 17, 2012 | 7:39 pm

hi

A quick question about -if- object and inclinaison (1/-1).
When increase if f1 > f2 == 1 :
When decrease if f1 < (f2-0.1) == 0 :

i’d like to used 2 threshold to ignore "hysteresis" and make sure value is down more…
like on threshold~ object where you have a High and low ?

I have try this but not run good :/

Is there an object like threshold for data ?
or how do my code on -if- object good ?
if $f1 > $f2 || $f1 < ($f2*-1.) then 1 else $f1 < ($f2-0.1) || $f1 > (($f2*-1.)+0.1)) then 0

a quick exemple :

– Pasted Max Patch, click to expand. –

thanks
0-0


December 17, 2012 | 8:55 pm

Hi,

Try this maybe (with bucket).

Best,
Frédéric

– Pasted Max Patch, click to expand. –


ak
December 18, 2012 | 1:46 am
– Pasted Max Patch, click to expand. –

December 18, 2012 | 8:03 pm

Thanks Andrzej…


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