feat: add MIDI CC 120/121 for independent A/B slot preset loading - #266
Merged
Conversation
…t A/B slot targeting - Add CC 120: Load Preset to Slot A (values 0-19) - Add CC 121: Load Preset to Slot B (values 0-19) - Both commands bypass global slot configuration - Both commands load without switching active slot (selectSlot=0) - Maintain full backward compatibility with CC 127 - Add proper validation and error logging - Update MIDI commands documentation Resolves independent A/B preset loading for HX Stomp workflows
# Conflicts: # source/main/midi_helper.c
madejm
reviewed
Sep 6, 2025
…t targeting - Add CC 120 (Load Preset to Slot A) and CC 121 (Load Preset to Slot B) - Implement thread-safe architecture using message queues instead of direct USB calls - Add USB_COMMAND_LOAD_PRESET_TO_SLOT_A/B commands to enum - Add usb_load_preset_to_slot_a/b() queue functions in usb_comms.c - Add command handlers in usb_tonex_one_handle() switch statement - Update MIDI handlers to use new thread-safe functions - Allows HX Stomp to independently load presets into both slots without forcing mode changes - Preserves TONEX ONE's native A/B toggle functionality and tuner access Addresses PR feedback regarding thread safety - replaced direct USB function calls from MIDI thread with proper message queue pattern as suggested by reviewer.
|
@lucastephann Brother, I love you. You can't imagine how much I wanted this feature... Thanks a lot! |
gmfrees
pushed a commit
to gmfrees/TonexOneController
that referenced
this pull request
Feb 3, 2026
…ection feat: add MIDI CC 120/121 for independent A/B slot preset loading
gmfrees
pushed a commit
to gmfrees/TonexOneController
that referenced
this pull request
Feb 3, 2026
…ection feat: add MIDI CC 120/121 for independent A/B slot preset loading
SONJAEHYUN23
pushed a commit
to SONJAEHYUN23/TonexOneController
that referenced
this pull request
Aug 4, 2026
…ection feat: add MIDI CC 120/121 for independent A/B slot preset loading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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