Skip to content

Commit

Permalink
Added all note off CC for Note and Performance app
Browse files Browse the repository at this point in the history
  • Loading branch information
203Null committed Dec 2, 2024
1 parent 7a8b732 commit 5690cae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions applications/Note/NotePad.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,8 @@ class NotePad : public UIComponent {
activeNotes.reserve(8);
GenerateKeymap();
}

~NotePad() {
MatrixOS::MIDI::Send(MidiPacket(0, ControlChange, config->channel, 123, 0)); // All notes off
}
};
2 changes: 2 additions & 0 deletions applications/Performance/8x8/Performance8x8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,10 @@ void Performance::IDKeyEvent(uint16_t keyID, KeyInfo* keyInfo) {
if (keyID == 0 && keyInfo->state == (menuLock ? HOLD : PRESSED))
{
MatrixOS::MIDI::Send(MidiPacket(MIDI_PORT_ALL, ControlChange, 0, 121, 127));
MatrixOS::MIDI::Send(MidiPacket(0, ControlChange, 0, 123, 0)); // All notes off
ActionMenu();
MatrixOS::MIDI::Send(MidiPacket(MIDI_PORT_ALL, ControlChange, 0, 121, 0)); // For Apollo Clearing
MatrixOS::MIDI::Send(MidiPacket(0, ControlChange, 0, 123, 0)); // All notes off
}
}

Expand Down

0 comments on commit 5690cae

Please sign in to comment.