Low-pass filter suited for smoothing control signals. More...
Public Member Functions | |
LowPass1stOrder () | |
Constructor. | |
T | next (T x_current) |
Calculate the next sample, given an input signal. |
Low-pass filter suited for smoothing control signals.
This is an alternatve to Mozzi's Smooth class, with the advantage that it can handle long numbers. However, the drawback is that it imparts gain so the output can be an order of magnitude larger than its input. This renders it unsuitable for some uses, such as controlling frequencies where harmonic results are required.
Definition at line 43 of file LowPass1stOrder.h.
LowPass1stOrder< T, LENGTH >::LowPass1stOrder | ( | ) | [inline] |
Constructor.
T | the type of numbers being smoothed (int, long, etc.) This version only works with signed types. |
LENGTH | the length of the feedback delay used in the filter. How much smoothing to apply. How many times callis of next() for the output to catch up with the input. |
Definition at line 53 of file LowPass1stOrder.h.
T LowPass1stOrder< T, LENGTH >::next | ( | T | x_current | ) | [inline] |
Calculate the next sample, given an input signal.
in | the signal input. |
Definition at line 64 of file LowPass1stOrder.h.