Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
automation_tracklist.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2018-2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
11#ifndef __AUDIO_AUTOMATION_TRACKLIST_H__
12#define __AUDIO_AUTOMATION_TRACKLIST_H__
13
15#include "utils/yaml.h"
16
17typedef struct AutomationTrack AutomationTrack;
18typedef struct Track Track;
19typedef struct Automatable Automatable;
20typedef struct AutomationLane AutomationLane;
21
32typedef struct AutomationTracklist
33{
48 int num_ats;
49
54 size_t ats_size;
55
63 int num_ats_in_record_mode;
64
68 GPtrArray * visible_ats;
69
77
78void
79automation_tracklist_init (AutomationTracklist * self, Track * track);
80
84COLD NONNULL_ARGS (1) void automation_tracklist_init_loaded (
86 Track * track);
87
88Track *
89automation_tracklist_get_track (AutomationTracklist * self);
90
91void
92automation_tracklist_add_at (AutomationTracklist * self, AutomationTrack * at);
93
99void
101
110void
112 AutomationTracklist * self,
113 bool from_ticks,
114 bool bpm_change);
115
117automation_tracklist_get_prev_visible_at (
118 AutomationTracklist * self,
119 AutomationTrack * at);
120
122automation_tracklist_get_next_visible_at (
123 AutomationTracklist * self,
124 AutomationTrack * at);
125
126NONNULL void
127automation_tracklist_set_at_visible (
128 AutomationTracklist * self,
129 AutomationTrack * at,
130 bool visible);
131
143 AutomationTracklist * self,
144 AutomationTrack * at,
145 int delta);
146
147int
148automation_tracklist_get_visible_at_diff (
149 AutomationTracklist * self,
150 const AutomationTrack * src,
151 const AutomationTrack * dest);
152
159void
161 AutomationTracklist * self,
162 Track * track);
163
168void
170 AutomationTracklist * self,
171 AutomationTrack * at,
172 bool free,
173 bool fire_events);
174
180void
182 AutomationTracklist * self,
183 Channel * ch);
184
189void
192 AutomationTracklist * dest);
193
200
204void
206
210void
212
227void
229 AutomationTracklist * self,
230 AutomationTrack * at,
231 int index,
232 bool push_down);
233
242 AutomationTracklist * self,
243 PluginSlotType slot_type,
244 const int plugin_slot,
245 const int port_index,
246 const char * symbol);
247
248WARN_UNUSED_RESULT NONNULL AutomationTrack *
249automation_tracklist_get_first_invisible_at (AutomationTracklist * self);
250
254NONNULL int
256
263NONNULL bool
265
270WARN_UNUSED_RESULT NONNULL int
272
273NONNULL void
274automation_tracklist_print_regions (AutomationTracklist * self);
275
276NONNULL void
277automation_tracklist_set_caches (AutomationTracklist * self, CacheTypes types);
278
279NONNULL void
280automation_tracklist_free_members (AutomationTracklist * self);
281
286#endif
Automation track.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
void automation_tracklist_update_track_name_hash(AutomationTracklist *self, Track *track)
Updates the Track position of the Automatable's and AutomationTrack's.
void automation_tracklist_unselect_all(AutomationTracklist *self)
Unselects all arranger objects.
void automation_tracklist_set_at_index(AutomationTracklist *self, AutomationTrack *at, int index, bool push_down)
Sets the index of the AutomationTrack and swaps it with the AutomationTrack at that index or pushes t...
NONNULL bool automation_tracklist_validate(AutomationTracklist *self)
Verifies the identifiers on a live automation tracklist (in the project, not a clone).
WARN_UNUSED_RESULT NONNULL int automation_tracklist_get_num_regions(AutomationTracklist *self)
Counts the total number of regions in the automation tracklist.
AutomationTrack * automation_tracklist_get_at_from_port(AutomationTracklist *self, Port *port)
Returns the AutomationTrack corresponding to the given Port.
AutomationTrack * automation_tracklist_get_visible_at_after_delta(AutomationTracklist *self, AutomationTrack *at, int delta)
Returns the AutomationTrack after delta visible AutomationTrack's.
AutomationTrack * automation_tracklist_get_plugin_at(AutomationTracklist *self, PluginSlotType slot_type, const int plugin_slot, const int port_index, const char *symbol)
Gets the automation track matching the given arguments.
void automation_tracklist_print_ats(AutomationTracklist *self)
Prints info about all the automation tracks.
void automation_tracklist_remove_at(AutomationTracklist *self, AutomationTrack *at, bool free, bool fire_events)
Removes the AutomationTrack from the AutomationTracklist, optionally freeing it.
void automation_tracklist_clear(AutomationTracklist *self)
Removes all objects recursively.
void automation_tracklist_clone(AutomationTracklist *src, AutomationTracklist *dest)
Clones the automation tracklist elements from src to dest.
void automation_tracklist_remove_channel_ats(AutomationTracklist *self, Channel *ch)
Removes the AutomationTrack's associated with this channel from the AutomationTracklist in the corres...
void automation_tracklist_update_positions(AutomationTracklist *self, bool from_ticks, bool bpm_change)
Updates the frames of each position in each child of the automation tracklist recursively.
NONNULL int automation_tracklist_get_num_visible(AutomationTracklist *self)
Returns the number of visible AutomationTrack's.
PluginSlotType
Each track has an automation tracklist with automation tracks to be generated at runtime,...
size_t ats_size
Allocated size for the automation track pointer array.
Track * track
Pointer back to the track.
AutomationTrack ** ats_in_record_mode
Cache of automation tracks in record mode, used in recording manager to avoid looping over all automa...
GPtrArray * visible_ats
Cache of visible automation tracks.
AutomationTrack ** ats
Automation tracks in this automation tracklist.
A Channel is part of a Track (excluding Tracks that don't have Channels) and contains information rel...
Definition channel.h:61
Must ONLY be created via port_new()
Definition port.h:138
Track to be inserted into the Project's Tracklist.
Definition track.h:186
YAML utils.