DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
dspark::Smoothers::StateVariableSmoother Class Reference

Second-order state variable filter (SVF) smoother (TPT implementation). More...

#include <Smoothers.h>

Inheritance diagram for dspark::Smoothers::StateVariableSmoother:

Public Member Functions

void reset (double sampleRate, float timeConstantMilliseconds, float q=0.707f, float initialValue=0.0f) noexcept
 
void setTargetValue (float newTarget) noexcept
 
float getNextValue () noexcept
 
float getCurrentValue () const noexcept
 
float getTargetValue () const noexcept
 
bool isSmoothing () const noexcept
 
void skip () noexcept
 
float getBandPassOutput () const noexcept
 
float getHighPassOutput () const noexcept
 

Static Public Attributes

static constexpr float epsilon = 1e-6f
 

Detailed Description

Second-order state variable filter (SVF) smoother (TPT implementation).

Internal state is double precision: smoothing time constants put the cutoff a few Hz above DC, where g = tan(pi*fc/fs) is ~1e-4 and float recursion stalls several 1e-5 short of the target (the settle check would then never fire). The public API stays float.

Definition at line 244 of file Smoothers.h.

Member Function Documentation

◆ getBandPassOutput()

float dspark::Smoothers::StateVariableSmoother::getBandPassOutput ( ) const
inlinenoexcept

Definition at line 258 of file Smoothers.h.

◆ getCurrentValue()

float dspark::Smoothers::StateVariableSmoother::getCurrentValue ( ) const
inlinenoexcept

Definition at line 253 of file Smoothers.h.

◆ getHighPassOutput()

float dspark::Smoothers::StateVariableSmoother::getHighPassOutput ( ) const
inlinenoexcept

Definition at line 259 of file Smoothers.h.

◆ getNextValue()

float dspark::Smoothers::StateVariableSmoother::getNextValue ( )
inlinenoexcept

Definition at line 650 of file Smoothers.h.

◆ getTargetValue()

float dspark::Smoothers::StateVariableSmoother::getTargetValue ( ) const
inlinenoexcept

Definition at line 254 of file Smoothers.h.

◆ isSmoothing()

bool dspark::Smoothers::StateVariableSmoother::isSmoothing ( ) const
inlinenoexcept

Definition at line 668 of file Smoothers.h.

◆ reset()

void dspark::Smoothers::StateVariableSmoother::reset ( double  sampleRate,
float  timeConstantMilliseconds,
float  q = 0.707f,
float  initialValue = 0.0f 
)
inlinenoexcept

Definition at line 618 of file Smoothers.h.

◆ setTargetValue()

void dspark::Smoothers::StateVariableSmoother::setTargetValue ( float  newTarget)
inlinenoexcept

Definition at line 645 of file Smoothers.h.

◆ skip()

void dspark::Smoothers::StateVariableSmoother::skip ( )
inlinenoexcept

Definition at line 678 of file Smoothers.h.

Member Data Documentation

◆ epsilon

constexpr float dspark::Smoothers::StateVariableSmoother::epsilon = 1e-6f
staticconstexpr

Definition at line 247 of file Smoothers.h.


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