2.1.1: ignore MIDI CC on tempo-synced parameters
A CC bound to a pedal parameter locked to a note division is now ignored while synced — the value is tempo-derived and a CC write would be overwritten on the next tempo change. Index-stable: ccMappableControls is unchanged (persisted bindings resolve by position), and only the CC *write* is skipped. MIDIController.applyCC checks Pedal.isNodeTempoSynced(_:) (node-identity match against tempoSyncableParams) and skips the update; the binding stays intact and resumes control once set back to Free. Test: MIDIControllerCCTests.ccIsIgnoredWhileParameterIsTempoSynced. 455 tests pass. Docs: CHANGELOG.md, RELEASES.md, plan MIDI section updated to "implemented". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -250,6 +250,14 @@ public final class MIDIController {
|
||||
continue
|
||||
}
|
||||
guard let resolved: ResolvedCC = resolveCC(binding.target) else { continue }
|
||||
// A parameter locked to a note division is driven by the tempo; a CC write would be
|
||||
// overwritten on the next tempo change, so ignore it here. The binding stays intact and
|
||||
// resumes control the moment the parameter is set back to Free.
|
||||
if case let .pedalControl(pedalID, _, _, _) = binding.target,
|
||||
let pedal: Pedal = pedal(id: pedalID),
|
||||
pedal.isNodeTempoSynced(resolved.node) {
|
||||
continue
|
||||
}
|
||||
let mapped: Double = resolved.range.lowerBound
|
||||
+ norm * (resolved.range.upperBound - resolved.range.lowerBound)
|
||||
resolved.node.update(mapped)
|
||||
|
||||
Reference in New Issue
Block a user