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

◆ HandleNoteOff()

void KeyboardState::HandleNoteOff ( uint8_t midi_note,
uint8_t velocity,
uint32_t now_ms )

Definition at line 148 of file Keyboard.cpp.

148 {
149#ifdef DEBUG_KEYBOARD
150 dprint("HandleNoteOff:");
151
152 dprint("midi_note = ");
153 dprint(midi_note);
154
155 dprint(", velocity = ");
156 dprintln(velocity);
157#endif
158
159 Key* key = GetKey(midi_note);
160
161 if (mSustainPedal) {
162 key->SetSustained();
163 } else {
164 key->SetOff(now_ms);
165 }
166}
Key * GetKey(int midi_pitch)
Definition Keyboard.cpp:209
bool mSustainPedal
Definition Keyboard.h:102
#define dprint(x)
Definition dprint.h:13
#define dprintln(x)
Definition dprint.h:14
void SetOff(uint32_t now_ms)
Definition Keyboard.cpp:24
void SetSustained()
Definition Keyboard.cpp:31

References dprint, dprintln, GetKey(), mSustainPedal, Key::SetOff(), and Key::SetSustained().

Referenced by HandleNoteOn().

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