Looper: multi-slot + timeline + stop/cue-stop, quantized transport
Checkpoint before the multitrack redesign. Adds 4 loop slots (one player swapped via setBuffer), a play-head timeline with A/B/C/D dots, Loop/Stop/ Cue Stop/Reverse stomp toggles below the knobs, beat-quantized transport, overdub undo, reverse, and feedback-decay overdub — all reviewed for RT safety (transportGeneration guards on deferred beat/undo/cue callbacks). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -39,7 +39,21 @@ public struct PedalButtonView: View {
|
||||
public var body: some View {
|
||||
switch pedalButton.style {
|
||||
case .momentary:
|
||||
ParameterButton(pedalButton.label, action: pedalButton.action ?? {})
|
||||
if let indicator: UIParamNode = pedalButton.indicator {
|
||||
// LED + footswitch, same look as a toggle, but the press runs an action and the
|
||||
// LED reflects a separate state node (e.g. Stop lit while stopped). Reading
|
||||
// `indicator.value` registers this view for @Observable re-render.
|
||||
let isOn: Bool = indicator.value >= PedalButtonView.toggleOnThreshold
|
||||
VStack(spacing: PedalButtonView.sectionSpacing) {
|
||||
LEDIndicator(isOn: isOn)
|
||||
FootswitchButton(action: pedalButton.action ?? {})
|
||||
Text(pedalButton.label)
|
||||
.font(.system(size: PedalButtonView.captionFontSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
} else {
|
||||
ParameterButton(pedalButton.label, action: pedalButton.action ?? {})
|
||||
}
|
||||
case .toggle:
|
||||
if let node: UIParamNode = pedalButton.node {
|
||||
// Reading `node.value` registers this view for @Observable re-render.
|
||||
|
||||
Reference in New Issue
Block a user