JUCE  v5.4.1-191-g0ab5e696f
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>

Inheritance diagram for juce::dsp::StateVariableFilter::Parameters< NumericType >:
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...
 
enum  Type {
  Type::lowPass,
  Type::bandPass,
  Type::highPass
}
 

Public Member Functions

 Parameters ()=default
 
 Parameters (const Parameters &o)
 
void decReferenceCount () noexcept
 Decreases the object's reference count. More...
 
bool decReferenceCountWithoutDeleting () noexcept
 Decreases the object's reference count. More...
 
int getReferenceCount () const noexcept
 Returns the object's current reference count. More...
 
void incReferenceCount () noexcept
 Increments the object's reference count. More...
 
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...
 

Protected Member Functions

void resetReferenceCount () noexcept
 Resets the reference count to zero without deleting the object. More...
 

Detailed Description

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

Structure used for the state variable filter parameters.

{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.

Member Enumeration Documentation

◆ Type

template<typename NumericType>
enum juce::dsp::StateVariableFilter::Parameters::Type
strong
Enumerator
lowPass 
bandPass 
highPass 

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

◆ decReferenceCount()

void juce::ReferenceCountedObject::decReferenceCount ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will be deleted.

References jassert.

◆ decReferenceCountWithoutDeleting()

bool juce::ReferenceCountedObject::decReferenceCountWithoutDeleting ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will not be deleted, but this method will return true, allowing the caller to take care of deletion.

References jassert.

◆ getReferenceCount()

int juce::ReferenceCountedObject::getReferenceCount ( ) const
inlinenoexceptinherited

Returns the object's current reference count.

◆ incReferenceCount()

void juce::ReferenceCountedObject::incReferenceCount ( )
inlinenoexceptinherited

Increments the object's reference count.

This is done automatically by the smart pointer, but is public just in case it's needed for nefarious purposes.

◆ operator=()

template<typename NumericType>
Parameters& juce::dsp::StateVariableFilter::Parameters< NumericType >::operator= ( const Parameters< NumericType > &  o)
inlinenoexcept

◆ resetReferenceCount()

void juce::ReferenceCountedObject::resetReferenceCount ( )
inlineprotectednoexceptinherited

Resets the reference count to zero without deleting the object.

You should probably never need to use this!

◆ 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 jassert.

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

template<typename NumericType>
NumericType juce::dsp::StateVariableFilter::Parameters< NumericType >::R2 = static_cast<NumericType> (MathConstants<double>::sqrt2)

◆ 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: