Sample-accurate, block-size-independent control smoothing with independent attack/release time constants and value domains. More...
#include <cassert>#include <cmath>Go to the source code of this file.
Classes | |
| class | pulp::signal::LatencyAwareControlSmoother |
| struct | pulp::signal::LatencyAwareControlSmoother::Config |
Namespaces | |
| namespace | pulp |
| namespace | pulp::signal |
Sample-accurate, block-size-independent control smoothing with independent attack/release time constants and value domains.
Complements SmoothedValue (fixed-length linear ramp): this smoother is a one-pole exponential with closed-form evaluation, so a processor can read the control value at any sample offset inside a block (value_at) — e.g. at spectral frame centers — and advance state in one call per block (advance). Closed-form advancement makes the trajectory exactly independent of how the stream is chopped into blocks.
The "latency-aware" part: value_at accepts negative offsets, so a caller can evaluate the control trajectory latency_samples behind the current position and keep a UI-visible value aligned with the audibly delayed output.
One-pole smoothing per J. O. Smith III, Introduction to Digital Filters (W3K); time constants are caller-chosen ramp times, never transcribed from any reference product.