Footswitch preset fixes#191
Merged
sastraxi merged 4 commits intoJul 3, 2026
Merged
Conversation
… LED lights active snapshot Clear a footswitch's inherited midi_CC when preset: is configured (it's dead weight for its own press dispatch and was letting an unrelated plugin's MIDI-learned binding steal fs.parameter and clobber the label). Label now shows the snapshot name instead of the raw index, and the LCD/physical LED lights for whichever snapshot is currently active. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
get_display_label() treated midi_CC is None as "unbound, show nothing" -- true before preset switches existed, but Hardware.__init_footswitches now clears midi_CC for them by design. Any refresh that reads get_display_label() instead of the freshly computed label (e.g. update_footswitch on the next preset_change) wiped the snapshot name back to empty. Preset-bound switches are now exempt from the blank-out rule. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
rreichenbach
reviewed
Jul 3, 2026
rreichenbach
left a comment
Collaborator
There was a problem hiding this comment.
This looks good and seems to mostly work. One problem noticed though, if you change from a pedalboard with preset/snapshot footswtiches, then change to one without, the function and label for the new pedalboard will "bleed" from the previous.
These two lines added to footswitch.py should fix it:
def clear_pedalboard_info(self):
self.toggled = False
self.disabled = False
self.display_label = None
self.set_category(None)
self.preset_callback = None
self.preset_callback_arg = None # cuz it's used as a condition too
self.parameter = None # not sure it's necessary but seems like good hygene
self.clear_relays()
rreichenbach
approved these changes
Jul 3, 2026
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.
Clear a footswitch's inherited
midi_CCwhenpreset:is configured: it was letting an unrelated plugin's MIDI-learned binding stealfs.parameterand clobber the label.The label now shows the snapshot name instead of the raw index, and the LCD/physical LED lights for whichever snapshot is currently active.