Extended transposed form 2 Bi-Quad construct.
More...
#include <biquad.hpp>
|
| ExtBiQuad (void) |
| Default constructor.
|
|
void | flush (void) |
| Flush internal delays.
|
|
float | process_so (const float xn) |
| Second order processing of one sample. More...
|
|
float | process_fo (const float xn) |
| First order processing of one sample. More...
|
|
float | process (const float xn) |
| Default processing function (second order) More...
|
|
void | setFOAPLP (const float k) |
| Calculate coefficients for "invertable" all pass based low pass filter. More...
|
|
void | setFOAPHP (const float k) |
| Calculate coefficients for "invertable" all pass based high pass filter. More...
|
|
void | toggleFOLPHP (void) |
| Toggle "invertable" all pass based low/high pass filter to opposite mode.
|
|
void | updateFOLPHP (const float k) |
| Update "invertable" all pass based low/high pass filter coefficients. More...
|
|
void | setFOLS (const float k, const float gain) |
| Calculate coefficients for first order all pass based low shelf filter. More...
|
|
void | setFOHS (const float k, const float gain) |
| Calculate coefficients for first order all pass based high shelf filter. More...
|
|
void | setSOAPBR2 (const float delta, const float gamma) |
| Calculate coefficients for second order all pass based band reject filter. More...
|
|
void | setSOAPBP2 (const float delta, const float gamma) |
| Calculate coefficients for second order all pass based band pass filter. More...
|
|
void | setSOAPPN2 (const float delta, const float gamma, const float gain) |
| Calculate coefficients for second order all pass based peak/notch filter. More...
|
|
|
BiQuad::Coeffs | mCoeffs |
| Coefficients for the Bi-Quad construct.
|
|
float | mD0 |
|
float | mD1 |
|
float | mW0 |
|
float | mW1 |
|
float | mZ1 |
|
float | mZ2 |
|
Extended transposed form 2 Bi-Quad construct.
Definition at line 415 of file biquad.hpp.
◆ process()
float dsp::ExtBiQuad::process |
( |
const float |
xn | ) |
|
|
inline |
Default processing function (second order)
- Parameters
-
- Returns
- Output sample
Definition at line 487 of file biquad.hpp.
◆ process_fo()
float dsp::ExtBiQuad::process_fo |
( |
const float |
xn | ) |
|
|
inline |
First order processing of one sample.
- Parameters
-
- Returns
- Output sample
Definition at line 472 of file biquad.hpp.
473 float acc =
mCoeffs.ff0 * xn + mZ1;
476 return mW1 * (mW0 * acc + mD0 * xn) + mD1 * xn;
◆ process_so()
float dsp::ExtBiQuad::process_so |
( |
const float |
xn | ) |
|
|
inline |
Second order processing of one sample.
- Parameters
-
- Returns
- Output sample
Definition at line 455 of file biquad.hpp.
456 float acc =
mCoeffs.ff0 * xn + mZ1;
461 return mW1 * (mW0 * acc + mD0 * xn) + mD1 * xn;
◆ setFOAPHP()
void dsp::ExtBiQuad::setFOAPHP |
( |
const float |
k | ) |
|
|
inline |
Calculate coefficients for "invertable" all pass based high pass filter.
- Parameters
-
k | Tangent of PI x cutoff frequency in radians: tan(pi*wc) |
Definition at line 513 of file biquad.hpp.
◆ setFOAPLP()
void dsp::ExtBiQuad::setFOAPLP |
( |
const float |
k | ) |
|
|
inline |
Calculate coefficients for "invertable" all pass based low pass filter.
- Parameters
-
k | Tangent of PI x cutoff frequency in radians: tan(pi*wc) |
Definition at line 499 of file biquad.hpp.
◆ setFOHS()
void dsp::ExtBiQuad::setFOHS |
( |
const float |
k, |
|
|
const float |
gain |
|
) |
| |
|
inline |
Calculate coefficients for first order all pass based high shelf filter.
- Parameters
-
k | Tangent of PI x cutoff frequency in radians: tan(pi*wc) |
gain | 10^(gain_db/20) |
Definition at line 572 of file biquad.hpp.
575 const float h = gain - 1.f;
576 const float gk = (gain >= 1.f) ? k : gain*k;
◆ setFOLS()
void dsp::ExtBiQuad::setFOLS |
( |
const float |
k, |
|
|
const float |
gain |
|
) |
| |
|
inline |
Calculate coefficients for first order all pass based low shelf filter.
- Parameters
-
k | Tangent of PI x cutoff frequency in radians: tan(pi*wc) |
gain | 10^(gain_db/20) |
Definition at line 549 of file biquad.hpp.
552 const float h = gain - 1.f;
553 const float g = (gain >= 1.f) ? 1.f : gain;
◆ setSOAPBP2()
void dsp::ExtBiQuad::setSOAPBP2 |
( |
const float |
delta, |
|
|
const float |
gamma |
|
) |
| |
|
inline |
Calculate coefficients for second order all pass based band pass filter.
- Parameters
-
delta | cos(2pi*wc) |
gamma | tan(pi * wb) |
- Note
- q is inverse of relative bandwidth (wc / wb)
Definition at line 621 of file biquad.hpp.
◆ setSOAPBR2()
void dsp::ExtBiQuad::setSOAPBR2 |
( |
const float |
delta, |
|
|
const float |
gamma |
|
) |
| |
|
inline |
Calculate coefficients for second order all pass based band reject filter.
- Parameters
-
delta | cos(2pi*wc) |
gamma | tan(pi * wb) |
- Note
- q is inverse of relative bandwidth (wc / wb)
Definition at line 600 of file biquad.hpp.
◆ setSOAPPN2()
void dsp::ExtBiQuad::setSOAPPN2 |
( |
const float |
delta, |
|
|
const float |
gamma, |
|
|
const float |
gain |
|
) |
| |
|
inline |
Calculate coefficients for second order all pass based peak/notch filter.
- Parameters
-
delta | cos(2pi*wc) |
gamma | tan(pi * wb) |
gain | 10^(gain_db/20) |
- Note
- q is inverse of relative bandwidth (wc / wb)
Definition at line 644 of file biquad.hpp.
648 const float h = gain - 1.f;
649 const float g = (gain >= 1.f) ? 1.f : gain;
651 const float c = (gamma - g) / (gamma + g);
652 const float d = -delta;
◆ updateFOLPHP()
void dsp::ExtBiQuad::updateFOLPHP |
( |
const float |
k | ) |
|
|
inline |
Update "invertable" all pass based low/high pass filter coefficients.
Agnostic from current mode.
- Parameters
-
k | Tangent of PI x cutoff frequency in radians: tan(pi*wc) |
Definition at line 536 of file biquad.hpp.
The documentation for this struct was generated from the following file:
- /home/etienne/Documents/_projects/logue-sdk/logue-sdk-alt/platform/nutekt-digital/inc/dsp/biquad.hpp