92 constexpr bool moving() const noexcept {
99static_assert(std::is_trivially_copyable_v<UiPlayhead>,
100 "UiPlayhead must be trivially copyable: a reading a view retains "
101 "must survive the engine that produced it");
131static_assert(std::is_trivially_copyable_v<AuditionRequest>,
132 "AuditionRequest must be trivially copyable: it crosses to the "
133 "host by value and may be queued to an audio thread");
212template <class Intent>
Adds intent submission for one intent vocabulary.
Definition sequencer_ui_host.hpp:213
virtual IntentResult submit_intent(const Intent &intent) noexcept=0
Hand over one intent a gesture produced.
ValidatedNoteEditIntent IntentType
Definition sequencer_ui_host.hpp:215
The vocabulary-independent half of the seam: where playback is, and asking to hear something.
Definition sequencer_ui_host.hpp:192
virtual AuditionResult begin_audition(const AuditionRequest &request) noexcept=0
Ask to hear something.
virtual ~SequencerUiHost()=default
virtual void end_audition(AuditionHandle handle) noexcept=0
End a sustained audition.
virtual UiPlayhead playhead() const noexcept=0
The latest playhead reading, by value.
ScriptedUiHost is a SequencerUiHost whose playhead is written by the caller instead of an engine,...
Definition edit_intent.hpp:14
UiTransportState
Whether the playhead is moving, and why.
Definition sequencer_ui_host.hpp:49
@ Scrubbing
Definition sequencer_ui_host.hpp:52
@ Stopped
Definition sequencer_ui_host.hpp:50
@ Playing
Definition sequencer_ui_host.hpp:51
AuditionStatus
Definition sequencer_ui_host.hpp:144
@ Started
The host is sounding it. A sustained request also yields a valid handle.
Definition sequencer_ui_host.hpp:146
@ Unsupported
This host does not audition at all. A view must stay fully usable.
Definition sequencer_ui_host.hpp:148
@ Rejected
The request named something the host could not route or sound.
Definition sequencer_ui_host.hpp:152
@ Busy
The host is at its audition capacity and dropped this one.
Definition sequencer_ui_host.hpp:150
IntentStatus
Definition sequencer_ui_host.hpp:165
@ Accepted
The host took the intent and will apply it.
Definition sequencer_ui_host.hpp:167
@ Deferred
The host is not accepting intents right now — mid-adoption, or read only.
Definition sequencer_ui_host.hpp:170
The loop bounds a transport honours, in document ticks.
Definition loop_region.hpp:20
Nonzero monotonic identity for a Timeline-owned object.
Definition item_id.hpp:19
Names a sustained audition so it can be ended.
Definition sequencer_ui_host.hpp:137
constexpr bool operator==(const AuditionHandle &) const =default
constexpr bool valid() const noexcept
Definition sequencer_ui_host.hpp:140
std::uint64_t value
Definition sequencer_ui_host.hpp:138
What a view asks to hear, in document terms only.
Definition sequencer_ui_host.hpp:109
timeline::ItemId track
Track whose device chain should sound this.
Definition sequencer_ui_host.hpp:113
timebase::TickDuration duration
Zero requests a sustained audition, ended by end_audition().
Definition sequencer_ui_host.hpp:126
std::uint16_t velocity
Definition sequencer_ui_host.hpp:122
std::uint8_t channel
Definition sequencer_ui_host.hpp:123
std::uint8_t pitch
Pitch, velocity, and channel exactly as timeline::NoteEvent spells them, so a request built from a no...
Definition sequencer_ui_host.hpp:121
constexpr bool operator==(const AuditionRequest &) const =default
timeline::ItemId item
Content item the request came from, when there is one.
Definition sequencer_ui_host.hpp:117
Returned by value so a view driven by a host that cannot audition is observable in a test without a m...
Definition sequencer_ui_host.hpp:158
constexpr bool operator==(const AuditionResult &) const =default
AuditionHandle handle
Definition sequencer_ui_host.hpp:160
AuditionStatus status
Definition sequencer_ui_host.hpp:159
Definition sequencer_ui_host.hpp:175
constexpr bool operator==(const IntentResult &) const =default
std::uint64_t sequence
Host-assigned identity of an accepted intent, so a view can correlate what it emitted with what later...
Definition sequencer_ui_host.hpp:180
IntentStatus status
Definition sequencer_ui_host.hpp:176
One complete reading of where playback is.
Definition sequencer_ui_host.hpp:70
double tempo_bpm
Definition sequencer_ui_host.hpp:88
std::uint64_t sequence
Monotonic per publish.
Definition sequencer_ui_host.hpp:76
constexpr bool moving() const noexcept
Whether the position advances on its own.
Definition sequencer_ui_host.hpp:92
std::uint64_t continuity_epoch
Identity of the continuous interval this reading's position belongs to.
Definition sequencer_ui_host.hpp:83
timebase::LoopRegion loop
Definition sequencer_ui_host.hpp:86
std::uint64_t program_generation
Identity of the compiled program this reading came from.
Definition sequencer_ui_host.hpp:73
UiTransportState state
Definition sequencer_ui_host.hpp:87
timebase::TickPosition position
Document position. This is the value a ruler and a playhead line draw.
Definition sequencer_ui_host.hpp:85
constexpr bool operator==(const UiPlayhead &) const =default