#include <Filters/BiQuad.hpp>
Generic BiQuad (Bi-Quadratic) filter class, Direct Form 2 implementation.
Uses the NormalizingBiQuadFilterDF2 implementation for floating point types, and NonNormalizingBiQuadFilterDF2 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 485 of file BiQuad.hpp.
Public Member Functions | |
BiQuadFilterDF2 ()=default | |
BiQuadFilterDF2 (const AH::Array< T, 3 > &b_coefficients, const AH::Array< T, 3 > &a_coefficients) | |
Construct a new BiQuad (Bi-Quadratic) Filter object. More... | |
BiQuadFilterDF2 (const BiQuadCoefficients< T > &coefficients) | |
BiQuadFilterDF2 (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... | |
BiQuadFilterDF2 (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 505 of file BiQuad.hpp.
|
inline |
Definition at line 509 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 530 of file BiQuad.hpp.
|
inline |
Definition at line 534 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 545 of file BiQuad.hpp.