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

◆ CalcAttackDecayFactor()

float Key::CalcAttackDecayFactor ( uint32_t delta_ms) const

Definition at line 45 of file Keyboard.cpp.

45 {
46 bool dampened_key = (idx_ < kFirstNoteNoDamp);
47 float active_lights_factor = ::CalcDecayFactor(
49 on_,
50 idx_,
52 dampened_key,
53 delta_ms);
54 return active_lights_factor;
55}
@ 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:43
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: