measure the degree of change in incoming data
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?
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. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 482.3ocwV9saCBBEF+Z8ofv0sKBZs5taOGKKKXk0whhFAy51xd2W4ntY2p+o Ni8FHbfd367iOn9gsENJ6.WgQ2htGYY8gskEDxDvpdrENkcXWBSAKCGUp0YR 7ppoxY5cOKj6erfuSWkFpy1abVgHgDSG0ooE8P8uQDCIJK5k0DRShjkoBYBW CaB4mfYk5eGsJj9sbd0FhiXx8XzClY+z11zrZjEij+5QYznAM+.TCXMJOg81 HpQ+.SmqGLH370XXSddJSpkrTP036JDrjIT7ljnDuCIgXXaGLAJfIwjTtRw1 y+CTH8viMswwFmpAmGGAWHNnyBNveKk7BthK0LsHS1pB78ZUAN0MyomRkmHz n0TmilmdHY.H.BEjylv9LVauPR5dVRRuPRJjZ7pptY0dsl51CVHd9i1g4esb XSwrTlFwK5yO.2rbcaU1cXG7lk2YlncX1eBd8f2QBAGgK8lMcyD5UwJL46Fc 92QBjXPOxVmg4A4Z5Q9CV.EhSDxe+EHPMZheJqTYkE6ZRZ8wK5m5LlqzBI7v dq0r8j07rHNlCS2n1TQbd1QoUKgNN2FqhL6FY.E4exZVBEMDiBVbEMDiBWzS svQvHymptfRxaLRZQUDYDJhtnFIxHLRz+AiNN3S6uT90ALB -----------end_max5_patcher-----------
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.
Forums > MaxMSP