Object that passes value only if change between previous number is more than x


#1

Hello, I'm trying to smooth out the jitter from a potentiometer attached to an analogue in gpio pin.
I've tried the hardware method of attaching a capacitor between the ground and the middle pin but was wondering if there was an object that could do the job?

Is there an object that passes its input to its output only if the input has changed by >= a predetermined amount?


Jitter on Analog in with 10k Pot
#2

math/delta -> math/abs -> math/> ( optional -> dist/slew)
and you have a control signal that goes high when the variation is bigger than some amount.


#3

Thanks!
I'll try that and see if it sorts out the jitter more reliably than the capacitor.


#4

You could also try out the moving average modules:
drj/math/mov_avg and drj/math/mov_avg_clk
These are spin off modules from clock jitter reduction in the synced delays, and serves to smooth/denoise signals.


#5

Thanks, I'll try that.


#6

On the music-dsp list, Andrew Simper recently posted a dynamic smoothing algorithm:
http://cytomic.com/files/dsp/DynamicSmoothing.pdf
An object could be made to perform this function.


#7

Thanks again!
I'm still trying to get a balance that doesn't give too much lag between turning a pot and the parameter changing. I'll post if/when I find a solution that works for this situation.