// PedalControl.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT import LyrebirdUI /// A continuous pedal control that can be driven by a MIDI Control Change — the common shape of a /// ``PedalKnob`` and a ``PedalSlider`` (a labelled `UIParamNode` with a value range). /// /// Used by MIDI mapping to enumerate every CC-assignable control on a pedal uniformly, regardless of /// how the pedal chose to present it (rotary knob vs vertical fader). Discrete controls (switches, /// stepped selectors) are intentionally excluded — they suit momentary Program Change bindings, not /// continuous expression control. public struct PedalControl { /// Short display label (e.g. `"Rate"`, `"Position"`). public let label: String /// The live parameter node the CC drives. public let node: UIParamNode /// Inclusive value range the control spans, in the parameter's own units. public let range: ClosedRange /// Creates a pedal control descriptor. /// /// - Parameters: /// - label: Short display label. /// - node: The live parameter node. /// - range: Inclusive value range in the parameter's own units. public init(label: String, node: UIParamNode, range: ClosedRange) { self.label = label self.node = node self.range = range } }