measure the degree of change in incoming data

May 12, 2010 at 12:14pm

measure the degree of change in incoming data

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

#50341
May 12, 2010 at 4:06pm

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. –
#180603
May 12, 2010 at 7:24pm

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.

#180604
May 12, 2010 at 7:59pm

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

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

#180605

You must be logged in to reply to this topic.