The Biquad object implements a first or second order H(z) transfer function using one of four standard structures: Direct, Canonical, Transpose Direct, Transpose Canonical.
More...
#include <fxobjects.h>
The Biquad object implements a first or second order H(z) transfer function using one of four standard structures: Direct, Canonical, Transpose Direct, Transpose Canonical.
Audio I/O:
- Processes mono input to mono output.
Control I/F:
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2018 / 09 / 7
◆ canProcessAudioFrame()
virtual bool Biquad::canProcessAudioFrame |
( |
| ) |
|
|
inlinevirtual |
◆ getCoefficients()
double * Biquad::getCoefficients |
( |
| ) |
|
|
inline |
get the coefficient array for read/write access to the array (not used in current objects)
◆ getG_value()
double Biquad::getG_value |
( |
| ) |
|
|
inline |
get the structure G (gain) value for Harma filters; see 2nd Ed FX book
◆ getParameters()
get parameters: note use of custom structure for passing param data
- Returns
- BiquadParameters custom data structure
◆ getS_value()
double Biquad::getS_value |
( |
| ) |
|
returns the storage component S(n) for delay-free loop solutions
get the structure S (storage) value for Harma filters; see 2nd Ed FX book
- NOTES:
the storageComponent or "S" value is used for Zavalishin's VA filters as well as the phaser APFs (Biquad) and is only available on two of the forms: direct and transposed canonical
- Returns
- the storage component of the filter
◆ getStateArray()
double * Biquad::getStateArray |
( |
| ) |
|
|
inline |
get the state array for read/write access to the array (used only in direct form oscillator)
◆ processAudioSample()
double Biquad::processAudioSample |
( |
double |
xn | ) |
|
|
virtual |
process one sample through the biquad
process input x(n) through biquad to produce return value y(n)
- Parameters
-
- Returns
- the processed sample
- RULES:
1) do all math required to form the output y(n), reading registers as required - do NOT write registers
2) check for underflow, which can happen with feedback structures
3) lastly, update the states of the z^-1 registers in the state array just before returning
- NOTES:
the storageComponent or "S" value is used for Zavalishin's VA filters and is only available on two of the forms: direct and transposed canonical
- Parameters
-
- Returns
- the biquad processed output y(n)
Implements IAudioSignalProcessor.
◆ reset()
virtual bool Biquad::reset |
( |
double |
_sampleRate | ) |
|
|
inlinevirtual |
reset: clear out the state array (flush delays); can safely ignore sampleRate argument - we don't need/use it
Implements IAudioSignalProcessor.
◆ setCoefficients()
void Biquad::setCoefficients |
( |
double * |
coeffs | ) |
|
|
inline |
set the coefficient array NOTE: passing by pointer to array; allows us to use "array notation" with pointers i.e. [ ]
◆ setParameters()
set parameters: note use of custom structure for passing param data
- Parameters
-
◆ coeffArray
double Biquad::coeffArray[numCoeffs] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } |
|
protected |
◆ parameters
type of calculation (algorithm structure)
◆ stateArray
double Biquad::stateArray[numStates] = { 0.0, 0.0, 0.0, 0.0 } |
|
protected |
array of state (z^-1) registers
◆ storageComponent
double Biquad::storageComponent = 0.0 |
|
protected |
for Harma loop resolution
The documentation for this class was generated from the following files: