Files
ShoeGaze/Sources/LyrebirdShoeGaze/PedalSlider.swift
T
josh 0ddf350f1f Migrate to Lyrebird 2.0.0; app version bump
Lyrebird 2.0 moved `@UIParam` / `UIParamNode` out of `LyrebirdUI` into the
core `LyrebirdSynth` module (the `Lyrebird` product); `LyrebirdUI` no longer
re-exports them. Migrate:
- add `import LyrebirdSynth` to every file that uses `@UIParam`/`UIParamNode`
  (the pedal controls, tempo-syncable params, and the SwiftUI views).
- Package.swift: the `LyrebirdShoeGazeUI` target now also depends on the
  `Lyrebird` product (previously only `LyrebirdUI`), so `import LyrebirdSynth`
  resolves there under explicit module maps.
- Package.resolved (SwiftPM + both Xcode projects) pinned to Lyrebird 2.0.0.

Also: app marketing/project version bumps, Xcode upgrade-check, and a
CHANGELOG wording tweak carried in the same working tree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-23 21:17:30 -07:00

48 lines
1.7 KiB
Swift

// PedalSlider.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
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<Double>
/// 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<Double>
) {
self.label = label
self.node = node
self.range = range
}
}