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

Butterworth low-pass smoother for maximally flat response. More...

#include <Smoothers.h>

Public Member Functions

void reset (double sampleRate, float timeConstantMilliseconds, 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
 

Static Public Attributes

static constexpr float epsilon = 1e-6f
 

Detailed Description

Butterworth low-pass smoother for maximally flat response.

Internal state is double precision. This is not optional here: smoothing time constants put the cutoff a few Hz above DC, where the TDF-II biquad has b0 ~ 1e-8; in float the state recursion loses the tiny increments to rounding and the step response stalls far short of the target. The public API stays float.

Definition at line 285 of file Smoothers.h.

Member Function Documentation

◆ getCurrentValue()

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

Definition at line 294 of file Smoothers.h.

◆ getNextValue()

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

Definition at line 734 of file Smoothers.h.

◆ getTargetValue()

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

Definition at line 295 of file Smoothers.h.

◆ isSmoothing()

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

Definition at line 748 of file Smoothers.h.

◆ reset()

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

Definition at line 689 of file Smoothers.h.

◆ setTargetValue()

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

Definition at line 729 of file Smoothers.h.

◆ skip()

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

Definition at line 760 of file Smoothers.h.

Member Data Documentation

◆ epsilon

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

Definition at line 288 of file Smoothers.h.


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