Skip to content

Sync current state of analog controls on pedalboard load#114

Open
sastraxi wants to merge 4 commits intoTreeFallSound:pistomp-v3from
sastraxi:feat/analog-control-sync
Open

Sync current state of analog controls on pedalboard load#114
sastraxi wants to merge 4 commits intoTreeFallSound:pistomp-v3from
sastraxi:feat/analog-control-sync

Conversation

@sastraxi
Copy link
Contributor

@sastraxi sastraxi commented Jan 7, 2026

When using e.g. expression pedals with MOD pedalboard, this PR adds an initial "sync" where we read the value of the GPIO pin and send a MIDI message so that we don't have to e.g. wiggle the pedal to get it to reflect the current state of the analog input.

@sastraxi sastraxi force-pushed the feat/analog-control-sync branch from d18690e to 11beee2 Compare January 7, 2026 06:17
Copy link
Collaborator

@rreichenbach rreichenbach left a comment

Choose a reason for hiding this comment

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

This is cool. I can't merge it though since this fork/branch needs a rebase.

@renemadeira
Copy link

This is very cool — thanks for the implementation.

Since my unit has a lot of analog controls, I was wondering if this behavior could be made optional. For example, a per-control toggle in the analog control definition (something like autosync=1).

For some controls it’s great to sync immediately on preset/pedalboard change, but for others I’d prefer to keep the value stored in the snapshot until the control is moved.

From a usability standpoint, having this as a per-control option would cover both use cases cleanly.

Thanks again for the great contributions.

@sastraxi
Copy link
Contributor Author

sastraxi commented Feb 8, 2026

@renemadeira added! The default is autosync=False, but documented as the recommended value for the expression pedal in the default configs

@rreichenbach I re-did this PR based on the above feedback and also realizing that we can better encapsulate the controls by making them responsible for their own initialization. Let me know if you'd like any refactors.

# reinit hardware as specified by the new cfg context (after pedalboard change, etc.)
self.cfg = self.default_cfg.copy()

self.__init_midi_default()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This just does the same as the "pedalboard-specific config" below.

Comment on lines -112 to -113
# Footswitch configuration
self.__init_footswitches(self.cfg)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same for this; already done below.

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.

3 participants