// LooperTransportState.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT /// Publicly-observable transport phase of ``LooperPedal``, surfaced for the UI so it can /// colour the record LED, animate the "waiting for the next beat" armed states, and drive /// the loop timeline. /// /// The two `armed…` cases exist only when the pedal has a tempo ``LyrebirdClock`` — a /// transport action then waits for the next beat boundary before it takes effect. Without a /// clock the pedal transitions straight between ``empty``, ``recording`` and ``playing``. public enum LooperTransportState: Sendable, Equatable { /// No take recorded yet. `Record` begins recording (or arms it, with a clock). case empty /// A `Record` has been requested and the pedal is waiting for the next beat to start. case armedRecord /// Actively recording the primary take. case recording /// A stop has been requested and the pedal is waiting for the next beat to close the loop. case armedStop /// Looping playback of the recorded take (overdub / reverse / mute apply here). case playing }