Skip to content

Reconcile local sinks on successful CC and ALSA emission - #238

Closed
jpremill wants to merge 1 commit into
TreeFallSound:mainfrom
jpremill:fix/parameter-commit-rollback
Closed

Reconcile local sinks on successful CC and ALSA emission#238
jpremill wants to merge 1 commit into
TreeFallSound:mainfrom
jpremill:fix/parameter-commit-rollback

Conversation

@jpremill

Copy link
Copy Markdown

Summary

Fixes an issue where editing a parameter via Parameterdialog (or local hardware controls) causes the value to snap back to its initial boot/preset setting on subsequent events. I encountered this while goofing around with the settings.

Root Cause

Under the strict 3-motion parameter model (preview, reconcile, commit), edits published through commit(value, sink) remain in a pending state until a reconcile() confirms the change.
While standard plugin parameters receive an asynchronous param_set WebSocket echo from MOD-UI, local non-echoing sinks (_publish_audio for soundcard ALSA writes and _publish_cc for hardware-bound MIDI CCs) receive no remote echo from mod-host or MOD-UI. Because param.reconcile() was never called for these sinks, _confirmed was permanently stuck at the initial value, causing any subsequent touch, expression input, or sub-range recalculation to roll the parameter back to its boot-time value.

Changes

  1. modalapi/modhandler.py:
    - Explicitly reconcile param.reconcile(param.value) within _publish_audio and _publish_cc once the write / CC emission
    succeeds.
  2. tests/v3/test_parameter_edit_rollback.py:
    - Added TDD regression tests verifying NAV encoder step updates in Parameterdialog, safety rollback when
    _is_pedalboard_loading is active, and confirmation for CC-bound parameters.
  3. CHANGELOG.md:
    - Added changelog entry under ### Fixed.

Verification

  • uv run pytest tests/v3/test_parameter_edit_rollback.py passes (3/3).
  • Full test suite passes: 1,464 passed, 2 skipped in ~31s.

…sion

Parameters published through local sinks (ALSA audio and MIDI CC) receive no
remote echo from MOD-UI. Without explicit reconciliation upon successful send,
param._confirmed was never updated, causing parameter edits in Parameterdialog
to bounce back to initial boot values on subsequent events.

- Call param.reconcile(param.value) in _publish_audio and _publish_cc
- Add regression tests in tests/v3/test_parameter_edit_rollback.py
- Update CHANGELOG.md
@jpremill
jpremill force-pushed the fix/parameter-commit-rollback branch from 99263b6 to 7eb7ea2 Compare August 15, 2026 14:51
@jpremill

Copy link
Copy Markdown
Author

@sastraxi last night I saw this issue and I swear it was fixed but now I'm not sure it even helps it. Closing this for now. I deployed last night to my device and it did work... odd

@jpremill jpremill closed this Aug 15, 2026
@sastraxi

Copy link
Copy Markdown
Collaborator

Hmm. The non-echoing sinks shouldn’t need reconcile, they’re meant to be commit only iirc. If you can provide repro steps (make sure you’re on the latest OTA MOD-UI as well as pi-stomp via Updates and Recovery) happy to jam on a solution together

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