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

40 lines
1.4 KiB
Swift

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