Forums > MaxMSP

setting a timer for a specific value

June 7, 2011 | 9:52 am

I am trying to measure a value from a sensor here and I want to have a rule that a 1 is immediately passed on while a 0 first has to be there for a specific set time.

For example, when an optical sensor senses someone in front of it it should immediately activate an event. However, when it does not sense anyone it should wait a specific amount of time before switching the event off.

The problem that I have is that I am looking for faces with a camera. However the software is not very sensitive and sometimes loses a face. I would like to have some kind of filter so that it makes sure that it doesn’t detect a face anymore.

  1. Detest.maxpat

June 7, 2011 | 6:56 pm

You might want to check out the external object "lbyl" which is look-before-you-leap. This object is great for filtering out false positives and sensor jitter.


June 7, 2011 | 7:29 pm

or if you want it time based, rather than input based, try something like the patch below:

– Pasted Max Patch, click to expand. –

June 7, 2011 | 7:37 pm
– Pasted Max Patch, click to expand. –

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