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 149 of file Keyboard.cpp.

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

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

Referenced by HandleNoteOn().

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