OpenWareLaboratory
|
Public Member Functions | |
BiquadFilter () | |
BiquadFilter (float sr, float *coefs, float *ste, size_t sgs) | |
void | copyCoefficients (FloatArray newCoefficients) |
Copies coefficient values from an array. More... | |
void | copyState (FloatArray newState) |
Copies state values from an array. More... | |
FloatArray | getCoefficients () |
FilterStage | getFilterStage (size_t stage) |
float | getSampleRate () |
size_t | getStages () |
FloatArray | getState () |
void | process (float *input, float *output, size_t size) |
float | process (float input) |
void | process (FloatArray in) |
void | process (FloatArray in, FloatArray out) |
void | processAllPass (FloatArray in, FloatArray fc, float q, FloatArray out) |
void | processBandPass (FloatArray in, FloatArray fc, float q, FloatArray out) |
void | processHighPass (FloatArray in, FloatArray fc, float q, FloatArray out) |
void | processLowPass (FloatArray in, FloatArray fc, float q, FloatArray out) |
void | setAllPass (float fc, float q) |
void | setBandPass (float fc, float q) |
void | setCoefficients (FloatArray newCoefficients) |
Sets coefficients to point to a different set of values. More... | |
void | setHighPass (float fc, float q) |
void | setHighShelf (float fc, float gain) |
Configure a high shelf filter with variable gain. More... | |
void | setLowPass (float fc, float q) |
void | setLowShelf (float fc, float gain) |
Configure a low shelf filter with variable gain. More... | |
void | setNotch (float fc, float q) |
void | setPeak (float fc, float q, float gain) |
Configure a peaking filter with resonance and variable gain. More... | |
void | setSampleRate (float sr) |
void | setStages (size_t newStages) |
void | setState (FloatArray newState) |
Sets state to point to a different set of values. More... | |
virtual | ~BiquadFilter () |
Static Public Member Functions | |
static BiquadFilter * | create (float sr, size_t stages=1) |
static void | destroy (BiquadFilter *filter) |
static size_t | getCoefficientsPerStage () |
Protected Member Functions | |
void | copyCoefficients () |
void | init () |
Protected Attributes | |
float * | coefficients |
size_t | stages |
float * | state |
Definition at line 181 of file BiquadFilter.h.
|
inline |
Definition at line 215 of file BiquadFilter.h.
Referenced by create().
|
inline |
Definition at line 218 of file BiquadFilter.h.
References init().
|
inlinevirtual |
Definition at line 222 of file BiquadFilter.h.
|
inlineprotected |
Definition at line 201 of file BiquadFilter.h.
References BIQUAD_COEFFICIENTS_PER_STAGE, coefficients, and stages.
Referenced by copyCoefficients(), UpSampler::create(), DownSampler::create(), Resampler::init(), setAllPass(), setBandPass(), setHighPass(), setHighShelf(), setLowPass(), setLowShelf(), setNotch(), and setPeak().
|
inline |
Copies coefficient values from an array.
Definition at line 411 of file BiquadFilter.h.
References ASSERT, BIQUAD_COEFFICIENTS_PER_STAGE, copyCoefficients(), FilterStage::copyCoefficients(), getFilterStage(), and SimpleArray< T >::getSize().
|
inline |
Copies state values from an array.
Definition at line 263 of file BiquadFilter.h.
References ASSERT, BIQUAD_STATE_VARIABLES_PER_STAGE, SimpleArray< T >::copyFrom(), SimpleArray< T >::getSize(), getState(), and stages.
|
inlinestatic |
Definition at line 417 of file BiquadFilter.h.
References BIQUAD_COEFFICIENTS_PER_STAGE, BIQUAD_STATE_VARIABLES_PER_STAGE, BiquadFilter(), and stages.
Referenced by UpSampler::create(), DownSampler::create(), Resampler::init(), and ZeroCrossingPitchDetector::ZeroCrossingPitchDetector().
|
inlinestatic |
Definition at line 421 of file BiquadFilter.h.
References coefficients, and state.
Referenced by DownSampler::destroy(), UpSampler::destroy(), Resampler::~Resampler(), and ZeroCrossingPitchDetector::~ZeroCrossingPitchDetector().
|
inline |
Definition at line 244 of file BiquadFilter.h.
References BIQUAD_COEFFICIENTS_PER_STAGE, coefficients, and stages.
|
inlinestatic |
Definition at line 240 of file BiquadFilter.h.
References BIQUAD_COEFFICIENTS_PER_STAGE.
|
inline |
Definition at line 268 of file BiquadFilter.h.
References ASSERT, BIQUAD_COEFFICIENTS_PER_STAGE, BIQUAD_STATE_VARIABLES_PER_STAGE, coefficients, stages, and state.
Referenced by copyCoefficients(), and process().
|
inline |
Definition at line 228 of file BiquadFilter.h.
References M_PI.
|
inline |
Definition at line 232 of file BiquadFilter.h.
References stages.
|
inline |
Definition at line 248 of file BiquadFilter.h.
References BIQUAD_STATE_VARIABLES_PER_STAGE, stages, and state.
Referenced by copyState().
|
inlineprotected |
Definition at line 205 of file BiquadFilter.h.
References BIQUAD_STATE_VARIABLES_PER_STAGE, coefficients, stages, and state.
Referenced by BiquadFilter(), and setCoefficients().
|
inline |
Definition at line 276 of file BiquadFilter.h.
References BIQUAD_STATE_VARIABLES_PER_STAGE, FilterStage::getCoefficients(), getFilterStage(), stages, and state.
Referenced by Resampler::downsample(), MultiBiquadFilter::process(), UpSampler::process(), DownSampler::process(), process(), ZeroCrossingPitchDetector::process(), processAllPass(), processBandPass(), processHighPass(), processLowPass(), and Resampler::upsample().
|
inlinevirtual |
Reimplemented from SignalProcessor.
Definition at line 341 of file BiquadFilter.h.
References process().
|
inline |
Definition at line 303 of file BiquadFilter.h.
References SimpleArray< T >::getSize(), and process().
|
inlinevirtual |
Reimplemented from SignalProcessor.
Definition at line 307 of file BiquadFilter.h.
References ASSERT, SimpleArray< T >::getSize(), and process().
|
inline |
Definition at line 333 of file BiquadFilter.h.
References SimpleArray< T >::getSize(), process(), and setAllPass().
|
inline |
Definition at line 326 of file BiquadFilter.h.
References SimpleArray< T >::getSize(), process(), and setBandPass().
|
inline |
Definition at line 319 of file BiquadFilter.h.
References SimpleArray< T >::getSize(), process(), and setHighPass().
|
inline |
Definition at line 312 of file BiquadFilter.h.
References SimpleArray< T >::getSize(), process(), and setLowPass().
|
inline |
Definition at line 362 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setAllPass().
Referenced by processAllPass().
|
inline |
Definition at line 357 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setBandPass().
Referenced by processBandPass().
|
inline |
Sets coefficients to point to a different set of values.
Definition at line 402 of file BiquadFilter.h.
References ASSERT, BIQUAD_COEFFICIENTS_PER_STAGE, coefficients, SimpleArray< T >::getData(), SimpleArray< T >::getSize(), init(), and stages.
Referenced by MultiBiquadFilter::create(), and StereoBiquadFilter::create().
|
inline |
Definition at line 352 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setHighPass().
Referenced by processHighPass(), and ZeroCrossingPitchDetector::setHighPassCutoff().
|
inline |
Configure a high shelf filter with variable gain.
gain | in dB |
Definition at line 394 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setHighShelf().
|
inline |
Definition at line 347 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setLowPass().
Referenced by processLowPass(), and ZeroCrossingPitchDetector::setLowPassCutoff().
|
inline |
Configure a low shelf filter with variable gain.
gain | in dB |
Definition at line 385 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setLowShelf().
|
inline |
Definition at line 367 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setNotch().
|
inline |
Configure a peaking filter with resonance and variable gain.
gain | in dB |
Definition at line 376 of file BiquadFilter.h.
References coefficients, copyCoefficients(), and FilterStage::setPeak().
|
inline |
Definition at line 224 of file BiquadFilter.h.
References M_PI.
Referenced by MultiBiquadFilter::create(), and StereoBiquadFilter::create().
|
inline |
Definition at line 236 of file BiquadFilter.h.
References stages.
Referenced by MultiBiquadFilter::create(), and StereoBiquadFilter::create().
|
inline |
Sets state to point to a different set of values.
Definition at line 255 of file BiquadFilter.h.
References ASSERT, BIQUAD_STATE_VARIABLES_PER_STAGE, SimpleArray< T >::getData(), SimpleArray< T >::getSize(), stages, and state.
Referenced by MultiBiquadFilter::create(), and StereoBiquadFilter::create().
|
protected |
Definition at line 189 of file BiquadFilter.h.
Referenced by copyCoefficients(), MultiBiquadFilter::create(), StereoBiquadFilter::create(), destroy(), MultiBiquadFilter::destroy(), getCoefficients(), getFilterStage(), init(), setAllPass(), setBandPass(), setCoefficients(), setHighPass(), setHighShelf(), setLowPass(), setLowShelf(), setNotch(), and setPeak().
|
protected |
Definition at line 191 of file BiquadFilter.h.
Referenced by copyCoefficients(), copyState(), MultiBiquadFilter::create(), create(), StereoBiquadFilter::create(), getCoefficients(), getFilterStage(), getStages(), getState(), init(), process(), setCoefficients(), setStages(), and setState().
|
protected |
Definition at line 190 of file BiquadFilter.h.
Referenced by destroy(), MultiBiquadFilter::destroy(), getFilterStage(), getState(), init(), process(), and setState().