ExpSmoother

Smooth values exponentially with a 1-pole lowpass. This is usually sufficient for most parameter smoothing.

Members

Functions

initialize
void initialize(float samplerate, float timeAttackRelease, T initialValue)

time: the time constant of the smoother. threshold: absolute difference below which we consider current value and target equal

nextSample
T nextSample(T target)

Advance smoothing and return the next smoothed sample with respect to tau time and samplerate.

setAttackReleaseTime
void setAttackReleaseTime(float timeAttackRelease)

Changes attack and release time (given in seconds).

Meta