8#ifndef SBL_DSP_PRIMITIVES_SMOOTHED_PORT_HPP_
9#define SBL_DSP_PRIMITIVES_SMOOTHED_PORT_HPP_
26 float target()
const {
return target_; }
34 float value()
const {
return value_; }
38 smoother_.
reset(target_);
void reset()
Reset to zero.
void set_time_ms(float ms, float rate_hz)
Compute coefficient from settling time in milliseconds.
float process_steps(float target, uint32_t n)
Advance n steps toward target in one call.
void set(float target)
The port's setter stores here; nothing moves until advance().
void set_time_ms(float ms, float rate_hz)
Settling time, at the rate the smoother is advanced at (per sample here).
void reset()
Snap to the target: what reset() does, so ports start where they were set.
float advance(uint16_t n)
Advance by a block: the smoothed value to apply for this block.
Stateful, single-concern building blocks.
One-pole parameter smoother.