|
| static BiquadCoeffs | makeLowPass (double sampleRate, double freq, double Q=0.7071067811865476) noexcept |
| | Low-pass filter.
|
| |
| static BiquadCoeffs | makeHighPass (double sampleRate, double freq, double Q=0.7071067811865476) noexcept |
| | High-pass filter.
|
| |
| static BiquadCoeffs | makeBandPass (double sampleRate, double freq, double Q=0.7071067811865476) noexcept |
| | Band-pass filter (constant 0 dB peak gain).
|
| |
| static BiquadCoeffs | makePeak (double sampleRate, double freq, double Q, double gainDb) noexcept |
| | Peak (parametric EQ) filter.
|
| |
| static BiquadCoeffs | makePeakMatched (double sampleRate, double freq, double Q, double gainDb) noexcept |
| | Peaking filter with prescribed Nyquist gain (Orfanidis design).
|
| |
| static BiquadCoeffs | makeLowShelf (double sampleRate, double freq, double gainDb, double slope=1.0) noexcept |
| | Low-shelf filter.
|
| |
| static BiquadCoeffs | makeHighShelf (double sampleRate, double freq, double gainDb, double slope=1.0) noexcept |
| | High-shelf filter.
|
| |
| static BiquadCoeffs | makeNotch (double sampleRate, double freq, double Q=0.7071067811865476) noexcept |
| | Notch (band-reject) filter.
|
| |
| static BiquadCoeffs | makeAllPass (double sampleRate, double freq, double Q=0.7071067811865476) noexcept |
| | All-pass filter.
|
| |
| static BiquadCoeffs | makeFirstOrderLowPass (double sampleRate, double frequency) noexcept |
| | First-order (6 dB/oct) low-pass filter.
|
| |
| static BiquadCoeffs | makeFirstOrderHighPass (double sampleRate, double frequency) noexcept |
| | First-order (6 dB/oct) high-pass filter.
|
| |
| static BiquadCoeffs | makeTilt (double sampleRate, double pivotFreq, double gainDb) noexcept |
| | Creates a first-order tilt filter.
|
| |
Stores normalised biquad coefficients (b0, b1, b2, a1, a2), always double.
Coefficients are pre-normalised by a0 in every factory method, so the filter processing loop never needs to divide by a0. Memory is aligned to 32 bytes to facilitate explicit SIMD vectorisation and CPU cache optimal loads.
All factory methods clamp frequency, Q and slope to safe ranges, so any finite parameter combination yields a stable filter. NaN parameters are not sanitised (they propagate into the coefficients), and the sample rate is trusted as-is: the framework contract is a valid AudioSpec upstream.
There is no float instantiation and no coefficient type parameter: a corner far below the sample rate is exact as a DESIGN but cannot be REALISED in float (see the
Definition at line 90 of file Biquad.h.
| static BiquadCoeffs dspark::BiquadCoeffs::makePeakMatched |
( |
double |
sampleRate, |
|
|
double |
freq, |
|
|
double |
Q, |
|
|
double |
gainDb |
|
) |
| |
|
inlinestaticnoexcept |
Peaking filter with prescribed Nyquist gain (Orfanidis design).
The bilinear (cookbook) peaking filter cramps near Nyquist: high- frequency bells get narrower and their response is pinned at fs/2, deviating audibly from the analog prototype above ~fs/6. This design (Orfanidis, JAES 45(6), 1997) prescribes the digital gain at Nyquist to equal the ANALOG prototype's gain there, matching the analog bell shape across the band: the standard "de-cramped" EQ used by state-of-the-art digital equalizers.
Falls back to identity for |gain| < 0.01 dB. At low frequencies it converges to the cookbook response (as it should).
- Parameters
-
| sampleRate | Sample rate in Hz. |
| freq | Center frequency in Hz. |
| Q | Quality factor (bandwidth = freq / Q). |
| gainDb | Peak gain in decibels. |
Definition at line 223 of file Biquad.h.