MeanFilter

Simple FIR to smooth things cheaply. Introduces (samples - 1) / 2 latency. Converts everything to long for stability purpose. So this may run forever as long as the input is below some threshold.

Members

Functions

initialize
void initialize(T initialValue, int samples, T maxExpectedValue)

Initialize mean filter with given number of samples.

initialize
void initialize(T initialValue, double cutoffHz, double samplerate, T maxExpectedValue)

Initialize with with cutoff frequency and samplerate.

Meta