Skip to content

test(state): prove MidiParameterMap maps any parameter with zero driver code#6460

Merged
shipyard-local[bot] merged 1 commit into
mainfrom
feature/timeline-midi-param-map
Jul 22, 2026
Merged

test(state): prove MidiParameterMap maps any parameter with zero driver code#6460
shipyard-local[bot] merged 1 commit into
mainfrom
feature/timeline-midi-param-map

Conversation

@shipyard-local

@shipyard-local shipyard-local Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Closes Phase-3 item #6 (hardware MIDI controller maps to any parameter with zero driver code).

Scope finding: already-satisfied (no-op-by-absorption)

MidiParameterMap (core/state/include/pulp/state/midi_parameter_map.hpp) is already fully general. It learns (arm_learn), maps (channel, cc) -> ParamID, and applies via handle_cc -> store.set_normalized_rt against any StateStore it is handed — not one plugin's params. kOmni channel, lock-free UI->audio SpscQueue, and the header documents the records-as-automation path. "Any parameter, zero driver code" (no per-controller/per-parameter code, only runtime learn/apply with opaque IDs) is already true.

The timeline layer is format-neutral: its document target is DeviceParameterTarget{device_placement_id, param_id} with no StateStore; resolving that target to a real parameter lives in core/playback (out of scope). A "document parameter" ultimately resolves to a placed device's StateStore param, which MidiParameterMap already drives. So there is no integration seam to add in core/timeline, and a timeline-level CC -> DeviceParameterTarget map would be dead code. The DoD just needs a proof.

What this lands

Two Catch2 cases in the existing owner file test/test_midi_binding.cpp (already registered as pulp-test-midi-binding); no production change:

  • DoD proofmaps any parameter with zero driver code: registers a spread of arbitrary params, learns + drives each through one generic loop; also asserts per-parameter independence and unmapped-CC-ignored.
  • Defensivere-learn replaces an existing mapping: the previously-uncovered path where re-arming the same controller retargets it and the old parameter goes quiet.

Validation

pulp-test-midi-binding: 9 cases / 58 assertions green (Release). gates.sh origin/main clean; docs_noise_lint clean; version_bump_check --mode=report: no bump needed (test-only).

🤖 Generated with Claude Code

https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS


🔎 Provenance

Agent claude
Machine m3
Tab Timeline v3
Directory /Volumes/Workshop/Code/pulp-midimap
Session c66f4a64-25ea-42e5-b184-d48611a066a2

Resume

claude --resume c66f4a64-25ea-42e5-b184-d48611a066a2

Jump to this tab

cmux surface focus C0B3DA54-39AF-4DAA-8089-AA08DAB71968

Relaunch (any agent)

cmux surface resume get --surface C0B3DA54-39AF-4DAA-8089-AA08DAB71968

Restore URLhttps://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS

stamped 2026-07-22 06:01 UTC

…er code

MidiParameterMap already binds an incoming (channel, cc) to any ParamID in
any StateStore handed to handle_cc, so a hardware controller reaches any
registered parameter with no per-controller or per-parameter code — only
runtime learn/apply calls carrying opaque IDs. Pin that Phase-3 contract with
a generic proof that registers a spread of arbitrary parameters and learns +
drives each through one loop (also covering per-parameter independence and
unmapped-CC-ignored), plus the previously-uncovered re-learn-replaces path
where re-arming the same controller retargets it and the old parameter goes
quiet.

Test-only; no production change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
@shipyard-local
shipyard-local Bot enabled auto-merge July 22, 2026 06:01
@shipyard-local
shipyard-local Bot added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit beed72e Jul 22, 2026
27 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant