#include <Filters/BiQuad.hpp>
Generic BiQuad (Bi-Quadratic) filter class, Direct Form 1 implementation.
Uses the NormalizingBiQuadFilterDF1 implementation for floating point types, and NonNormalizingBiQuadFilterDF1 for all other types.
Implements the following difference equation:
\[ y[n] = \frac{b_0 \cdot x[n] + b_1 \cdot x[n-1] + b_2 \cdot x[n-2] - a_1 \cdot y[n-1] - a_2 \cdot y[n-2]}{a_0} \]
Definition at line 221 of file BiQuad.hpp.
Public Member Functions | |
BiQuadFilterDF1 ()=default | |
BiQuadFilterDF1 (const AH::Array< T, 3 > &b_coefficients, const AH::Array< T, 3 > &a_coefficients) | |
Construct a new BiQuad (Bi-Quadratic) Filter object. More... | |
BiQuadFilterDF1 (const BiQuadCoefficients< T > &coefficients) | |
BiQuadFilterDF1 (const AH::Array< T, 3 > &b_coefficients, const AH::Array< T, 3 > &a_coefficients, T gain) | |
Construct a new BiQuad (Bi-Quadratic) Filter object. More... | |
BiQuadFilterDF1 (const BiQuadCoefficients< T > &coefficients, T gain) | |
T | operator() (T input) |
Update the internal state with the new input \( x[n] \) and return the new output \( y[n] \). More... | |
|
default |
|
inline |
Construct a new BiQuad (Bi-Quadratic) Filter object.
The coefficients \( b \) and \( a \) can be derived from the transfer function:
\[ H(z) = \frac{b_0 + b_1 z^{-1} + b_2 z ^{-2}} {a_0 + a_1 z^{-1} + a_2 z ^{-2}} \]
b_coefficients | The coefficients of the transfer function numerator. |
a_coefficients | The coefficients of the transfer function denominator. |
Definition at line 241 of file BiQuad.hpp.
|
inline |
Definition at line 245 of file BiQuad.hpp.
|
inline |
Construct a new BiQuad (Bi-Quadratic) Filter object.
The coefficients \( b \) and \( a \) can be derived from the transfer function:
\[ H(z) = K \frac{b_0 + b_1 z^{-1} + b_2 z ^{-2}} {a_0 + a_1 z^{-1} + a_2 z ^{-2}} \]
b_coefficients | The coefficients of the transfer function numerator. |
a_coefficients | The coefficients of the transfer function denominator. |
gain | Gain factor \( K \). |
Definition at line 266 of file BiQuad.hpp.
|
inline |
Definition at line 270 of file BiQuad.hpp.
|
inline |
Update the internal state with the new input \( x[n] \) and return the new output \( y[n] \).
input | The new input \( x[n] \). |
Definition at line 281 of file BiQuad.hpp.