|
JUCE
|
Structure used for the state variable filter parameters. More...
Public Types | |
| enum | Type { Type::lowPass, Type::bandPass, Type::highPass } |
| using | Ptr = ReferenceCountedObjectPtr< Parameters > |
| The Coefficients structure is ref-counted, so this is a handy type that can be used as a pointer to one. More... | |
Public Member Functions | |
| void | setCutOffFrequency (double sampleRate, NumericType frequency, NumericType resonance=static_cast< NumericType >(1.0/MathConstants< double >::sqrt2)) noexcept |
| Sets the cutoff frequency and resonance of the IIR filter. More... | |
| Parameters ()=default | |
| Parameters (const Parameters &o) | |
| Parameters & | operator= (const Parameters &o) noexcept |
Public Attributes | |
| Type | type = Type::lowPass |
| The type of the IIR filter. More... | |
| NumericType | g = static_cast<NumericType> (std::tan (MathConstants<double>::pi * 200.0 / 44100.0)) |
| NumericType | R2 = static_cast<NumericType> (MathConstants<double>::sqrt2) |
| NumericType | h = static_cast<NumericType> (1.0 / (1.0 + R2 * g + g * g)) |
Structure used for the state variable filter parameters.
| using dsp::StateVariableFilter::Parameters< NumericType >::Ptr = ReferenceCountedObjectPtr<Parameters> |
The Coefficients structure is ref-counted, so this is a handy type that can be used as a pointer to one.
|
strong |
|
default |
| dsp::StateVariableFilter::Parameters< NumericType >::Parameters | ( | const Parameters< NumericType > & | o | ) |
|
noexcept |
Sets the cutoff frequency and resonance of the IIR filter.
Note: The bandwidth of the resonance increases with the value of the parameter. To have a standard 12 dB/octave filter, the value must be set at 1 / sqrt(2).
References dsp::StateVariableFilter::Parameters< NumericType >::g, dsp::StateVariableFilter::Parameters< NumericType >::h, jassert, dsp::StateVariableFilter::Parameters< NumericType >::R2, and Colours::tan.
|
noexcept |
| Type dsp::StateVariableFilter::Parameters< NumericType >::type = Type::lowPass |
The type of the IIR filter.
| NumericType dsp::StateVariableFilter::Parameters< NumericType >::g = static_cast<NumericType> (std::tan (MathConstants<double>::pi * 200.0 / 44100.0)) |
| NumericType dsp::StateVariableFilter::Parameters< NumericType >::R2 = static_cast<NumericType> (MathConstants<double>::sqrt2) |
| NumericType dsp::StateVariableFilter::Parameters< NumericType >::h = static_cast<NumericType> (1.0 / (1.0 + R2 * g + g * g)) |
1.8.17