|
DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
|
Exponential (multiplicative) smoother for natural, perceptual responses. More...
#include <Smoothers.h>
Public Member Functions | |
| void | reset (double sampleRate, float timeConstantMilliseconds, float initialValue=1.0f) noexcept |
| void | setTargetValue (float newTarget) noexcept |
| float | getNextValue () noexcept |
| float | getCurrentValue () const noexcept |
| float | getTargetValue () const noexcept |
| void | setCurrentAndTargetValue (float value) noexcept |
| bool | isSmoothing () const noexcept |
| void | skip () noexcept |
Static Public Attributes | |
| static constexpr float | epsilon = 1e-10f |
Exponential (multiplicative) smoother for natural, perceptual responses.
Use for: Filter cutoffs, frequencies, volumes in dB.
Internal state and coefficient are double precision (the public API stays float). In float the per-step coefficient rounds by up to 1e-7, a large fraction of log(ratio)/steps for long ramps: a delay time smoothed from 96000 to 91200 samples over 200 ms (Delay's default smoother) ended with a 19.8-sample jump instead of its 0.5-sample step.
Definition at line 110 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 119 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 500 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 120 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 517 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 461 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 509 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 470 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 522 of file Smoothers.h.
|
staticconstexpr |
Definition at line 113 of file Smoothers.h.