feat(midi): MIDI-mappable primary transport footswitch (Capture / Freeze)

Expose a pedal's primary transport footswitch — TunedVerb's Capture, FreezVerb's
Freeze — as a MIDI-mappable action, so a footswitch (Program Change) can trigger
it. Previously only per-pedal Bypass and the looper's transport were mappable.

- New `MIDITransportPedal` protocol (@MainActor): `midiTransportName` + a
  `toggleMIDITransport()` that presses the pedal's primary footswitch. TunedVerb
  (Capture) and FreezVerb (Freeze) conform.
- `MIDIMap.PedalActionKind.pedalPrimaryTransport`, dispatched by MIDIController to
  `toggleMIDITransport()`. Learn / persist / resolve-by-id ride the existing
  pedalAction path (same as the looper actions).
- The mapping sheet lists the action for any `MIDITransportPedal`
  ("Board 2 · TunedVerb · Capture"); the per-pedal control-mapping strip shows a
  badge for it. A future press-to-trigger pedal just conforms and appears.

Tests: conformance + a Program-Change round-trip toggling Capture on/off. Full
suite 846 green; both demos build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 20:11:07 -08:00
parent 9dfadb129d
commit 10a6e122bf
8 changed files with 95 additions and 0 deletions
@@ -242,3 +242,12 @@ public final class TunedVerbPedal: Pedal {
captured = 0.0
}
}
// MARK: - MIDI transport
extension TunedVerbPedal: MIDITransportPedal {
/// The Capture footswitch is the mappable transport action.
public var midiTransportName: String { "Capture" }
public func toggleMIDITransport() { toggleCapture() }
}