Immutable identity-bearing arrangement track. More...
#include <model.hpp>
Classes | |
| class | ClipView |
| Snapshot-owned random-access view of clips in timeline order. More... | |
Public Member Functions | |
| runtime::Result< Track, ModelError > | insert_clip (Clip clip) const |
| Returns a snapshot with a validated, non-overlapping clip inserted. | |
| runtime::Result< Track, ModelError > | erase_clip (ItemId id) const |
| Returns a snapshot without the identified clip, or MissingItem. | |
| runtime::Result< Track, ModelError > | replace_clip (Clip replacement) const |
| Replaces one clip by identity with O(log n) path-copy updates. | |
| runtime::Result< Track, ModelError > | insert_automation_lane (AutomationLane lane) const |
| Returns a snapshot with a validated automation lane inserted. | |
| runtime::Result< Track, ModelError > | erase_automation_lane (ItemId id) const |
| Returns a snapshot without the identified automation lane. | |
| runtime::Result< Track, ModelError > | insert_modulator (Modulator modulator) const |
| Returns a snapshot with a validated modulation source inserted. | |
| runtime::Result< Track, ModelError > | erase_modulator (ItemId id) const |
| Removes a modulation source; 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 > | insert_macro (MacroControl macro) const |
| Returns a snapshot with a validated macro control inserted. | |
| runtime::Result< Track, ModelError > | erase_macro (ItemId id) const |
| Removes a macro control; a route still reading it refuses. | |
| runtime::Result< Track, ModelError > | replace_macro (MacroControl replacement) const |
| Replaces one macro control without changing its identity. | |
| runtime::Result< Track, ModelError > | insert_modulation_route (ModulationRoute route) const |
| Returns a snapshot with a validated modulation route inserted. | |
| runtime::Result< Track, ModelError > | erase_modulation_route (ItemId id) const |
| Returns a snapshot without the identified modulation route. | |
| runtime::Result< Track, ModelError > | replace_modulation_route (ModulationRoute replacement) const |
| Replaces one modulation route without changing its identity. | |
| 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. | |
| runtime::Result< Track, ModelError > | erase_device (ItemId id) const |
| Removes a device declaration; attached automation/modulation refuses. | |
| 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. | |
| runtime::Result< Track, ModelError > | replace_device (DevicePlacement replacement) const |
| Replaces one declaration without changing its placement identity. | |
| runtime::Result< Track, ModelError > | insert_take_lane (TakeLane lane) const |
| Returns a snapshot with a validated take lane inserted. | |
| runtime::Result< Track, ModelError > | erase_take_lane (ItemId id) const |
| Removes a take lane unless it is currently selected. | |
| 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 > | erase_take (ItemId lane_id, ItemId take_id) const |
| Removes a take unless the lane comp still references it. | |
| runtime::Result< Track, ModelError > | with_take_comp (ItemId lane_id, std::vector< TakeCompSegment > comp) const |
| Replaces one lane's comp with validated, canonical segments. | |
| Track | with_record_armed (bool armed) const |
| Returns a snapshot with record-arm intent set to armed. | |
| runtime::Result< Track, ModelError > | with_active_take_lane (ItemId lane_id) const |
| Selects arrangement when zero, or an existing take lane otherwise. | |
| runtime::Result< Track, ModelError > | with_freeze (std::optional< TrackFreeze > freeze) const |
| Publishes or clears a validated freeze artifact. | |
| runtime::Result< Track, ModelError > | with_mixer (TrackMixer mixer) const |
| Returns a snapshot with finite, in-range gain and pan. | |
| runtime::Result< Track, ModelError > | with_tuning (std::optional< TuningReference > tuning) const |
| Returns a snapshot carrying a replacement tuning override. | |
| Track | with_name (std::string name) const |
| Returns a snapshot carrying a replacement authored name. | |
| ItemId | id () const noexcept |
| Returns the stable track identity. | |
| const std::string & | name () const noexcept |
| Returns the authored track name. | |
| ClipView | clips () const noexcept |
| Returns clips ordered by anchor, start, then identity. | |
| const Clip * | find_clip (ItemId id) const noexcept |
| Finds a clip by identity, or returns nullptr. | |
| std::span< const DevicePlacement > | device_chain () const noexcept |
| Returns device placements in authored processing order. | |
| const DevicePlacement * | find_device_placement (ItemId id) const noexcept |
| Finds a device placement by identity, or returns nullptr. | |
| std::span< const AutomationLane > | automation_lanes () const noexcept |
| Returns automation lanes in canonical identity order. | |
| const AutomationLane * | find_automation_lane (ItemId id) const noexcept |
| Finds an automation lane by identity, or returns nullptr. | |
| std::span< const Modulator > | modulators () const noexcept |
| Returns modulators in canonical identity order. | |
| const Modulator * | find_modulator (ItemId id) const noexcept |
| Finds a modulator by identity, or returns nullptr. | |
| std::span< const MacroControl > | macros () const noexcept |
| Returns macro controls in canonical identity order. | |
| const MacroControl * | find_macro (ItemId id) const noexcept |
| Finds a macro control by identity, or returns nullptr. | |
| std::span< const ModulationRoute > | modulation_routes () const noexcept |
| Returns modulation routes in canonical identity order. | |
| const ModulationRoute * | find_modulation_route (ItemId id) const noexcept |
| Finds a modulation route by identity, or returns nullptr. | |
| std::vector< ModulationRoute > | routes_from_source (ItemId source_id) const |
| Returns the routes drawing from source_id, in canonical identity order. | |
| std::span< const TakeLane > | take_lanes () const noexcept |
| Returns take lanes in canonical identity order. | |
| const TakeLane * | find_take_lane (ItemId id) const noexcept |
| Finds a take lane by identity, or returns nullptr. | |
| bool | record_armed () const noexcept |
| Returns document intent for capture into a take lane. | |
| ItemId | active_take_lane_id () const noexcept |
| Returns zero for arrangement playback or the selected take-lane identity. | |
| const std::optional< TrackFreeze > & | freeze () const noexcept |
| Returns the published optional freeze artifact. | |
| const TrackMixer & | mixer () const noexcept |
| Returns the authored track mixer. | |
| const std::optional< TuningReference > & | tuning () const noexcept |
| Returns the tuning this track overrides the project's with, if any. | |
| std::size_t | shared_index_nodes_with (const Track &other) const |
| Counts persistent clip-index nodes shared with other. | |
| bool | shares_clip_membership_with (const Track &other) const noexcept |
| Returns whether both snapshots contain the same clip identities. | |
| bool | shares_storage_with (const Track &other) const noexcept |
| Returns whether both values reference the same complete track storage. | |
Static Public Member Functions | |
| 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. | |
| static runtime::Result< Track, ModelError > | create (TrackInput input) |
| Validates and creates a track from all authored collections. | |
| static TrackIndexStats | index_stats () noexcept |
| Returns process-wide persistent clip-index diagnostic counters. | |
Friends | |
| class | Sequence |
Immutable identity-bearing arrangement track.
Owned collections use persistent storage. Successful edits return a new Track and preserve this snapshot and all borrowed views into it.
|
noexcept |
Returns zero for arrangement playback or the selected take-lane identity.
|
noexcept |
Returns automation lanes in canonical identity order.
|
noexcept |
Returns clips ordered by anchor, start, then identity.
|
static |
Creates a track containing only its identity, name, and clips.
|
static |
Validates and creates a track from all authored collections.
|
noexcept |
Returns device placements in authored processing order.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_automation_lane | ( | ItemId | id | ) | const |
Returns a snapshot without the identified automation lane.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_clip | ( | ItemId | id | ) | const |
Returns a snapshot without the identified clip, or MissingItem.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_device | ( | ItemId | id | ) | const |
Removes a device declaration; attached automation/modulation refuses.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_macro | ( | ItemId | id | ) | const |
Removes a macro control; a route still reading it refuses.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_modulation_route | ( | ItemId | id | ) | const |
Returns a snapshot without the identified modulation route.
Nothing reads a route, so this is the one modulation removal no other member can refuse: the source it named stays and only the connection goes.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_modulator | ( | ItemId | id | ) | const |
Removes a modulation source; a route still reading it refuses.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_take | ( | ItemId | lane_id, |
| ItemId | take_id ) const |
Removes a take unless the lane comp still references it.
| runtime::Result< Track, ModelError > pulp::timeline::Track::erase_take_lane | ( | ItemId | id | ) | const |
Removes a take lane unless it is currently selected.
|
noexcept |
Finds an automation lane by identity, or returns nullptr.
Finds a clip by identity, or returns nullptr.
Returned storage is snapshot-owned.
|
noexcept |
Finds a device placement by identity, or returns nullptr.
|
noexcept |
Finds a macro control by identity, or returns nullptr.
|
noexcept |
Finds a modulation route by identity, or returns nullptr.
Finds a modulator by identity, or returns nullptr.
Finds a take lane by identity, or returns nullptr.
|
noexcept |
Returns the published optional freeze artifact.
|
noexcept |
Returns the stable track identity.
|
staticnoexcept |
Returns process-wide persistent clip-index diagnostic counters.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_automation_lane | ( | AutomationLane | lane | ) | const |
Returns a snapshot with a validated automation lane inserted.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_clip | ( | Clip | clip | ) | const |
Returns a snapshot with a validated, non-overlapping clip inserted.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_device | ( | DevicePlacement | placement, |
| std::optional< ItemId > | before_device_id = std::nullopt ) const |
Inserts a typed device declaration at an authored position; empty appends.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_macro | ( | MacroControl | macro | ) | const |
Returns a snapshot with a validated macro control inserted.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_modulation_route | ( | ModulationRoute | route | ) | const |
Returns a snapshot with a validated modulation route inserted.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_modulator | ( | Modulator | modulator | ) | const |
Returns a snapshot with a validated modulation source inserted.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_take | ( | ItemId | lane_id, |
| Take | take ) const |
Inserts a take into lane_id and returns the new track snapshot.
| runtime::Result< Track, ModelError > pulp::timeline::Track::insert_take_lane | ( | TakeLane | lane | ) | const |
Returns a snapshot with a validated take lane inserted.
|
noexcept |
Returns macro controls in canonical identity order.
|
noexcept |
Returns the authored track mixer.
|
noexcept |
Returns modulation routes in canonical identity order.
|
noexcept |
Returns modulators in canonical identity order.
| runtime::Result< Track, ModelError > pulp::timeline::Track::move_device | ( | ItemId | id, |
| std::optional< ItemId > | before_device_id ) const |
Moves a device in authored order; empty selects the final position.
|
noexcept |
Returns the authored track name.
|
noexcept |
Returns document intent for capture into a take lane.
| runtime::Result< Track, ModelError > pulp::timeline::Track::replace_clip | ( | Clip | replacement | ) | const |
Replaces one clip by identity with O(log n) path-copy updates.
The old Track remains valid; untouched index subtrees are shared.
| runtime::Result< Track, ModelError > pulp::timeline::Track::replace_device | ( | DevicePlacement | replacement | ) | const |
Replaces one declaration without changing its placement identity.
| runtime::Result< Track, ModelError > pulp::timeline::Track::replace_macro | ( | MacroControl | replacement | ) | const |
Replaces one macro control without changing its identity.
| runtime::Result< Track, ModelError > pulp::timeline::Track::replace_modulation_route | ( | ModulationRoute | replacement | ) | const |
Replaces one modulation route without changing its identity.
| runtime::Result< Track, ModelError > pulp::timeline::Track::replace_modulator | ( | Modulator | replacement | ) | const |
Replaces one modulation source without changing its identity.
| std::vector< ModulationRoute > pulp::timeline::Track::routes_from_source | ( | ItemId | source_id | ) | const |
Returns the routes drawing from source_id, in canonical identity order.
This is the fan-out of one macro or modulator: the set a removal has to account for, and the set an inverse has to restore.
| std::size_t pulp::timeline::Track::shared_index_nodes_with | ( | const Track & | other | ) | const |
Counts persistent clip-index nodes shared with other.
|
noexcept |
Returns whether both snapshots contain the same clip identities.
Clip content and timing may differ.
|
noexcept |
Returns whether both values reference the same complete track storage.
|
noexcept |
Returns take lanes in canonical identity order.
|
noexcept |
Returns the tuning this track overrides the project's with, if any.
| runtime::Result< Track, ModelError > pulp::timeline::Track::with_active_take_lane | ( | ItemId | lane_id | ) | const |
Selects arrangement when zero, or an existing take lane otherwise.
| runtime::Result< Track, ModelError > pulp::timeline::Track::with_freeze | ( | std::optional< TrackFreeze > | freeze | ) | const |
Publishes or clears a validated freeze artifact.
| runtime::Result< Track, ModelError > pulp::timeline::Track::with_mixer | ( | TrackMixer | mixer | ) | const |
Returns a snapshot with finite, in-range gain and pan.
| Track pulp::timeline::Track::with_name | ( | std::string | name | ) | const |
Returns a snapshot carrying a replacement authored name.
Owned collection storage and the compile-structure token are shared with the old Track: a name is a label, not a processing property.
| Track pulp::timeline::Track::with_record_armed | ( | bool | armed | ) | const |
Returns a snapshot with record-arm intent set to armed.
Owned collection storage is shared with the old Track.
| runtime::Result< Track, ModelError > pulp::timeline::Track::with_take_comp | ( | ItemId | lane_id, |
| std::vector< TakeCompSegment > | comp ) const |
Replaces one lane's comp with validated, canonical segments.
| runtime::Result< Track, ModelError > pulp::timeline::Track::with_tuning | ( | std::optional< TuningReference > | tuning | ) | const |
Returns a snapshot carrying a replacement tuning override.
An absent override hands the track back to the project's tuning. A stated one is admitted only when valid_tuning_reference accepts it, the same helper Track::create applies, so a snapshot cannot hold a tuning a fresh construction would refuse.
|
friend |