Forums > MaxMSP

measure the degree of change in incoming data

May 12, 2010 | 12:14 pm

Hi,

i have the following scenario: data coming into Max from several sensors, which control the playhead position in a sample. due to the oversensitive (or unstable) nature of the sensors, small amount of data keeps coming in even when sensors are not in use and hence the playhead position changes mildly even when there’s no physical interaction with the sensors. what i’d like to do is measure the degree of change in the incoming data so i could distinguish between continuous sensor hecticness and real physical interaction with the sensors.
i.e. if there’s a sudden number change from 0 to 10 – don’t play, but if it’s 0 to 100 – start playing, do something, etc.

i’m considering using a combination of Counter objects to achieve this. but is there a faster way?

thanks


May 12, 2010 | 4:06 pm

Depends on how much you have to filter this. Do the sensors introduce any noise (like occasional crazy peaks)? If you want to ‘do something’ every time input change is bigger than a certain amount, what’s the point in keeping counters?

– Pasted Max Patch, click to expand. –

May 12, 2010 | 7:24 pm

Hi, thanks for the reply.
sensors don’t introduce noise, there are no crazy peaks, but every now and then there’s a number shift of +4 or -4 due to some sensor jitter. it’s those kind of jitters that i would like to disregard, because every tiny change takes my sample playhead back to the beginning.


May 12, 2010 | 7:59 pm

I put together a patch contrasting several smoothing methods for this thread:

http://cycling74.com/forums/topic.php?id=15180


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