Audacity 3.2.0
|
Represents a biquad digital filter. More...
#include <Biquad.h>
Public Types | |
enum | { B0 =0 , B1 , B2 , A1 =0 , A2 , MIN_Order = 1 , MAX_Order = 10 } |
enum | kSubTypes { kLowPass , kHighPass , nSubTypes } |
Public Member Functions | |
Biquad () | |
void | Reset () |
void | Process (const float *pfIn, float *pfOut, int iNumSamples) |
float | ProcessOne (float fIn) |
Static Public Member Functions | |
static ArrayOf< Biquad > | CalcButterworthFilter (int order, double fn, double fc, int type) |
static ArrayOf< Biquad > | CalcChebyshevType1Filter (int order, double fn, double fc, double ripple, int type) |
static ArrayOf< Biquad > | CalcChebyshevType2Filter (int order, double fn, double fc, double ripple, int type) |
static void | ComplexDiv (double fNumerR, double fNumerI, double fDenomR, double fDenomI, double *pfQuotientR, double *pfQuotientI) |
static bool | BilinTransform (double fSX, double fSY, double *pfZX, double *pfZY) |
static float | Calc2D_DistSqr (double fX1, double fY1, double fX2, double fY2) |
static double | ChebyPoly (int Order, double NormFreq) |
Public Attributes | |
double | fNumerCoeffs [3] |
double | fDenomCoeffs [2] |
double | fPrevIn |
double | fPrevPrevIn |
double | fPrevOut |
double | fPrevPrevOut |
Static Public Attributes | |
static const double | s_fChebyCoeffs [MAX_Order][MAX_Order+1] |
anonymous enum |
Enumerator | |
---|---|
B0 | Numerator coefficient indices. |
B1 | |
B2 | |
A1 | Denominator coefficient indices. |
A2 | |
MIN_Order | Possible filter orders for the Calc...Filter(...) functions. |
MAX_Order |
Definition at line 24 of file Biquad.h.
enum Biquad::kSubTypes |
Biquad::Biquad | ( | ) |
Definition at line 20 of file Biquad.cpp.
References A1, A2, B0, B1, B2, fDenomCoeffs, fNumerCoeffs, and Reset().
|
static |
Definition at line 316 of file Biquad.cpp.
References square.
Referenced by CalcButterworthFilter(), CalcChebyshevType1Filter(), and CalcChebyshevType2Filter().
|
static |
Definition at line 324 of file Biquad.cpp.
References square.
Referenced by CalcButterworthFilter(), CalcChebyshevType1Filter(), and CalcChebyshevType2Filter().
|
static |
Definition at line 64 of file Biquad.cpp.
References A1, A2, B0, B1, B2, BilinTransform(), Calc2D_DistSqr(), fn, kLowPass, PI, and square.
Referenced by ScienFilterBase::CalcFilter().
|
static |
Definition at line 146 of file Biquad.cpp.
References A1, A2, B0, B1, B2, BilinTransform(), Calc2D_DistSqr(), ComplexDiv(), DB_TO_LINEAR, fDenomCoeffs, fn, fNumerCoeffs, kLowPass, PI, staffpad::audio::simd::sqrt(), and square.
Referenced by ScienFilterBase::CalcFilter().
|
static |
Definition at line 228 of file Biquad.cpp.
References A1, A2, B0, B1, B2, BilinTransform(), Calc2D_DistSqr(), ComplexDiv(), DB_TO_LINEAR, fn, kLowPass, PI, staffpad::audio::simd::sqrt(), and square.
Referenced by ScienFilterBase::CalcFilter().
|
static |
Definition at line 329 of file Biquad.cpp.
References MAX_Order, MIN_Order, and s_fChebyCoeffs.
Referenced by ScienFilterBase::FilterMagnAtFreq().
|
static |
Definition at line 308 of file Biquad.cpp.
References square.
Referenced by CalcChebyshevType1Filter(), and CalcChebyshevType2Filter().
void Biquad::Process | ( | const float * | pfIn, |
float * | pfOut, | ||
int | iNumSamples | ||
) |
Definition at line 38 of file Biquad.cpp.
References ProcessOne().
|
inline |
void Biquad::Reset | ( | ) |
Definition at line 30 of file Biquad.cpp.
References fPrevIn, fPrevOut, fPrevPrevIn, and fPrevPrevOut.
Referenced by Biquad().
double Biquad::fDenomCoeffs[2] |
Definition at line 53 of file Biquad.h.
Referenced by Biquad(), and CalcChebyshevType1Filter().
double Biquad::fNumerCoeffs[3] |
Definition at line 52 of file Biquad.h.
Referenced by Biquad(), and CalcChebyshevType1Filter().
|
static |
Definition at line 75 of file Biquad.h.
Referenced by ChebyPoly().