Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
AutomationTrack Class Referencefinal
Inheritance diagram for AutomationTrack:
Collaboration diagram for AutomationTrack:

Public Member Functions

 AutomationTrack (PortRegistry &port_registry, ArrangerObjectRegistry &obj_registry, TrackGetter track_getter, const ControlPort::Uuid &port_id)
 Creates an automation track for the given Port.
 
QString getLabel () const
 
Q_SIGNAL void labelChanged (QString label)
 
double getHeight () const
 
void setHeight (double height)
 
Q_SIGNAL void heightChanged (double height)
 
int getAutomationMode () const
 
void setAutomationMode (int automation_mode)
 
Q_SIGNAL void automationModeChanged (int automation_mode)
 
int getRecordMode () const
 
void setRecordMode (int record_mode)
 
Q_SIGNAL void recordModeChanged (int record_mode)
 
void init_loaded ()
 
bool validate () const
 
void set_port_id (const PortUuid &port_id)
 Clone the given port identifier and take ownership of the clone.
 
void set_automation_mode (AutomationMode mode, bool fire_events)
 
void swap_record_mode ()
 
AutomationTracklistget_automation_tracklist () const
 
bool should_read_automation (RtTimePoint cur_time) const
 Returns whether the automation in the automation track should be read.
 
bool should_be_recording (RtTimePoint cur_time, bool record_aps) const
 Returns if the automation track should currently be recording data.
 
void set_index (int index)
 Sets the index of the AutomationTrack in the AutomationTracklist.
 
void init_after_cloning (const AutomationTrack &other, ObjectCloneType clone_type) override
 Clones the AutomationTrack.
 
TrackPtrVariant get_track () const
 
AutomationPointget_ap_before_pos (const Position &pos, bool ends_after, bool use_snapshots) const
 Returns the automation point before the Position on the timeline.
 
AutomationRegionget_region_before_pos (const Position &pos, bool ends_after, bool use_snapshots) const
 Returns the Region that starts before given Position, if any.
 
ControlPortget_port () const
 
float get_val_at_pos (const Position &pos, bool normalized, bool ends_after, bool use_snapshots) const
 Returns the actual parameter value at the given position.
 
int get_y_px_from_normalized_val (float normalized_val) const
 Returns the y pixels from the value based on the allocation of the automation track.
 
void set_caches (CacheType types)
 
bool contains_automation () const
 
bool verify () const
 
Location get_location (const AutomationRegion &) const override
 
std::string get_field_name_for_serialization (const AutomationRegion *) const override
 
- Public Member Functions inherited from ICloneable< AutomationTrack >
std::unique_ptr< AutomationTrackclone_unique (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
std::shared_ptr< AutomationTrackclone_shared (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
AutomationTrackclone_raw_ptr (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
AutomationTrackclone_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
QScopedPointer< AutomationTrackclone_unique_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const
 
- Public Member Functions inherited from ArrangerObjectOwner< AutomationRegion >
auto & get_children_vector ()
 
auto & get_children_vector () const
 
auto get_children_view () const
 
auto & get_children_snapshots_vector ()
 
auto & get_children_snapshots_vector () const
 
auto get_children_snapshots_view () const
 
void add_ticks_to_children (double ticks, dsp::FramesPerTick frames_per_tick)
 
ArrangerObjectListModelget_model () const
 
ArrangerObjectUuidReference remove_object (this SelfT &self, const ArrangerObject::Uuid &id)
 
void insert_object (this SelfT &self, const ArrangerObjectUuidReference &obj_ref, int idx)
 
void add_object (this SelfT &self, const ArrangerObjectUuidReference &obj_ref)
 
void clear_objects ()
 
virtual Location get_location (const ChildT &) const=0
 Returns the current location of this owner.
 
virtual std::string get_field_name_for_serialization (const ChildT *) const=0
 Get the children field name to be used during serialization/deserialization.
 
void copy_members_from (const ArrangerObjectOwner &other, ObjectCloneType clone_type)
 
void copy_children (const ArrangerObjectOwner &other)
 

Static Public Member Functions

static AutomationTrackfind_from_port_id (const PortUuid &id, bool basic_search)
 
static AutomationTrackfind_from_port (const ControlPort &port, const AutomatableTrack *track, bool basic_search)
 Finds the AutomationTrack associated with port.
 
static int get_y_px_from_height_and_normalized_val (const float height, const float normalized_val)
 

Data Fields

PortRegistryport_registry_
 
ArrangerObjectRegistryobject_registry_
 
TrackGetter track_getter_
 
int index_ = 0
 Index in parent AutomationTracklist.
 
PortUuid port_id_
 Identifier of the Port this AutomationTrack is for (owned pointer).
 
bool created_ = false
 Whether it has been created by the user yet or not.
 
bool visible_ = false
 Whether visible or not.
 
int y_ = 0
 Y local to track.
 
double height_ = AUTOMATION_TRACK_DEFAULT_HEIGHT
 Position of multipane handle.
 
float last_recorded_value_ = 0.f
 Last value recorded in this automation track.
 
AutomationMode automation_mode_ = AutomationMode::Read
 Automation mode.
 
AutomationRecordMode record_mode_ = (AutomationRecordMode) 0
 Automation record mode, when automation_mode_ is set to record.
 
bool recording_started_ = false
 To be set to true when recording starts (when the first change is received) and false when recording ends.
 
AutomationRegionrecording_region_ = nullptr
 Region currently recording to.
 
bool recording_start_sent_ = false
 This is a flag to let the recording manager know that a START signal was already sent for recording.
 
bool recording_paused_ = false
 This must only be set by the RecordingManager when temporarily pausing recording, eg when looping or leaving the punch range.
 
- Data Fields inherited from ICloneable< AutomationTrack >
friend Derived
 

Properties

QML_ELEMENT double height
 
QString label
 
int automationMode
 
int recordMode
 

Friends

void to_json (nlohmann::json &j, const AutomationTrack &track)
 
void from_json (const nlohmann::json &j, AutomationTrack &track)
 

Additional Inherited Members

- Public Types inherited from ArrangerObjectOwner< AutomationRegion >
using PortUuid
 
using ArrangerObjectChildType
 
- Protected Attributes inherited from ArrangerObjectOwner< AutomationRegion >
bool clearing_
 

Detailed Description

Definition at line 44 of file automation_track.h.


The documentation for this class was generated from the following file: