Skip to content

Issue #1891: MIDI faders take over at the photo's value (pickup) - #1920

Draft
OneSlips wants to merge 2 commits into
emmertex:stagingfrom
RAD-Films:pr/midi-pickup
Draft

OneSlips wants to merge 2 commits into
emmertex:stagingfrom
RAD-Films:pr/midi-pickup

Conversation

@OneSlips

@OneSlips OneSlips commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Part of #1891. Builds on #1913: this branch contains #1913's commit; the change here is the last commit (3bffecf). I'll rebase it onto staging once #1913 merges and mark it ready.

What it does

A MIDI fader or knob with ends now takes over a value once it reaches it, so switching photos, undoing or dragging a slider keeps the photo's value until you bring the fader to it.

  • Takes over within 3 % of the range, or when the fader moves past the value in one step (a quick move skips messages).
  • Until then the photo keeps its value, and the readout shows the value with a white mark where the fader is: "Move to the value to take over".
  • A fader moved within the last half second keeps the value; after a rest it takes over again at once when it still stands at the value.
  • The moves before it takes over add no undo step.
  • On by default. Settings ▸ Controls ▸ MIDI controllers ▸ Faders take over at the photo's value turns it off (the value then jumps to wherever the fader is); command surface.midiPickup {on}.

Code: a pure lcc_surface::pickup module (per-control state, bounded, safe on NaN/inf), a pickup setting in midi, and a Shown::Pickup readout the host shows while a fader waits.

Screens (headless snapshot)

  • Readout: Exposure stays at 0.00 with the fader at 88 %; the bar shows the value and a white mark shows the fader, with the caption under it.
  • Settings: the new check and its hint under Use MIDI controllers.

Tests

  • lcc-surface pickup::tests: waits until within 3 %, a quick move past the value, re-taking after a rest only at the value, another binding starts again, hostile numbers and many controls.
  • runtime::tests::a_fader_waiting_to_take_over_shows_where_it_is.
  • lcc-ui-egui a_fader_takes_over_exposure_once_it_reaches_the_value: the photo keeps Exposure while the fader is away, surface.state reports the pickup readout, the fader takes over at the value, one undo puts the photo back, a quick move past the value takes over, off sets from anywhere, a missing on is refused.
  • cargo xtask ci --quick green.

New UI strings are translated in all 17 fork catalogs.

Manual: automate/control-surfaces
Sources: MIDI2LR (https://github.com/rsjaffe/MIDI2LR, GPL-3.0) pickup mode read as a reference for behaviour; credited in NOTICE (#1913).

🤖 Generated with Claude Code

OneSlips and others added 2 commits December 5, 2026 03:06
…DI learn

A MIDI controller now shows up in Settings ▸ Controls beside the MX Creative
Console and Loupedeck+, and runs on the same surface engine: pages that follow
the context, one undo step per gesture, the readout, speed and acceleration.

- Touch a knob, fader or button and it appears on the page; bind it like any
  other key or dial. The app guesses how a knob sends (with ends, or one of the
  three endless kinds) and you can pick another type if it moves the wrong way.
- Faders and knobs with ends set the value by position (new Input::Position /
  Effect::Set in lcc-surface), coalesced per frame, one undo step per move.
- Ports: tick which MIDI ports the app opens. midi.toml keeps working; a
  message it binds still goes to its action.
- Commands: surface.midi, surface.midiPort, surface.midiControl,
  surface.midiInput (synthetic MIDI for scripts and tests).

Part of emmertex#1891 (next: pickup, LED feedback, built-in X-Touch Mini layout).

Manual: automate/control-surfaces
Sources: MIDI2LR (https://github.com/rsjaffe/MIDI2LR, GPL-3.0) read as a
reference for behaviour; credited in NOTICE.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A MIDI fader or knob with ends now takes over a value once it reaches it
(within 3 % of the range, or moving past it in one step), so switching
photos, undoing or dragging a slider keeps the photo's value until you bring
the fader to it. Until then the readout shows the value with a white mark
where the fader is: "Move to the value to take over". A fader moved within
the last half second keeps the value; the moves before it takes over add no
undo step.

- lcc-surface: new `pickup` module (pure state, per control), a `pickup`
  setting in `midi` (on by default) and a `Shown::Pickup` readout.
- Settings ▸ Controls ▸ MIDI controllers: "Faders take over at the photo's
  value"; command `surface.midiPickup {on}`.

Part of emmertex#1891 (builds on emmertex#1913).

Manual: automate/control-surfaces
Sources: MIDI2LR (https://github.com/rsjaffe/MIDI2LR, GPL-3.0) pickup mode
read as a reference for behaviour; credited in NOTICE (emmertex#1913).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant