A simple infinite impulse response low pass filter for smoothing control or audio signals.
More...
template<class T>
class Smooth< T >
A simple infinite impulse response low pass filter for smoothing control or audio signals.
This algorithm comes from http://en.wikipedia.org/wiki/Lowpass_filter: y[i] := y[i1] + α * (x[i]  y[i1]), translated as out = last_out + a * (in  last_out). It's not calibrated to any realworld update rate, so if you use it at CONTROL_RATE and you change CONTROL_RATE, you'll need to adjust the smoothness value to suit.
 Template Parameters

T  the type of numbers being smoothed. Watch out for numbers overflowing the internal calculations. Some experimentation is recommended. 
 Note
 Timing: ~5us for 16 bit types, ~1us for 8 bit types.
Definition at line 35 of file Smooth.h.