AttackReleaseSmoother

Same as ExpSmoother but have different attack and release decay factors.

Members

Functions

initialize
void initialize(float sampleRate, float timeAttackSecs, float timeReleaseSecs, 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.

setAttackTime
void setAttackTime(float timeAttackSecs)

Changes attack time (given in seconds).

setReleaseTime
void setReleaseTime(float timeReleaseSecs)

Changes release time (given in seconds).

Meta