switch flickering

Mar 22, 2011 at 2:11pm

switch flickering

I have an if statement in max that says if the x+y co-ordinates reach between 200-300 then bang-i tried connecting this to a switch and every time the number value changes the switch will flick on and off- how do i prevent this so that it turns it off once?

Mar 22, 2011 at 6:14pm

Can you post a simple patch?


Mar 22, 2011 at 6:39pm

Do you really need the if statement to produce a bang? Here it is producing a 1 when in bounds – [if ($i1>200 && $i1<300) && ($i2>200 && $i2<300) then 1 else 0]

Mar 24, 2011 at 3:26pm

Yes, the switch will toggle because the expression will continue to be true while within those bounds, and a bang connected to a switch will make it swap states; you need to look at the helpfiles for [togedge], [onebang] and [select] or [==] or [split] if you require an action from when the expression is true only the first time. Otherwise, as Chris says, don’t use [button].

Mar 28, 2011 at 4:28pm

thanks everyone. chris your right-simple solution im still new to max-my bad

thanks again


You must be logged in to reply to this topic.