|
DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
|
Linear ramp smoother for predictable, uniform interpolation. More...
#include <Smoothers.h>
Public Member Functions | |
| void | reset (double sampleRate, float rampTimeMilliseconds, float initialValue=0.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 |
| void | processBlock (float *buffer, int numSamples, bool multiply=false) noexcept |
| Block processing for SIMD optimization. | |
Static Public Attributes | |
| static constexpr float | epsilon = 1e-6f |
Linear ramp smoother for predictable, uniform interpolation.
Use for: Gains, mix/dry-wet, pans, or most faders where exact timing is needed.
Internal state is double precision (the public API stays float): a float accumulator rounded every step and drifted, so a 5 s ramp at 192 kHz ended with a 1.3% jump onto the target instead of its 1e-6 step.
Definition at line 59 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 68 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 403 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 69 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 420 of file Smoothers.h.
|
inlinenoexcept |
Block processing for SIMD optimization.
| buffer | Pointer to the audio block float array. |
| numSamples | Number of samples to process. |
| multiply | If true, acts as a gain multiplier (buffer[i] *= val). Otherwise, offsets (buffer[i] += val). |
Definition at line 432 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 383 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 412 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 392 of file Smoothers.h.
|
inlinenoexcept |
Definition at line 425 of file Smoothers.h.
|
staticconstexpr |
Definition at line 62 of file Smoothers.h.