Address review; make all pedal controls (incl. sliders) CC-mappable

Review fixes:
- Remove stale phase-plan references from MIDIController / MIDIMappingSheet
  doc-comments (describe current behavior instead).
- insertPedal: a board with no linear pedals but a trailing routing region
  now inserts at the head (before the region) instead of appending after it.
- Drop the unused MIDIController.retarget (the app recreates the controller
  against a fresh engine rather than re-pointing it).
- CC steal now matches controller AND channel, so per-channel CC bindings
  can coexist.

Feature (requested): CC mapping now covers every continuous pedal control,
not just rotary knobs. New PedalControl descriptor + Pedal.ccMappableControls
(knobs followed by effect sliders); the Expression sheet lists them grouped
per pedal with a header, so slider params (e.g. EQ bands) are assignable and
labelled clearly. Knob-first ordering keeps existing CC bindings stable.

Tests: +2 (CC drives a slider control; insert into a region-only board lands
before the region). 318 total green; both app targets build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 08:34:30 -07:00
parent 1893576718
commit ae8f370fa8
8 changed files with 149 additions and 46 deletions
@@ -191,6 +191,23 @@ struct BoardEditAPITests {
}
}
@Test func insertIntoRegionOnlyBoardLandsBeforeRegion() throws {
// A board with no linear pedals but a trailing split region: inserting at index 0 must place
// the pedal at the head of the chain, BEFORE the region — not after it.
let (sg, _, url, board): (ShoeGaze, SynthesisEngine, URL, PedalBoard) =
try makeRig(pedals: [])
defer { try? FileManager.default.removeItem(at: url) }
var live: PedalBoard = try sg.appendStereoSplit(to: board) // region-only board
live = try sg.insertPedal(.fuzz, at: 0, to: live, lane: .main)
#expect(names(live) == ["Fuzz"], "the inserted pedal joins the linear chain")
guard case .pedal = live.captureState().segments.first else {
Issue.record("pedal should be the first segment, ahead of the split region")
return
}
}
@Test func insertIntoBranchLaneBeforeTarget() throws {
let (sg, _, url, board): (ShoeGaze, SynthesisEngine, URL, PedalBoard) =
try makeRig(pedals: ["Overdrive"])