FastLED 3.9.15
Loading...
Searching...
No Matches

◆ CalcAttackDecayFactor()

float Key::CalcAttackDecayFactor ( uint32_t delta_ms) const

Definition at line 47 of file Keyboard.cpp.

47 {
48 bool dampened_key = (idx_ < kFirstNoteNoDamp);
49 float active_lights_factor = ::CalcDecayFactor(
51 on_,
52 idx_,
54 dampened_key,
55 delta_ms);
56 return active_lights_factor;
57}
@ kFirstNoteNoDamp
Definition Keyboard.h:15
int idx_
Definition Keyboard.h:40
bool on_
Definition Keyboard.h:36
bool sustain_pedal_on_
Definition Keyboard.h:38
float VelocityFactor() const
Definition Keyboard.cpp:45
float CalcDecayFactor(bool sustain_pedal_on, bool key_on, int key_idx, float velocity, bool dampened_key, float time_elapsed_ms)
Definition util.cpp:70

References CalcDecayFactor(), idx_, kFirstNoteNoDamp, on_, sustain_pedal_on_, and VelocityFactor().

Referenced by UpdateIntensity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: