FastLED 3.9.15
|
Tracks a smoothed peak with attack, decay, and output-inertia time-constants.
#include <fx.h>
Public Member Functions | |
MaxFadeTracker (float attackTimeSec, float decayTimeSec, float outputTimeSec, float sampleRate) | |
float | operator() (const int16_t *samples, size_t length) |
Process one 512-sample block; returns [0…1] with inertia. | |
void | setAttackTime (float t) |
void | setDecayTime (float t) |
void | setOutputTime (float t) |
Private Attributes | |
float | attackRate_ |
float | currentLevel_ |
float | decayRate_ |
float | outputRate_ |
float | sampleRate_ |
float | smoothedOutput_ |