MCPcopy Create free account
hub / github.com/FastLED/FastLED / CalcAttackDecayFactor

Method CalcAttackDecayFactor

examples/LuminescentGrand/shared/Keyboard.cpp:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44float Key::VelocityFactor() const { return mVelocity / 127.f; }
45
46float Key::CalcAttackDecayFactor(uint32_t delta_ms) const {
47 bool dampened_key = (mIdx < kFirstNoteNoDamp);
48 float active_lights_factor = ::CalcDecayFactor(
49 mSustainPedalOn,
50 mOn,
51 mIdx,
52 VelocityFactor(),
53 dampened_key,
54 delta_ms);
55 return active_lights_factor;
56}
57
58float Key::AttackRemapFactor(uint32_t now_ms) {
59 if (mOn) {

Callers

nothing calls this directly

Calls 1

CalcDecayFactorFunction · 0.85

Tested by

no test coverage detected