|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|


Public Member Functions | |
| AutomationTrack (const dsp::TempoMapWrapper &tempo_map, dsp::FileAudioSourceRegistry &file_audio_source_registry, ArrangerObjectRegistry &obj_registry, dsp::ProcessorParameterUuidReference param_id, QObject *parent=nullptr) | |
| Creates an automation track for the given parameter. | |
| dsp::ProcessorParameter * | parameter () const |
| AutomationMode | getAutomationMode () const |
| void | setAutomationMode (AutomationMode automation_mode) |
| Q_SIGNAL void | automationModeChanged (AutomationMode automation_mode) |
| AutomationRecordMode | getRecordMode () const |
| void | setRecordMode (AutomationRecordMode record_mode) |
| Q_INVOKABLE void | swapRecordMode () |
| Q_SIGNAL void | recordModeChanged (AutomationRecordMode record_mode) |
| Q_INVOKABLE void | regeneratePlaybackCaches (utils::ExpandableTickRange affectedRange) |
| To be connected to to notify of any changes to the automation content. | |
| Q_SIGNAL void | automationObjectsNeedRecache (utils::ExpandableTickRange affectedRange) |
| Fired when a new cache is required. | |
| bool | should_read_automation () const |
| Returns whether the automation in the automation track should be read. | |
| bool | should_be_recording (bool record_aps) const |
| Returns if the automation track should currently be recording data. | |
| AutomationPoint * | get_automation_point_around (units::precise_tick_t position_ticks, units::precise_tick_t delta_ticks, bool search_only_backwards=false) |
Find an automation point near the given position position_ticks with a tolerance of delta_ticks. | |
| AutomationPoint * | get_automation_point_before (units::sample_t timeline_position, bool search_only_regions_enclosing_position) const |
| Returns the last automation point before the given timeline position. | |
| auto | get_region_before (units::sample_t pos_samples, bool search_only_regions_enclosing_position) const -> AutomationRegion * |
| Returns the active region at a given position, if any. | |
| std::optional< float > | get_normalized_value (units::sample_t timeline_frames, bool search_only_regions_enclosing_position) const |
| Returns the normalized parameter value at the given timeline position. | |
| bool | contains_automation () const |
| std::string | get_field_name_for_serialization (const AutomationRegion *) const override |
| Public Member Functions inherited from zrythm::structure::arrangement::ArrangerObjectOwner< arrangement::AutomationRegion > | |
| ArrangerObjectOwner (ArrangerObjectRegistry ®istry, dsp::FileAudioSourceRegistry &file_audio_source_registry, T &derived) | |
| auto & | get_children_vector () const |
| auto | get_children_view () const |
| auto | get_sorted_children_view () const |
| void | add_ticks_to_children (double ticks) |
| bool | contains_object (const ArrangerObject::Uuid &id) const |
| O(1) lookup if an object with the given ID exists. | |
| ArrangerObjectListModel * | get_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 std::string | get_field_name_for_serialization (const ChildT *) const=0 |
| Get the children field name to be used during serialization/deserialization. | |
Static Public Attributes | |
| static constexpr auto | kParamIdKey = "paramId"sv |
Properties | |
| QML_ELEMENT dsp::ProcessorParameter * | parameter |
| AutomationMode | automationMode |
| AutomationRecordMode | recordMode |
Friends | |
| void | to_json (nlohmann::json &j, const AutomationTrack &track) |
| void | from_json (const nlohmann::json &j, AutomationTrack &track) |
| void | init_from (AutomationTrack &obj, const AutomationTrack &other, utils::ObjectCloneType clone_type) |
Additional Inherited Members | |
| Public Types inherited from zrythm::structure::arrangement::ArrangerObjectOwner< arrangement::AutomationRegion > | |
| using | ArrangerObjectChildType |
| using | ArrangerObjectListModel |
Definition at line 21 of file automation_track.h.
|
inline |
Definition at line 183 of file automation_track.h.
| AutomationPoint * zrythm::structure::tracks::AutomationTrack::get_automation_point_around | ( | units::precise_tick_t | position_ticks, |
| units::precise_tick_t | delta_ticks, | ||
| bool | search_only_backwards = false ) |
Find an automation point near the given position position_ticks with a tolerance of delta_ticks.
This is used eg, in the UI to check if we should select an existing automation point on user click, or whether to create a new automation point.
| search_only_backwards | Only check previous automation points. |
| AutomationPoint * zrythm::structure::tracks::AutomationTrack::get_automation_point_before | ( | units::sample_t | timeline_position, |
| bool | search_only_regions_enclosing_position ) const |
Returns the last automation point before the given timeline position.
This first finds the relevant automation regio nusing get_region_before(), then finds the last point located before the position (converted to region-local coordinates).
|
inlineoverride |
Definition at line 186 of file automation_track.h.
| std::optional< float > zrythm::structure::tracks::AutomationTrack::get_normalized_value | ( | units::sample_t | timeline_frames, |
| bool | search_only_regions_enclosing_position ) const |
Returns the normalized parameter value at the given timeline position.
| search_only_regions_enclosing_position |
| auto zrythm::structure::tracks::AutomationTrack::get_region_before | ( | units::sample_t | pos_samples, |
| bool | search_only_regions_enclosing_position ) const->AutomationRegion * |
Returns the active region at a given position, if any.
| search_only_regions_enclosing_position | Whether to only check in regions that span the given position. If this is false, positions that end before the position are also considered. When this is true and multiple regions exist that meet the requirements, the behavior is not defined - any region could be picked. |
|
inline |
Definition at line 78 of file automation_track.h.
|
inline |
Definition at line 82 of file automation_track.h.
|
inline |
Definition at line 73 of file automation_track.h.
| Q_INVOKABLE void zrythm::structure::tracks::AutomationTrack::regeneratePlaybackCaches | ( | utils::ExpandableTickRange | affectedRange | ) |
To be connected to to notify of any changes to the automation content.
This will request new caches to be generated.
| bool zrythm::structure::tracks::AutomationTrack::should_be_recording | ( | bool | record_aps | ) | const |
Returns if the automation track should currently be recording data.
Returns false if in touch mode after the release time has passed.
This function assumes that the transport will be rolling.
| record_aps | If set to true, this function will return whether we should be recording automation point data. If set to false, this function will return whether we should be recording a region (eg, if an automation point was already created before and we are still recording inside a region regardless of whether we should create/edit automation points or not. |
|
inline |
Definition at line 84 of file automation_track.h.
|
staticconstexpr |
Definition at line 192 of file automation_track.h.
|
readwrite |
Definition at line 28 of file automation_track.h.
|
read |
Definition at line 27 of file automation_track.h.
|
readwrite |
Definition at line 29 of file automation_track.h.