mIIR
Generic IIR (infinite impulse response) filter
Description
A generic IIR filter class. Filter can be set to any order. Implemented as a Direct Form I filter.
Template Parameters
template <uint16_t filter_order, class T = int32_t>filter_order: filter order (ie how many delay elements/coefficients are needed)
T: data type used in filter
Class Methods
void setCoefficients(float *a_, float *b_)a_: Pointer to an array of numerator coefficients. Array should have filter_order elements in it. If a[0] is not equal to 1.0, coefficients will be scaled accordingly.
b_: Pointer to an array of denominator coefficients. Array should have filter_order elements in it
T next(T in_sample)Sends a sample to the filter and returns a processed sample back.
Example