Skip to content

Footswitch preset fixes#191

Merged
sastraxi merged 4 commits into
TreeFallSound:pistomp-v3from
sastraxi:fix/footswitch-preset-fixes-v3
Jul 3, 2026
Merged

Footswitch preset fixes#191
sastraxi merged 4 commits into
TreeFallSound:pistomp-v3from
sastraxi:fix/footswitch-preset-fixes-v3

Conversation

@sastraxi

@sastraxi sastraxi commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Clear a footswitch's inherited midi_CC when preset: is configured: it was letting an unrelated plugin's MIDI-learned binding steal fs.parameter and 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.

sastraxi and others added 3 commits July 2, 2026 19:29
… 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 rreichenbach left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

@sastraxi sastraxi merged commit 34e1222 into TreeFallSound:pistomp-v3 Jul 3, 2026
1 check passed
@sastraxi sastraxi deleted the fix/footswitch-preset-fixes-v3 branch July 3, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants