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

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

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: