Looper reverse fix + header layout compaction + tempo toggle
Looper: - Reverse now continues from the current play-head instead of jumping to duration-minus-position; anchor-based position tracking survives direction changes. Sync mode defers the flip to the next beat; Free applies immediately. - Sync switch relabeled "Sync to Tempo". Tempo/Tuner: - Add a Tempo on/off toggle (ShoeGaze.setTempoEnabled) that hides the indicator and forces every tempo-dependent pedal switch (PedalSwitch.tempoDependent) off; PedalSwitchView disables such switches via the shoeGazeTempoEnabled environment. - Tuner readout laid out inline; Tempo/Tuner pinned to fixed heights so toggling state no longer shifts surrounding layout. Header: - Collapsed to two rows: title + Tempo/Tuner (left, stacked) and engine options over input controls (right, trailing-aligned). TAP is a standard-height button. - Removed the redundant Boards button; moved Clear into the board bar. - Fixed the rig mute glyph size so toggling mute doesn't shift the volume row. Help: added a Looper section documenting transport, Free/Sync, knobs, tracks, and MIDI-assignable actions. Tests: TempoEnableTests + looper reverse/deferral coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// TempoEnabledEnvironment.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// Environment flag mirroring ``ShoeGaze/tempoEnabled`` so leaf views (e.g. ``PedalSwitchView``)
|
||||
/// can disable tempo-synced controls without each needing a reference to the session. Set once
|
||||
/// near the builder root; defaults to `true`.
|
||||
private struct TempoEnabledKey: EnvironmentKey {
|
||||
static let defaultValue: Bool = true
|
||||
}
|
||||
|
||||
extension EnvironmentValues {
|
||||
/// `true` when the tempo indicator is shown and tempo-synced features are active.
|
||||
var shoeGazeTempoEnabled: Bool {
|
||||
get { self[TempoEnabledKey.self] }
|
||||
set { self[TempoEnabledKey.self] = newValue }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user