Controlling switch with signals from cameratracking

hi there! i’m really new, started patching last week and need some help regarding my project with camreatracking.

i divided the picture into 2 areas. if a framedifference is detected in area A i get a “1”. same for B. these values should control a switch with 3 inputs. no movement = 1, movement in area A = 2, movement in area B = 3.

my problem is that i get many, but really short ‘tracking bangs’. i need something that stores the value for some time, and just changes it back, after there has been no movement for some time in the area.

any suggestions?

check out these nodes: MonoFlop (Animation) is the most simple for keeping short bangs a bit longer; if fading is of interest, Decay (Animation) might be worth a look. there is also S+H (Animation) , which is more sophisticated than the MonoFlop and perfectly serves all possible value-holding needs. maybe you can hold your values with the S+H and use a MonoFlop to set the S+H back to 0 after a certain time.

also of interest: the nodes of the boolean category, and the always-underestimated TogEdge (Animation) .