40class ProjectStateAccess;
42struct SequenceEditAccess;
76 std::optional<TuningReference>
tuning;
98 const
Clip* operator->() const noexcept;
100 Iterator& operator++() noexcept;
102 bool operator==(const Iterator&) const noexcept = default;
106 Iterator(
std::shared_ptr<const ClipIndexNode> root,
std::
size_t index) noexcept
107 : root_(
std::move(root)), index_(index) {}
108 std::shared_ptr<const ClipIndexNode> root_;
109 std::size_t index_ = 0;
113 std::size_t
size() const noexcept {
133 ClipView(std::shared_ptr<const ClipIndexNode> root, std::size_t
size) noexcept
134 : root_(std::move(root)), size_(
size) {}
135 std::shared_ptr<const ClipIndexNode> root_;
136 std::size_t size_ = 0;
141 std::vector<Clip>
clips);
180 std::optional<ItemId> before_device_id = std::nullopt)
const;
198 std::vector<TakeCompSegment> comp)
const;
285 bool shares_compile_structure_with(const Track& other) const noexcept;
292 explicit Track(
std::shared_ptr<const Data> data) : data_(
std::move(data)) {}
293 std::shared_ptr<const Data> data_;
386class ChordScaleLane {
392 std::span<const ChordScaleEvent>
events() const noexcept {
397 return events_->empty();
405 return events_.get() == other.events_.get();
411 explicit ChordScaleLane(std::shared_ptr<
const std::vector<ChordScaleEvent>>
events) noexcept
412 : events_(std::move(
events)) {}
414 std::shared_ptr<const std::vector<ChordScaleEvent>> events_;
458 std::span<const DynamicsEvent>
events() const noexcept {
463 return events_->empty();
479 return events_.get() == other.events_.get();
485 explicit DynamicsLane(std::shared_ptr<
const std::vector<DynamicsEvent>>
events) noexcept
486 : events_(std::move(
events)) {}
488 std::shared_ptr<const std::vector<DynamicsEvent>> events_;
596class GrooveTemplate {
602 const std::string&
name() const noexcept {
607 return data_->swing_grid;
618 std::span<const GrooveStep>
steps() const noexcept {
623 return data_->timing_strength;
627 return data_->velocity_strength;
641 return data_.get() == other.data_.get();
655 std::vector<GrooveStep>
steps;
661 explicit GrooveTemplate(std::shared_ptr<const Data> data) noexcept : data_(std::move(data)) {}
663 std::shared_ptr<const Data> data_;
709 const
Scene* operator->() const noexcept;
711 Iterator& operator++() noexcept;
713 Iterator operator++(
int) noexcept {
723 Iterator(std::shared_ptr<const detail::LauncherStore> store,
ItemId current) noexcept
724 : store_(std::move(store)), current_(current) {}
725 std::shared_ptr<const detail::LauncherStore> store_;
730 std::size_t
size() const noexcept;
744 explicit SceneView(
std::shared_ptr<const
detail::LauncherStore> store) noexcept
745 : store_(
std::move(store)) {}
746 std::shared_ptr<const detail::LauncherStore> store_;
752 std::vector<Track>
tracks);
755 create(
ItemId id, std::string
name, std::optional<timebase::TickDuration> musical_duration,
759 create(
ItemId id, std::string
name, std::optional<timebase::TickDuration> musical_duration,
761 std::vector<SequenceMarker>
markers, std::vector<SequenceRegion>
regions);
766 create(
ItemId id, std::string
name, std::optional<timebase::TickDuration> musical_duration,
768 std::vector<SequenceMarker>
markers, std::vector<SequenceRegion>
regions,
864 std::optional<
ItemId> before_slot_id =
std::nullopt) const;
886 bool shares_compile_structure_with(const Sequence& other) const noexcept;
892 explicit Sequence(
std::shared_ptr<const Data> data) : data_(
std::move(data)) {}
893 std::shared_ptr<const Data> data_;
905std::optional<ModelError>
908std::optional<ModelError>
974 ItemId lane_id = {})
noexcept {
1024 ItemId clip,
bool is_active) noexcept
1075 std::uint64_t value_ = 0;
1131 replace_sequence(
Sequence sequence, std::span<const IdentityMutation> identities = {},
1132 std::optional<std::uint64_t>
next_item_id = std::nullopt)
const;
1134 append_sequence(
Sequence sequence, std::span<const IdentityMutation> identities = {},
1135 std::optional<std::uint64_t>
next_item_id = std::nullopt)
const;
1137 remove_sequence(ItemId sequence_id, std::span<const IdentityMutation> identities = {})
const;
1141 runtime::Result<Project, ModelError>
1142 append_asset(MediaAsset asset, std::span<const IdentityMutation> identities = {},
1143 std::optional<std::uint64_t>
next_item_id = std::nullopt)
const;
1144 runtime::Result<Project, ModelError>
1145 remove_asset(ItemId asset_id, std::span<const IdentityMutation> identities = {})
const;
1146 Project replace_tempo_map(timebase::TempoMap
tempo_map)
const;
1147 Project replace_meter_map(timebase::MeterMap
meter_map)
const;
1152 runtime::Result<Project, ModelError>
1153 replace_tuning(std::optional<TuningReference>
tuning)
const;
1154 explicit Project(std::shared_ptr<const Data> data) : data_(std::
move(data)) {}
1155 std::shared_ptr<const Data> data_;
1162 std::span<const std::pair<ItemId, ItemId>>
entries() const noexcept {
1170 std::vector<std::pair<ItemId, ItemId>> entries_;
1241 std::uint64_t first_id);
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Definition compiled_meter_map.hpp:46
Definition compiled_tempo_map.hpp:44
Immutable ownership of one authored automation curve and its logical target.
Definition automation_lane.hpp:72
Immutable chord/scale context lane owned by a sequence.
Definition model.hpp:386
bool operator==(const ChordScaleLane &other) const noexcept
Compares authored event values.
bool empty() const noexcept
Returns whether no harmonic context is authored.
Definition model.hpp:396
static runtime::Result< ChordScaleLane, ModelError > create(std::vector< ChordScaleEvent > events)
Validates, orders, and stores harmonic events.
bool shares_storage_with(const ChordScaleLane &other) const noexcept
Returns whether both lanes share the same immutable event storage.
Definition model.hpp:404
std::span< const ChordScaleEvent > events() const noexcept
Returns events in strictly increasing position order.
Definition model.hpp:392
const ChordScaleEvent * at(timebase::TickPosition position) const noexcept
Returns the last event starting at or before position.
Immutable identity-bearing placement of one ClipContent value.
Definition clip.hpp:466
Immutable intensity context lane owned by a sequence.
Definition model.hpp:452
const DynamicsEvent * at(timebase::TickPosition position) const noexcept
Returns the last event starting at or before position.
static runtime::Result< DynamicsLane, ModelError > create(std::vector< DynamicsEvent > events)
Validates, orders, and stores intensity events.
bool shares_storage_with(const DynamicsLane &other) const noexcept
Returns whether both lanes share the same immutable event storage.
Definition model.hpp:478
std::span< const DynamicsEvent > events() const noexcept
Returns events in strictly increasing position order.
Definition model.hpp:458
bool operator==(const DynamicsLane &other) const noexcept
Compares authored event values.
bool empty() const noexcept
Returns whether no intensity context is authored.
Definition model.hpp:462
std::optional< float > value_at(timebase::TickPosition position) const noexcept
Returns the interpolated intensity at position.
Immutable sequence-owned swing, timing-offset, and accent context.
Definition model.hpp:596
std::int32_t velocity_scale_at(timebase::TickPosition position) const noexcept
Returns the accent multiplier at position, in per-mille.
timebase::TickDuration step() const noexcept
Returns the repeating table-step width in canonical ticks; zero means no table.
Definition model.hpp:614
const std::string & name() const noexcept
Returns the authored display name.
Definition model.hpp:602
std::int32_t velocity_strength() const noexcept
Returns velocity-accent strength in per-mille.
Definition model.hpp:626
timebase::TickPosition apply_timing(timebase::TickPosition position) const noexcept
Returns the deterministic sounding tick for authored position.
std::span< const GrooveStep > steps() const noexcept
Returns authored groove steps in repeating order.
Definition model.hpp:618
bool operator==(const GrooveTemplate &other) const noexcept
Compares complete authored groove values.
static runtime::Result< GrooveTemplate, ModelError > create(GrooveTemplateInput input)
Validates and stores one immutable groove template.
bool states_no_feel() const noexcept
Returns whether timing and velocity application are both identity operations.
timebase::TickDuration swing_grid() const noexcept
Returns the swung subdivision width in canonical ticks; zero disables swing.
Definition model.hpp:606
bool is_canonical_default() const noexcept
Returns whether this is the exact default value carried by a new sequence.
bool shares_storage_with(const GrooveTemplate &other) const noexcept
Returns whether both templates share the same immutable backing data.
Definition model.hpp:640
std::int32_t timing_strength() const noexcept
Returns timing-offset strength in per-mille.
Definition model.hpp:622
timebase::SwingRatio swing() const noexcept
Returns the rational swing ratio.
Definition model.hpp:610
Canonically ordered mapping from source identities to remapped identities.
Definition model.hpp:1159
std::span< const std::pair< ItemId, ItemId > > entries() const noexcept
Returns mappings ordered by source identity.
Definition model.hpp:1162
friend struct IdRemapBuilder
Definition model.hpp:1169
std::optional< ItemId > find(ItemId old_id) const noexcept
Returns the remapped identity for old_id, or std::nullopt.
Monotonic allocator for non-zero document ItemIds.
Definition clip.hpp:115
Immutable root of a Timeline document and its monotonic identity domain.
Definition model.hpp:1079
friend class detail::ProjectStateAccess
Definition model.hpp:1128
const MediaAsset * find_asset(ItemId id) const noexcept
Finds a media asset by identity, or returns nullptr.
const std::optional< TuningReference > & tuning() const noexcept
Returns the tuning every track plays in unless it states its own.
const timebase::TempoMap & tempo_map() const noexcept
Returns the project's immutable tempo map.
ItemId root_sequence_id() const noexcept
Returns the identity of the arrangement's root sequence.
ItemIdAllocator item_id_allocator() const noexcept
Returns an allocator initialized to this snapshot's identity frontier.
Definition model.hpp:1122
std::uint64_t next_item_id() const noexcept
Returns the next unallocated numeric ItemId.
bool shares_storage_with(const Project &other) const noexcept
Returns whether both values share complete immutable project storage.
std::span< const Sequence > sequences() const noexcept
Returns project-owned sequences in canonical identity order.
const Sequence * find_sequence(ItemId id) const noexcept
Finds a sequence by identity, or returns nullptr.
friend struct ProjectEditAccess
Definition model.hpp:1127
std::size_t shared_identity_nodes_with(const Project &other) const
Counts persistent identity-index nodes shared with other.
const std::string & name() const noexcept
Returns the authored project name.
ItemId id() const noexcept
Returns the stable project identity.
static runtime::Result< Project, ModelError > create(ProjectInput input)
Validates referential integrity, ownership, durations, and identity monotonicity.
const std::optional< SessionStart > & session_start() const noexcept
Returns the optional absolute source-clock origin.
std::optional< ItemLocation > locate(ItemId id) const noexcept
Returns canonical location data for active or inactive id, if known.
std::span< const MediaAsset > assets() const noexcept
Returns project-owned media assets in canonical identity order.
static ProjectIdentityStats identity_stats() noexcept
Returns process-wide persistent identity-index diagnostic counters.
SequenceCompileStructureToken sequence_compile_structure_token() const noexcept
Process-local identity of the sequence-reference and registered-content placement shape used by incre...
const timebase::MeterMap & meter_map() const noexcept
Returns the project's immutable meter map.
Opaque, process-local identity for the part of a Project snapshot that determines nested-sequence and...
Definition model.hpp:1053
friend class Project
Definition model.hpp:1073
SequenceCompileStructureToken() noexcept=default
constexpr bool operator==(const SequenceCompileStructureToken &) const noexcept=default
bool valid() const noexcept
Whether this token names a real structure snapshot.
Definition model.hpp:1066
Forward iterator that keeps the persistent launcher store alive.
Definition model.hpp:698
bool operator==(const Iterator &) const noexcept=default
Compares iterator position and retained launcher-store identity.
const Scene & operator*() const noexcept
Borrows the current scene; retained launcher storage keeps it alive.
std::ptrdiff_t difference_type
Definition model.hpp:701
const Scene & reference
Definition model.hpp:703
std::forward_iterator_tag iterator_category
Definition model.hpp:704
const Scene * pointer
Definition model.hpp:702
Scene value_type
Definition model.hpp:700
friend class SceneView
Definition model.hpp:722
Snapshot-owned random-access view preserving authored scene order.
Definition model.hpp:695
friend class Sequence
Definition model.hpp:743
Iterator end() const noexcept
Returns the sentinel iterator after the final scene.
const Scene & operator[](std::size_t index) const noexcept
Returns the scene at index; precondition: index < size().
std::size_t size() const noexcept
Returns the number of scenes.
bool empty() const noexcept
Returns whether the view contains no scenes.
Definition model.hpp:732
Iterator begin() const noexcept
Returns an iterator to the first scene.
Immutable identity-bearing arrangement with tracks, annotations, context, and launch scenes.
Definition model.hpp:692
runtime::Result< Sequence, ModelError > erase_region(ItemId id) const
Removes a region by identity and returns a new snapshot.
runtime::Result< Sequence, ModelError > insert_slot(ItemId scene_id, Slot slot, std::optional< ItemId > before_slot_id=std::nullopt) const
Inserts slot in scene_id, before an existing slot or at the end.
std::span< const ItemId > track_order() const noexcept
Returns track identities in authored top-to-bottom order.
friend struct detail::SequenceEditAccess
Definition model.hpp:884
static runtime::Result< Sequence, ModelError > create(ItemId id, std::string name, std::optional< timebase::TickDuration > musical_duration, std::optional< AbsoluteTimelineDuration > absolute_duration, std::vector< Track > tracks, std::vector< SequenceMarker > markers, std::vector< SequenceRegion > regions)
Creates a sequence with annotations and canonical default context.
runtime::Result< Sequence, ModelError > insert_marker(SequenceMarker marker) const
Inserts a validated marker and returns a new snapshot.
const SequenceRegion * find_region(ItemId id) const noexcept
Finds a region by identity, or returns nullptr.
runtime::Result< Sequence, ModelError > insert_track(Track track, std::optional< ItemId > before_track_id=std::nullopt) const
Inserts track before an existing track in authored order, or appends.
runtime::Result< Sequence, ModelError > erase_marker(ItemId id) const
Removes a marker by identity and returns a new snapshot.
std::span< const ItemId > outgoing_sequence_refs() const noexcept
Returns sorted unique referenced sequence identities derived from clips.
runtime::Result< Sequence, ModelError > replace_track(Track track) const
Returns a snapshot replacing an existing track by identity.
runtime::Result< Sequence, ModelError > insert_scene(Scene scene, std::optional< ItemId > before_scene_id=std::nullopt) const
Inserts scene before an existing scene, or appends when no position is supplied.
bool shares_launcher_storage_with(const Sequence &other) const noexcept
Returns whether both sequences share launcher collection storage.
static runtime::Result< Sequence, ModelError > create(ItemId id, std::string name, std::optional< timebase::TickDuration > duration, std::vector< Track > tracks)
Creates a musical sequence with tracks and no annotations or launch scenes.
runtime::Result< Sequence, ModelError > erase_track(ItemId id) const
Removes a track and its owned clips by identity.
const SequenceMarker * find_marker(ItemId id) const noexcept
Finds a marker by identity, or returns nullptr.
static LauncherIndexStats launcher_index_stats() noexcept
Returns process-wide persistent launcher-index diagnostic counters.
std::span< const SequenceMarker > markers() const noexcept
Returns markers ordered by position then identity.
const Scene * find_scene(ItemId id) const noexcept
Finds a scene by identity, or returns nullptr.
const Track * find_track(ItemId id) const noexcept
Finds a track by identity, or returns nullptr.
std::optional< timebase::TickDuration > duration() const noexcept
Returns the optional musical duration in canonical ticks.
friend class Project
Definition model.hpp:883
runtime::Result< Sequence, ModelError > erase_scene(ItemId id) const
Removes a scene and its owned slots by identity.
bool shares_storage_with(const Sequence &other) const noexcept
Returns whether both values share complete immutable sequence storage.
runtime::Result< Sequence, ModelError > insert_region(SequenceRegion region) const
Inserts a validated region and returns a new snapshot.
std::span< const SequenceRegion > regions() const noexcept
Returns regions ordered by position, duration, then identity.
Sequence with_chord_scale_lane(ChordScaleLane lane) const
Returns a snapshot with replacement harmonic context.
std::span< const Track > tracks() const noexcept
Returns tracks in canonical identity order.
std::optional< AbsoluteTimelineDuration > absolute_duration() const noexcept
Returns the optional absolute duration and its rational rate.
const Slot * find_slot(ItemId id) const noexcept
Finds a slot across all scenes by identity, or returns nullptr.
const GrooveTemplate & groove() const noexcept
Returns the always-present groove context.
SceneView scenes() const noexcept
Returns authored scenes and slots in persistent snapshot-owned storage.
static runtime::Result< Sequence, ModelError > create(ItemId id, std::string name, std::optional< timebase::TickDuration > musical_duration, std::optional< AbsoluteTimelineDuration > absolute_duration, std::vector< Track > tracks, std::vector< SequenceMarker > markers, std::vector< SequenceRegion > regions, ChordScaleLane chord_scale_lane)
Creates a sequence with an explicit chord/scale context lane.
ItemId id() const noexcept
Returns the stable sequence identity.
Sequence with_groove(GrooveTemplate groove) const
Returns a snapshot with replacement groove context.
runtime::Result< Sequence, ModelError > move_track(ItemId track_id, std::optional< ItemId > before_track_id=std::nullopt) const
Moves a track before an existing track in authored order, or to the end.
const ChordScaleLane & chord_scale_lane() const noexcept
Returns the always-present chord/scale context lane.
const std::string & name() const noexcept
Returns the authored sequence name.
runtime::Result< Sequence, ModelError > erase_slot(ItemId scene_id, ItemId slot_id) const
Removes slot_id from scene_id.
Sequence with_dynamics_lane(DynamicsLane lane) const
Returns a snapshot with replacement intensity context.
runtime::Result< Sequence, ModelError > replace_region(SequenceRegion replacement) const
Replaces a region in place, keeping its identity, and returns a new snapshot.
static runtime::Result< Sequence, ModelError > create(SequenceInput input)
Validates and creates a sequence from all authored collections.
std::size_t shared_launcher_nodes_with(const Sequence &other) const
Counts persistent launcher nodes shared with other.
const DynamicsLane & dynamics_lane() const noexcept
Returns the always-present intensity context lane.
static runtime::Result< Sequence, ModelError > create(ItemId id, std::string name, std::optional< timebase::TickDuration > musical_duration, std::optional< AbsoluteTimelineDuration > absolute_duration, std::vector< Track > tracks)
Creates a mixed-domain sequence with tracks and explicit optional durations.
Immutable alternate recording lane owned by a Track.
Definition recording.hpp:103
Immutable sample-anchored recording take referencing a project media asset.
Definition recording.hpp:29
Forward iterator that keeps the underlying persistent index alive.
Definition model.hpp:89
friend class ClipView
Definition model.hpp:105
Clip value_type
Definition model.hpp:91
const Clip & operator*() const noexcept
Borrows the current clip; retained index storage keeps it alive.
std::forward_iterator_tag iterator_category
Definition model.hpp:93
std::ptrdiff_t difference_type
Definition model.hpp:92
Snapshot-owned random-access view of clips in timeline order.
Definition model.hpp:86
bool empty() const noexcept
Returns whether the view contains no clips.
Definition model.hpp:117
Iterator end() const noexcept
Returns the sentinel iterator after the final clip.
Definition model.hpp:127
Iterator begin() const noexcept
Returns an iterator to the first clip.
Definition model.hpp:123
std::size_t size() const noexcept
Returns the number of clips in the view.
Definition model.hpp:113
const Clip & operator[](std::size_t index) const noexcept
Returns the clip at index; precondition: index < size().
friend class Track
Definition model.hpp:132
Immutable identity-bearing arrangement track.
Definition model.hpp:83
bool shares_storage_with(const Track &other) const noexcept
Returns whether both values reference the same complete track storage.
const std::optional< TrackFreeze > & freeze() const noexcept
Returns the published optional freeze artifact.
const MacroControl * find_macro(ItemId id) const noexcept
Finds a macro control by identity, or returns nullptr.
const std::string & name() const noexcept
Returns the authored track name.
std::span< const DevicePlacement > device_chain() const noexcept
Returns device placements in authored processing order.
runtime::Result< Track, ModelError > insert_take_lane(TakeLane lane) const
Returns a snapshot with a validated take lane inserted.
runtime::Result< Track, ModelError > erase_modulation_route(ItemId id) const
Returns a snapshot without the identified modulation route.
friend class Sequence
Definition model.hpp:283
runtime::Result< Track, ModelError > erase_macro(ItemId id) const
Removes a macro control; a route still reading it refuses.
runtime::Result< Track, ModelError > replace_modulator(Modulator replacement) const
Replaces one modulation source without changing its identity.
runtime::Result< Track, ModelError > with_mixer(TrackMixer mixer) const
Returns a snapshot with finite, in-range gain and pan.
runtime::Result< Track, ModelError > insert_modulation_route(ModulationRoute route) const
Returns a snapshot with a validated modulation route inserted.
runtime::Result< Track, ModelError > replace_clip(Clip replacement) const
Replaces one clip by identity with O(log n) path-copy updates.
std::span< const AutomationLane > automation_lanes() const noexcept
Returns automation lanes in canonical identity order.
const std::optional< TuningReference > & tuning() const noexcept
Returns the tuning this track overrides the project's with, if any.
const Modulator * find_modulator(ItemId id) const noexcept
Finds a modulator by identity, or returns nullptr.
runtime::Result< Track, ModelError > replace_macro(MacroControl replacement) const
Replaces one macro control without changing its identity.
runtime::Result< Track, ModelError > with_take_comp(ItemId lane_id, std::vector< TakeCompSegment > comp) const
Replaces one lane's comp with validated, canonical segments.
runtime::Result< Track, ModelError > erase_modulator(ItemId id) const
Removes a modulation source; a route still reading it refuses.
std::span< const TakeLane > take_lanes() const noexcept
Returns take lanes in canonical identity order.
bool shares_clip_membership_with(const Track &other) const noexcept
Returns whether both snapshots contain the same clip identities.
runtime::Result< Track, ModelError > erase_take(ItemId lane_id, ItemId take_id) const
Removes a take unless the lane comp still references it.
runtime::Result< Track, ModelError > replace_modulation_route(ModulationRoute replacement) const
Replaces one modulation route without changing its identity.
std::size_t shared_index_nodes_with(const Track &other) const
Counts persistent clip-index nodes shared with other.
static runtime::Result< Track, ModelError > create(ItemId id, std::string name, std::vector< Clip > clips)
Creates a track containing only its identity, name, and clips.
runtime::Result< Track, ModelError > with_tuning(std::optional< TuningReference > tuning) const
Returns a snapshot carrying a replacement tuning override.
ItemId id() const noexcept
Returns the stable track identity.
runtime::Result< Track, ModelError > erase_device(ItemId id) const
Removes a device declaration; attached automation/modulation refuses.
runtime::Result< Track, ModelError > insert_device(DevicePlacement placement, std::optional< ItemId > before_device_id=std::nullopt) const
Inserts a typed device declaration at an authored position; empty appends.
std::span< const MacroControl > macros() const noexcept
Returns macro controls in canonical identity order.
runtime::Result< Track, ModelError > erase_take_lane(ItemId id) const
Removes a take lane unless it is currently selected.
std::span< const ModulationRoute > modulation_routes() const noexcept
Returns modulation routes in canonical identity order.
runtime::Result< Track, ModelError > erase_clip(ItemId id) const
Returns a snapshot without the identified clip, or MissingItem.
runtime::Result< Track, ModelError > insert_modulator(Modulator modulator) const
Returns a snapshot with a validated modulation source inserted.
runtime::Result< Track, ModelError > replace_device(DevicePlacement replacement) const
Replaces one declaration without changing its placement identity.
ItemId active_take_lane_id() const noexcept
Returns zero for arrangement playback or the selected take-lane identity.
runtime::Result< Track, ModelError > move_device(ItemId id, std::optional< ItemId > before_device_id) const
Moves a device in authored order; empty selects the final position.
const TrackMixer & mixer() const noexcept
Returns the authored track mixer.
const TakeLane * find_take_lane(ItemId id) const noexcept
Finds a take lane by identity, or returns nullptr.
runtime::Result< Track, ModelError > with_freeze(std::optional< TrackFreeze > freeze) const
Publishes or clears a validated freeze artifact.
const DevicePlacement * find_device_placement(ItemId id) const noexcept
Finds a device placement by identity, or returns nullptr.
const AutomationLane * find_automation_lane(ItemId id) const noexcept
Finds an automation lane by identity, or returns nullptr.
static TrackIndexStats index_stats() noexcept
Returns process-wide persistent clip-index diagnostic counters.
Track with_name(std::string name) const
Returns a snapshot carrying a replacement authored name.
bool record_armed() const noexcept
Returns document intent for capture into a take lane.
std::vector< ModulationRoute > routes_from_source(ItemId source_id) const
Returns the routes drawing from source_id, in canonical identity order.
static runtime::Result< Track, ModelError > create(TrackInput input)
Validates and creates a track from all authored collections.
runtime::Result< Track, ModelError > insert_take(ItemId lane_id, Take take) const
Inserts a take into lane_id and returns the new track snapshot.
runtime::Result< Track, ModelError > insert_clip(Clip clip) const
Returns a snapshot with a validated, non-overlapping clip inserted.
runtime::Result< Track, ModelError > insert_macro(MacroControl macro) const
Returns a snapshot with a validated macro control inserted.
runtime::Result< Track, ModelError > erase_automation_lane(ItemId id) const
Returns a snapshot without the identified automation lane.
runtime::Result< Track, ModelError > with_active_take_lane(ItemId lane_id) const
Selects arrangement when zero, or an existing take lane otherwise.
ClipView clips() const noexcept
Returns clips ordered by anchor, start, then identity.
const ModulationRoute * find_modulation_route(ItemId id) const noexcept
Finds a modulation route by identity, or returns nullptr.
std::span< const Modulator > modulators() const noexcept
Returns modulators in canonical identity order.
runtime::Result< Track, ModelError > insert_automation_lane(AutomationLane lane) const
Returns a snapshot with a validated automation lane inserted.
Track with_record_armed(bool armed) const
Returns a snapshot with record-arm intent set to armed.
const Clip * find_clip(ItemId id) const noexcept
Finds a clip by identity, or returns nullptr.
@ Asset
Project-owned media assets.
Definition document_session.hpp:76
@ Note
Note content within a clip.
Definition document_session.hpp:46
constexpr std::int32_t kGrooveUnitScale
Per-mille identity scale for deterministic groove strengths and velocity.
Definition model.hpp:543
ScaleMode
Scale mode associated with a harmonic context event.
Definition model.hpp:313
constexpr std::size_t kMaxSequenceNestingDepth
Maximum admitted depth of an acyclic SequenceRef graph.
Definition model.hpp:897
ChordQuality
Harmonic quality of a chord statement.
Definition model.hpp:299
constexpr std::uint16_t kChordExtensionMask
Every extension bit the vocabulary defines; anything outside is rejected.
Definition model.hpp:342
constexpr std::int32_t kMaxGrooveVelocityScale
Largest admitted per-step groove velocity multiplier, in per-mille.
Definition model.hpp:545
ChordExtension
Added scale degree a chord statement carries above its quality.
Definition model.hpp:331
runtime::Result< RemappedClip, ModelError > remap_ids(const Clip &clip, ItemIdAllocator &allocator, ExternalIdFixup external={})
Remaps a clip's owned identities, optionally translating asset references.
SectionRole
Structural part a region names, independent of what the region is called.
Definition model.hpp:507
AutomationInterpolation
Interpolation applied from an automation point to its successor.
Definition automation_curve.hpp:20
ItemKind
Kind of an identity-bearing item in a Project.
Definition model.hpp:944
IdentityMutationKind
Allowed transition applied to one identity-index entry.
Definition model.hpp:1036
ChordVoicing
Non-binding hint for how a generator should spread a chord's tones.
Definition model.hpp:351
constexpr std::size_t kMaxGrooveSteps
Largest admitted number of entries in a repeating groove table.
Definition model.hpp:547
std::optional< ModelError > validate_sequence_edge(std::span< const Sequence > sequences, ItemId parent_id, ItemId child_id)
Validates one prospective parent-to-child edge against a sequence pool.
constexpr ItemId immediate_parent_id(ItemKind kind, ItemId project_id, ItemId sequence_id, ItemId track_id, ItemId clip_id, ItemId lane_id={}) noexcept
Derives the canonical immediate owner from an item's kind and coordinates.
Definition model.hpp:972
std::optional< ModelError > validate_sequence_graph(std::span< const Sequence > sequences)
Validates all SequenceRef targets, cycles, and maximum graph depth.
@ NaturalMinor
Definition model.hpp:315
@ Major
Definition model.hpp:314
@ Chromatic
Definition model.hpp:323
@ Phrygian
Definition model.hpp:319
@ Locrian
Definition model.hpp:322
@ Lydian
Definition model.hpp:320
@ Dorian
Definition model.hpp:318
@ Mixolydian
Definition model.hpp:321
@ HarmonicMinor
Definition model.hpp:316
@ MelodicMinor
Definition model.hpp:317
@ HalfDiminished7
Definition model.hpp:307
@ Suspended4
Definition model.hpp:309
@ Major
Definition model.hpp:300
@ Major7
Definition model.hpp:305
@ Suspended2
Definition model.hpp:308
@ Diminished
Definition model.hpp:302
@ Minor
Definition model.hpp:301
@ Dominant7
Definition model.hpp:304
@ Augmented
Definition model.hpp:303
@ Minor7
Definition model.hpp:306
@ kChordExtensionEleventh
Definition model.hpp:335
@ kChordExtensionFlatNinth
Definition model.hpp:333
@ kChordExtensionSharpNinth
Definition model.hpp:334
@ kChordExtensionSharpEleventh
Definition model.hpp:336
@ kChordExtensionFlatThirteenth
Definition model.hpp:338
@ kChordExtensionNinth
Definition model.hpp:332
@ kChordExtensionThirteenth
Definition model.hpp:337
@ Breakdown
Definition model.hpp:514
@ Intro
Definition model.hpp:509
@ Outro
Definition model.hpp:518
@ Solo
Definition model.hpp:516
@ Interlude
Definition model.hpp:517
@ Drop
Definition model.hpp:515
@ Unspecified
Definition model.hpp:508
@ PreChorus
Definition model.hpp:511
@ Verse
Definition model.hpp:510
@ Chorus
Definition model.hpp:512
@ Bridge
Definition model.hpp:513
@ Continuous
Definition automation_curve.hpp:22
@ DevicePlacement
Definition model.hpp:953
@ ModulationRoute
Definition model.hpp:958
@ Marker
Definition model.hpp:961
@ Asset
Definition model.hpp:946
@ Modulator
Definition model.hpp:956
@ Note
Definition model.hpp:950
@ Sequence
Definition model.hpp:947
@ MidiLanePoint
Definition model.hpp:952
@ Clip
Definition model.hpp:949
@ Slot
Definition model.hpp:964
@ Track
Definition model.hpp:948
@ AutomationLane
Definition model.hpp:954
@ Project
Definition model.hpp:945
@ Scene
Definition model.hpp:963
@ AutomationPoint
Definition model.hpp:955
@ Take
Definition model.hpp:960
@ MidiLane
Definition model.hpp:951
@ TakeLane
Definition model.hpp:959
@ MacroControl
Definition model.hpp:957
@ Region
Definition model.hpp:962
@ Deactivate
Definition model.hpp:1036
@ Reactivate
Definition model.hpp:1036
@ Insert
Definition model.hpp:1036
@ Drop3
Definition model.hpp:355
@ Rootless
Definition model.hpp:356
@ Open
Definition model.hpp:353
@ Drop2
Definition model.hpp:354
@ Close
Definition model.hpp:352
@ Shell
Definition model.hpp:357
Definition generated_event_source.hpp:33
Definition renderer3d.hpp:9
Definition host_transport_projector.hpp:8
Definition beat_division.hpp:11
constexpr SwingRatio kStraightSwing
Definition quantize.hpp:61
Definition clip_launch.hpp:30
Definition program_compiler.hpp:18
@ move
Definition web_event_translate.hpp:110
Result<T, E> — success / failure union for fallible operations.
Definition rational_time.hpp:14
Definition rational_time.hpp:9
Definition quantize.hpp:53
Sequence duration in absolute samples at an explicit rational rate.
Definition clip.hpp:195
One identity-bearing automation value at a canonical musical tick.
Definition automation_curve.hpp:29
Harmonic statement in force from position until the next event.
Definition model.hpp:363
ChordQuality chord_quality
Definition model.hpp:365
std::uint8_t chord_root
Definition model.hpp:366
std::optional< ChordVoicing > voicing
Definition model.hpp:376
constexpr auto operator<=>(const ChordScaleEvent &) const =default
timebase::TickPosition position
Definition model.hpp:364
std::uint8_t scale_root
Definition model.hpp:368
ScaleMode scale_mode
Definition model.hpp:367
std::optional< std::uint8_t > chord_bass
Definition model.hpp:373
std::uint16_t chord_extensions
Definition model.hpp:375
Durable declaration for one logical placement in a Track device chain.
Definition device_placement.hpp:117
Intensity statement in force from position until the next event.
Definition model.hpp:427
timebase::TickPosition position
Canonical tick at which this intensity statement takes effect.
Definition model.hpp:429
AutomationInterpolation interpolation
How the segment leaving this event reaches the next one.
Definition model.hpp:435
float intensity
Normalized intensity in [0, 1].
Definition model.hpp:432
constexpr bool operator==(const DynamicsEvent &) const =default
Optional non-throwing translation for an externally referenced identity.
Definition model.hpp:1177
runtime::Result< ItemId, ModelError >(* map)(void *, ItemId) noexcept
Definition model.hpp:1179
void * context
Definition model.hpp:1178
runtime::Result< ItemId, ModelError > apply(ItemId id) const noexcept
Applies the callback or returns id unchanged when none is installed.
One timing offset and per-mille accent in a repeating groove table.
Definition model.hpp:550
constexpr auto operator<=>(const GrooveStep &) const =default
timebase::TickDuration timing_offset
Definition model.hpp:551
std::int32_t velocity_scale
Definition model.hpp:552
Planned identity-index transition accompanying an immutable model edit.
Definition model.hpp:1039
ItemLocation location
Definition model.hpp:1042
ItemId item
Definition model.hpp:1041
IdentityMutationKind mutation
Definition model.hpp:1040
Nonzero monotonic identity for a Timeline-owned object.
Definition item_id.hpp:19
Canonical ownership and ancestor coordinates for one project identity.
Definition model.hpp:1012
ItemId parent_id
Definition model.hpp:1015
constexpr bool has_same_owner(const ItemLocation &other) const noexcept
Returns whether two locations have the same kind and immediate owner.
Definition model.hpp:1029
ItemId clip_id
Definition model.hpp:1018
ItemId track_id
Definition model.hpp:1017
ItemKind kind
Definition model.hpp:1013
constexpr ItemLocation() noexcept=default
constexpr auto operator<=>(const ItemLocation &) const =default
bool active
Definition model.hpp:1019
ItemId sequence_id
Definition model.hpp:1016
Diagnostic counters for persistent launcher-index allocation.
Definition model.hpp:54
std::uint64_t nodes_created
Definition model.hpp:56
std::uint64_t live_nodes
Definition model.hpp:55
A track-owned named control that a performer sets and that drives parameters through ordinary modulat...
Definition modulation.hpp:129
One authored value on a controller lane, positioned in canonical ticks.
Definition midi_lane.hpp:68
Model failure with the offending and, when relevant, conflicting identity.
Definition clip.hpp:95
One authored source-to-parameter connection.
Definition modulation.hpp:209
A track-owned generator of modulation signal.
Definition modulation.hpp:109
Diagnostic counters for persistent project identity-index allocation.
Definition model.hpp:1046
std::uint64_t live_nodes
Definition model.hpp:1047
std::uint64_t nodes_created
Definition model.hpp:1048
Independent external-reference fixups for media assets and sequences.
Definition model.hpp:1186
ExternalIdFixup sequence
Definition model.hpp:1188
ExternalIdFixup asset
Definition model.hpp:1187
Remapped clip snapshot and its complete owned-identity table.
Definition model.hpp:1192
Clip clip
Definition model.hpp:1193
IdRemapTable ids
Definition model.hpp:1194
Remapped project snapshot and complete source-to-destination identity table.
Definition model.hpp:1231
IdRemapTable ids
Definition model.hpp:1233
Project project
Definition model.hpp:1232
Remapped sequence snapshot and its complete owned-identity table.
Definition model.hpp:1202
Sequence sequence
Definition model.hpp:1203
IdRemapTable ids
Definition model.hpp:1204
Remapped track snapshot and its complete owned-identity table.
Definition model.hpp:1197
Track track
Definition model.hpp:1198
IdRemapTable ids
Definition model.hpp:1199
Authored grouping of slots presented as one launchable column.
Definition clip_launch.hpp:247
Named point on a sequence's musical timeline.
Definition model.hpp:495
timebase::TickPosition position
Definition model.hpp:498
std::string name
Definition model.hpp:497
ItemId id
Definition model.hpp:496
std::optional< std::uint32_t > color
Definition model.hpp:499
Named positive-duration span on a sequence's musical timeline.
Definition model.hpp:525
std::string name
Definition model.hpp:527
timebase::TickPosition position
Definition model.hpp:528
auto operator<=>(const SequenceRegion &) const =default
Compares every authored member, role included.
ItemId id
Definition model.hpp:526
SectionRole role
Definition model.hpp:531
timebase::TickDuration duration
Definition model.hpp:529
std::optional< std::uint32_t > color
Definition model.hpp:530
Absolute source/house-clock position corresponding to project time zero.
Definition model.hpp:916
constexpr bool operator==(const SessionStart &other) const noexcept
Compares the exact sample position and rational rate.
Definition model.hpp:921
timebase::SamplePosition start
Definition model.hpp:917
timebase::RationalRate sample_rate
Definition model.hpp:918
One authored launch slot.
Definition clip_launch.hpp:145
Sealed offline-rendered track artifact and its source-plan identity.
Definition recording.hpp:84
Diagnostic counters for persistent track clip-index allocation.
Definition model.hpp:48
std::uint64_t live_nodes
Definition model.hpp:49
std::uint64_t nodes_created
Definition model.hpp:50
Track-owned linear gain and stereo balance.
Definition recording.hpp:139
Durable statement of the tuning a project or one instrument plays in.
Definition tuning.hpp:46
Immutable authored scene, slot, quantization, and follow-action model.