JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::dsp::StateVariableFilter::Parameters< NumericType > Struct Template Reference

Structure used for the state variable filter parameters. More...

#include <juce_StateVariableFilter.h>

Collaboration diagram for juce::dsp::StateVariableFilter::Parameters< NumericType >:

Public Types

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...
 
using Type = StateVariableFilterType
 

Public Member Functions

 Parameters ()=default
 
 Parameters (const Parameters &o)
 
Parametersoperator= (const Parameters &o) noexcept
 
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...
 

Public Attributes

NumericType g = static_cast<NumericType> (std::tan (MathConstants<double>::pi * 200.0 / 44100.0))
 
NumericType h = static_cast<NumericType> (1.0 / (1.0 + R2 * g + g * g))
 
NumericType R2 = static_cast<NumericType> (MathConstants<double>::sqrt2)
 
Type type = Type::lowPass
 The type of the IIR filter. More...
 

Detailed Description

template<typename NumericType>
struct juce::dsp::StateVariableFilter::Parameters< NumericType >

Structure used for the state variable filter parameters.

@tags{DSP}

Member Typedef Documentation

◆ Ptr

template<typename NumericType >
using juce::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.

◆ Type

template<typename NumericType >
using juce::dsp::StateVariableFilter::Parameters< NumericType >::Type = StateVariableFilterType

Constructor & Destructor Documentation

◆ Parameters() [1/2]

template<typename NumericType >
juce::dsp::StateVariableFilter::Parameters< NumericType >::Parameters ( )
default

◆ Parameters() [2/2]

template<typename NumericType >
juce::dsp::StateVariableFilter::Parameters< NumericType >::Parameters ( const Parameters< NumericType > &  o)
inline

Member Function Documentation

◆ operator=()

◆ setCutOffFrequency()

template<typename NumericType >
void juce::dsp::StateVariableFilter::Parameters< NumericType >::setCutOffFrequency ( double  sampleRate,
NumericType  frequency,
NumericType  resonance = static_cast<NumericType> (1.0 / MathConstants<double>::sqrt2) 
)
inlinenoexcept

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 juce::dsp::StateVariableFilter::Parameters< NumericType >::g, juce::dsp::StateVariableFilter::Parameters< NumericType >::h, jassert, juce::dsp::StateVariableFilter::Parameters< NumericType >::R2, and juce::Colours::tan.

Member Data Documentation

◆ g

template<typename NumericType >
NumericType juce::dsp::StateVariableFilter::Parameters< NumericType >::g = static_cast<NumericType> (std::tan (MathConstants<double>::pi * 200.0 / 44100.0))

◆ h

template<typename NumericType >
NumericType juce::dsp::StateVariableFilter::Parameters< NumericType >::h = static_cast<NumericType> (1.0 / (1.0 + R2 * g + g * g))

◆ R2

◆ type

template<typename NumericType >
Type juce::dsp::StateVariableFilter::Parameters< NumericType >::type = Type::lowPass

The type of the IIR filter.


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