feat: add MIDI CC 120/121 for independent A/B slot preset loading #266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds dedicated MIDI CC commands for loading presets to specific A/B slots without switching, enabling advanced workflows while preserving existing functionality.
Changes
CONFIG_ITEM_SAVE_PRESET_TO_SLOTglobal configurationMidiCommands.mddocumentationUse Case
This feature enables the controller to receive MIDI:
Technical Implementation
source/main/usb_comms.h: AddedUSB_COMMAND_LOAD_PRESET_TO_SLOT_A/Bcommands and function declarationssource/main/usb_comms.c: Implemented thread-safe queue functionsusb_load_preset_to_slot_a/b()source/main/usb_tonex_one.c: Added command handlers inusb_tonex_one_handle()switch statementsource/main/midi_helper.c: Updated MIDI CC 120/121 handlers to use thread-safe queue functionsMidiCommands.md: Updated documentation with new commandsAddresses PR feedback by using message queue pattern instead of direct USB function calls for thread safety.
MIDI Command Reference