VCV Rack API v2
Loading...
Searching...
No Matches
rack::dsp::TBiquadFilter< T > Struct Template Reference

#include <filter.hpp>

Inheritance diagram for rack::dsp::TBiquadFilter< T >:
[legend]
Collaboration diagram for rack::dsp::TBiquadFilter< T >:
[legend]

Public Types

enum  Type {
  LOWPASS_1POLE , HIGHPASS_1POLE , LOWPASS , HIGHPASS ,
  LOWSHELF , HIGHSHELF , BANDPASS , PEAK ,
  NOTCH , NUM_TYPES
}
 

Public Member Functions

 TBiquadFilter ()
 
void setParameters (Type type, float f, float Q, float V)
 Calculates and sets the biquad transfer function coefficients.
 
- Public Member Functions inherited from rack::dsp::IIRFilter< 3, 3, float >
 IIRFilter ()
 
void reset ()
 
void setCoefficients (const float *b, const float *a)
 
float process (float in)
 
std::complex< float > getTransferFunction (float s)
 Computes the complex transfer function $H(s)$ at a particular frequency s: normalized angular frequency equal to $2 \pi f / f_{sr}$ ($\pi$ is the Nyquist frequency)
 
float getFrequencyResponse (float f)
 
float getFrequencyPhase (float f)
 

Additional Inherited Members

- Public Attributes inherited from rack::dsp::IIRFilter< 3, 3, float >
float b [B_ORDER]
 transfer function numerator coefficients: b_0, b_1, etc.
 
float a [A_ORDER - 1]
 transfer function denominator coefficients: a_1, a_2, etc.
 
float x [B_ORDER - 1]
 input state x[0] = x_{n-1} x[1] = x_{n-2} etc.
 
float y [A_ORDER - 1]
 output state
 

Member Enumeration Documentation

◆ Type

template<typename T = float>
enum rack::dsp::TBiquadFilter::Type
Enumerator
LOWPASS_1POLE 
HIGHPASS_1POLE 
LOWPASS 
HIGHPASS 
LOWSHELF 
HIGHSHELF 
BANDPASS 
PEAK 
NOTCH 
NUM_TYPES 

Constructor & Destructor Documentation

◆ TBiquadFilter()

template<typename T = float>
rack::dsp::TBiquadFilter< T >::TBiquadFilter ( )
inline

Member Function Documentation

◆ setParameters()

template<typename T = float>
void rack::dsp::TBiquadFilter< T >::setParameters ( Type type,
float f,
float Q,
float V )
inline

Calculates and sets the biquad transfer function coefficients.

f: normalized frequency (cutoff frequency / sample rate), must be less than 0.5 Q: quality factor V: gain


The documentation for this struct was generated from the following file: