Skip to content

Introduce EditContext to simplify parameter editing code paths - #255

Merged
sastraxi merged 4 commits into
feat/remove-backpressurefrom
refactor/edit-context
Sep 9, 2026
Merged

sastraxi merged 4 commits into
feat/remove-backpressurefrom
refactor/edit-context

Conversation

@sastraxi

@sastraxi sastraxi commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #253.

A MIDI-CC advanced mapping has a physical-control range. It does not change the plugin parameter range.

Before this PR, a mapping could narrow the parameter grid and could clamp the local value when MOD changed the mapping. This could make the LCD show a value different from MOD.

Changes

  • Add EditContext for the parameter, commit function, and editor range.
  • Use the declared plugin range for UI and NAV edits.
  • Use the physical mapping range for encoder and MIDI edits.
  • Keep UI edits on the WebSocket path.
  • Keep physical edits on the MIDI CC path.
  • Change binding ranges without changing the parameter value or confirmed value.
  • Use the instance ID and symbol as the parameter dialog cache key.
  • Rename common.parameter_steps to common.parameter_editing.
  • Update tests and input documentation.

User result

  • A plugin dialog can reach the full plugin range.
  • A physical control uses the range selected in MOD-UI.
  • Changing a MIDI mapping does not change the current plugin value.
  • A failed send can still roll back to the last MOD-owned value.
  • Two plugins can open dialogs for parameters with the same name.
  • UI and physical edits use the correct transport.

Out-of-scope

Integer value coercion for logarithmic parameters is separate from this PR. It is tracked in #254.

@sastraxi sastraxi changed the title Introduce EditContext to simplify Introduce EditContext to simplify parameter editing code paths Sep 7, 2026

@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 seems to work with everything I tried.

@sastraxi
sastraxi merged commit 5497941 into main Sep 9, 2026
2 checks passed
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.

MIDI-CC sub-range must not limit a parameter's value

2 participants