Loading...
Searching...
No Matches
juce::dsp::StateVariableFilter::Parameters< NumericType > Struct Template Reference

## Detailed Description

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

Structure used for the state variable filter parameters.

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

- juce_dsp/processors/juce_StateVariableFilter.h

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

## Public Types

using | Type = StateVariableFilterType
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.
Public Types inherited from juce::dsp::ProcessorState
using | Ptr = ReferenceCountedObjectPtr<ProcessorState>
| The ProcessorState structure is ref-counted, so this is a handy type that can be used as a pointer to one.

## 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.
| Parameters ()=default
| Parameters (const Parameters &o)
Parameters & | operator= (const Parameters &o) noexcept
Public Member Functions inherited from juce::ReferenceCountedObject
void | incReferenceCount () noexcept
| Increments the object's reference count.
void | decReferenceCount () noexcept
| Decreases the object's reference count.
bool | decReferenceCountWithoutDeleting () noexcept
| Decreases the object's reference count.
int | getReferenceCount () const noexcept
| Returns the object's current reference count.

## Public Attributes

Type | type = Type::lowPass
| The type of the IIR filter.
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))

## Additional Inherited Members

Protected Member Functions inherited from juce::ReferenceCountedObject
| ReferenceCountedObject ()=default
| Creates the reference-counted object (with an initial ref count of zero).
| ReferenceCountedObject (const ReferenceCountedObject &) noexcept
| Copying from another object does not affect this one's reference-count.
| ReferenceCountedObject (ReferenceCountedObject &&) noexcept
| Copying from another object does not affect this one's reference-count.
ReferenceCountedObject & | operator= (const ReferenceCountedObject &) noexcept
| Copying from another object does not affect this one's reference-count.
ReferenceCountedObject & | operator= (ReferenceCountedObject &&) noexcept
| Copying from another object does not affect this one's reference-count.
virtual | ~ReferenceCountedObject ()
| Destructor.
void | resetReferenceCount () noexcept
| Resets the reference count to zero without deleting the object.

## Member Typedef Documentation

## Type

template<typename NumericType>

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

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

## Constructors and Destructors

## Parameters() [1/2]

template<typename NumericType>

juce::dsp::StateVariableFilter::Parameters< NumericType >::Parameters | ( |  | ) |

default

Referenced by operator=(), and Parameters().

## Parameters() [2/2]

template<typename NumericType>

juce::dsp::StateVariableFilter::Parameters< NumericType >::Parameters | ( | const Parameters< NumericType > & | o | ) |

inline

References g, h, Parameters(), and R2.

## Member Functions

## 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) )

inline 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 g, h, jassert, juce::MathConstants< FloatType >::pi, R2, and juce::MathConstants< FloatType >::sqrt2.

## operator=()

template<typename NumericType>

Parameters & juce::dsp::StateVariableFilter::Parameters< NumericType >::operator= | ( | const Parameters< NumericType > & | o | ) |

inline noexcept

References g, h, Parameters(), and R2.

## Member Data Documentation

## type

template<typename NumericType>

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

The type of the IIR filter.

## g

template<typename NumericType>

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

Referenced by operator=(), Parameters(), and setCutOffFrequency().

## R2

template<typename NumericType>

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

Referenced by operator=(), Parameters(), and setCutOffFrequency().

## h

template<typename NumericType>

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

Referenced by operator=(), Parameters(), and setCutOffFrequency().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited