test(state): prove MidiParameterMap maps any parameter with zero driver code#6460
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viahandle_cc->store.set_normalized_rtagainst anyStateStoreit is handed — not one plugin's params. kOmni channel, lock-free UI->audioSpscQueue, 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 noStateStore; resolving that target to a real parameter lives incore/playback(out of scope). A "document parameter" ultimately resolves to a placed device'sStateStoreparam, whichMidiParameterMapalready drives. So there is no integration seam to add incore/timeline, and a timeline-levelCC -> DeviceParameterTargetmap 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 aspulp-test-midi-binding); no production change:maps 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.re-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/mainclean;docs_noise_lintclean;version_bump_check --mode=report: no bump needed (test-only).🤖 Generated with Claude Code
https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
🔎 Provenance
claudem3/Volumes/Workshop/Code/pulp-midimapc66f4a64-25ea-42e5-b184-d48611a066a2Resume
Jump to this tab
Relaunch (any agent)
Restore URL — https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
stamped 2026-07-22 06:01 UTC