FastLED 3.9.15
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)
 
float get (u16 i) const
 
void reset ()
 
u16 size () const
 
void trigger (float center, float width, float amplitude, BumpShape shape=BumpShape::HalfSine)
 Inject a shaped bump. Multiple triggers per frame accumulate additively.
 
void update (float dtSeconds)
 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: