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:
@@ -120,6 +120,14 @@ public struct MIDIMappingSheet: View {
|
||||
id: "sw-pb-\(pedal.id)",
|
||||
action: .pedalBypass(pedalID: pedal.id),
|
||||
label: "\(board.label) · \(pedal.displayName) · Bypass"))
|
||||
// A pedal with a primary transport footswitch (TunedVerb Capture, FreezVerb Freeze)
|
||||
// exposes it as a mappable action.
|
||||
if let transport: MIDITransportPedal = pedal as? MIDITransportPedal {
|
||||
rows.append(SwitchRowModel(
|
||||
id: "sw-pt-\(pedal.id)",
|
||||
action: .pedalAction(pedalID: pedal.id, kind: .pedalPrimaryTransport),
|
||||
label: "\(board.label) · \(pedal.displayName) · \(transport.midiTransportName)"))
|
||||
}
|
||||
// Loopers expose their transport footswitches as mappable switch actions.
|
||||
if pedal is LooperPedal {
|
||||
var looperActions: [(String, String, MIDIMap.PedalActionKind)] = [
|
||||
|
||||
Reference in New Issue
Block a user