// PedalSlider.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT import LyrebirdUI /// A UI-agnostic description of one continuous vertical pedal fader. /// /// Where ``PedalKnob`` describes a rotary control and ``PedalSwitch`` a discrete /// segmented control, `PedalSlider` describes a continuous vertical fader — the control /// a graphic EQ uses for its per-band gains and master output level. A `Pedal` publishes /// an array of these via ``Pedal/effectSliders`` so a generic pedalboard UI can render a /// bank of vertical faders without knowing the concrete pedal type. /// /// Each descriptor pairs a display label with the live ``UIParamNode`` (the projected /// value of an `@UIParam` property) and the value range the fader should span. public struct PedalSlider { /// Short label shown beneath the fader (e.g. "Low", "Gain"). public let label: String /// The live parameter node the fader reads and writes. Pass `pedal.$paramName`. public let node: UIParamNode /// Inclusive value range the fader spans, in the parameter's own units. public let range: ClosedRange /// Creates a slider descriptor. /// /// - Parameters: /// - label: Short label shown beneath the fader. /// - node: The `UIParamNode` projected value of an `@UIParam` property /// (`pedal.$lowGain`, `pedal.$globalGain`, …). /// - range: Inclusive value range the fader spans, in the parameter's units. public init( label: String, node: UIParamNode, range: ClosedRange ) { self.label = label self.node = node self.range = range } }