67 void reset(
double val = 0.0);
70 void calculateCoefficients();
74 double _coeffAttack = 1.0;
75 double _coeffRelease = 1.0;
77 double _currentValue = 0.0;
78 double _targetValue = 0.0;
Smoothed value tracking with separate attack/decay times.
Definition EnvelopeFollower.h:44
void setSampleRate(double)
Set the sample rate. This must be set before using the EnvelopeFollower.
Definition EnvelopeFollower.cpp:41
void setParams(const Params &)
Set the parameters. Will fall back on default values if not set.
Definition EnvelopeFollower.cpp:47
void setTargetValue(double)
Set the target.
Definition EnvelopeFollower.cpp:36
void reset(double val=0.0)
Reset both the current and target values to the specified value, or to zero if none is provided.
Definition EnvelopeFollower.cpp:53
auto getNextValue() -> double
Calculate the next value between the current value and the target.
Definition EnvelopeFollower.cpp:27
Parameters for EnvelopeFollower.
Definition EnvelopeFollower.h:48
double releaseTimeMilliseconds
release time in milliseconds
Definition EnvelopeFollower.h:50
double attackTimeMilliseconds
attack time in milliseconds
Definition EnvelopeFollower.h:49