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

◆ CalcAttackDecayFactor()

float Key::CalcAttackDecayFactor ( uint32_t delta_ms) const

Definition at line 46 of file Keyboard.cpp.

46 {
47 bool dampened_key = (mIdx < kFirstNoteNoDamp);
48 float active_lights_factor = ::CalcDecayFactor(
50 mOn,
51 mIdx,
53 dampened_key,
54 delta_ms);
55 return active_lights_factor;
56}
@ kFirstNoteNoDamp
Definition Keyboard.h:15
bool mOn
Definition Keyboard.h:36
bool mSustainPedalOn
Definition Keyboard.h:38
int mIdx
Definition Keyboard.h:40
float VelocityFactor() const
Definition Keyboard.cpp:44
float CalcDecayFactor(bool sustain_pedal_on, bool key_on, int key_idx, float velocity, bool dampened_key, float time_elapsed_ms)
Definition util.cpp:71

References CalcDecayFactor(), kFirstNoteNoDamp, mIdx, mOn, mSustainPedalOn, and VelocityFactor().

Referenced by UpdateIntensity().

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