24 void SetOn(uint8_t vel,
const ColorHSV& color, uint32_t now_ms);
25 void SetOff(uint32_t now_ms);
28 void Update(uint32_t now_ms, uint32_t delta_ms,
bool sustain_pedal_on);
30 float VelocityFactor()
const;
31 float CalcAttackDecayFactor(uint32_t delta_ms)
const;
32 float AttackRemapFactor(uint32_t now_ms);
33 float IntensityFactor()
const;
34 void UpdateIntensity(uint32_t now_ms, uint32_t delta_ms);
38 bool sustain_pedal_on_;
41 unsigned long event_time_;
66 void Update(uint32_t now_ms, uint32_t delta_ms);
75 void HandleNoteOn(uint8_t midi_note, uint8_t velocity,
int color_selector_value, uint32_t now_ms);
83 void HandleNoteOff(uint8_t midi_note, uint8_t velocity, uint32_t now_ms);
89 void HandleAfterTouchPoly(uint8_t note, uint8_t pressure);
94 void HandleControlChange(uint8_t d1, uint8_t d2);
97 static uint8_t KeyIndex(
int midi_pitch);
99 Key* GetKey(
int midi_pitch);
101 static const int kNumKeys = 88;