Files
ShoeGaze/Sources/LyrebirdShoeGaze/PedalKnob.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

45 lines
1.4 KiB
Swift

// PedalKnob.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import LyrebirdUI
/// A UI-agnostic description of one controllable pedal knob.
///
/// A `Pedal` publishes an array of these (via ``Pedal/knobs``) so a generic
/// pedalboard UI can render a rotary control per parameter 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 control should span.
public struct PedalKnob {
/// Short label shown beneath the knob (e.g. "Drive", "Mix").
public let label: String
/// The live parameter node the knob reads and writes. Pass `pedal.$paramName`.
public let node: UIParamNode
/// Inclusive value range the knob spans, in the parameter's own units.
public let range: ClosedRange<Double>
/// Creates a knob descriptor.
///
/// - Parameters:
/// - label: Short label shown beneath the knob.
/// - node: The `UIParamNode` projected value of an `@UIParam` property
/// (`pedal.$drive`, `pedal.$mix`, …).
/// - range: Inclusive value range the knob spans, in the parameter's units.
public init(
label: String,
node: UIParamNode,
range: ClosedRange<Double>
) {
self.label = label
self.node = node
self.range = range
}
}