FastLED 3.10.8
Loading...
Searching...
No Matches
fl::NoiseBias1D Class Reference

Detailed Description

Per-position attack/decay bias for one axis.

Each position has an independent AttackDecayFilter<float>. On a trigger frame the filter input is the shaped amplitude (fast attack). On subsequent frames the input is 0 (slow decay back to baseline).

Definition at line 33 of file flowfield.h.

#include <flowfield.h>

+ Collaboration diagram for fl::NoiseBias1D:

Public Member Functions

 NoiseBias1D (u16 size, float attackTau, float decayTau) FL_NO_EXCEPT
 
float get (u16 i) const FL_NO_EXCEPT
 
void reset () FL_NO_EXCEPT
 
u16 size () const FL_NO_EXCEPT
 
void trigger (float center, float width, float amplitude, BumpShape shape=BumpShape::HalfSine) FL_NO_EXCEPT
 Inject a shaped bump. Multiple triggers per frame accumulate additively.
 
void update (float dtSeconds) FL_NO_EXCEPT
 Advance all filters by dt seconds.
 

Private Attributes

fl::vector< AttackDecayFilter< float > > mFilters
 
fl::vector< float > mPending
 
u16 mSize
 

The documentation for this class was generated from the following file: