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:
@@ -187,6 +187,22 @@ open class Pedal: SynthesizerBase {
|
||||
]
|
||||
}
|
||||
|
||||
/// Every continuous control on this pedal that a MIDI Control Change can drive — the pedal's
|
||||
/// knobs (effect knobs + Mix + Level) followed by its vertical-fader sliders. Discrete controls
|
||||
/// (switches, stepped selectors) are excluded; they suit Program Change toggles, not CC sweeps.
|
||||
///
|
||||
/// Ordering is stable — knobs first, then sliders — so a persisted CC binding addressed by index
|
||||
/// keeps resolving to the same control across launches. Used by MIDI mapping.
|
||||
public var ccMappableControls: [PedalControl] {
|
||||
let knobControls: [PedalControl] = knobs.map {
|
||||
PedalControl(label: $0.label, node: $0.node, range: $0.range)
|
||||
}
|
||||
let sliderControls: [PedalControl] = effectSliders.map {
|
||||
PedalControl(label: $0.label, node: $0.node, range: $0.range)
|
||||
}
|
||||
return knobControls + sliderControls
|
||||
}
|
||||
|
||||
// MARK: - Subclass hook
|
||||
|
||||
/// Returns the processed (wet) mono signal for this pedal.
|
||||
|
||||
Reference in New Issue
Block a user