JUCE  v5.1.1-3-g1a0b28c73
JUCE API
StateVariableFilter::Parameters< NumericType > Struct Template Reference

#include <juce_StateVariableFilter.h>

Inheritance diagram for StateVariableFilter::Parameters< NumericType >:
Collaboration diagram for 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/std::sqrt(2.0))) noexcept
 Sets the cutoff frequency and resonance of the IIR filter. More...
 

Public Attributes

NumericType g = static_cast<NumericType> (std::tan (double_Pi * 200.0 / 44100.0))
 
NumericType h = static_cast<NumericType> (1.0 / (1.0 + R2 * g + g * g))
 
NumericType R2 = static_cast<NumericType> (std::sqrt (2.0))
 
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...
 

Member Typedef Documentation

◆ Ptr

template<typename NumericType>
using 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 StateVariableFilter::Parameters::Type
strong
Enumerator
lowPass 
bandPass 
highPass 

Constructor & Destructor Documentation

◆ Parameters() [1/2]

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

◆ Parameters() [2/2]

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

Member Function Documentation

◆ decReferenceCount()

void ReferenceCountedObject::decReferenceCount ( )
inlinenoexceptinherited

Decreases the object's reference count.

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

References jassert.

◆ decReferenceCountWithoutDeleting()

bool 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 ReferenceCountedObject::getReferenceCount ( ) const
inlinenoexceptinherited

Returns the object's current reference count.

◆ incReferenceCount()

void 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& StateVariableFilter::Parameters< NumericType >::operator= ( const Parameters< NumericType > &  o)
inlinenoexcept

◆ resetReferenceCount()

void 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 StateVariableFilter::Parameters< NumericType >::setCutOffFrequency ( double  sampleRate,
NumericType  frequency,
NumericType  resonance = static_cast<NumericType> (1.0 / std::sqrt (2.0)) 
)
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 double_Pi.

Member Data Documentation

◆ g

template<typename NumericType>
NumericType StateVariableFilter::Parameters< NumericType >::g = static_cast<NumericType> (std::tan (double_Pi * 200.0 / 44100.0))

◆ h

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

◆ R2

template<typename NumericType>
NumericType StateVariableFilter::Parameters< NumericType >::R2 = static_cast<NumericType> (std::sqrt (2.0))

◆ type

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

The type of the IIR filter.


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