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?
Can you post a simple patch?
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]
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].
thanks everyone. chris your right-simple solution im still new to max-my bad
C74 RSS Feed | © Copyright Cycling '74