Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
automation_region.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __AUDIO_AUTOMATION_REGION_H__
11#define __AUDIO_AUTOMATION_REGION_H__
12
13#include "dsp/region.h"
14
15typedef struct Track Track;
16typedef struct Position Position;
17typedef struct AutomationPoint AutomationPoint;
18typedef struct AutomationCurve AutomationCurve;
19typedef struct Region Region;
20
30Region *
32 const Position * start_pos,
33 const Position * end_pos,
34 unsigned int track_name_hash,
35 int at_idx,
36 int idx_inside_at);
37
41void
43
44int
45automation_region_sort_func (const void * _a, const void * _b);
46
50void
52
56void
57automation_region_add_ap (Region * self, AutomationPoint * ap, int pub_events);
58
63NONNULL AutomationPoint *
65
78 Region * self,
79 AutomationPoint * ap,
80 bool check_positions,
81 bool check_transients);
82
90void
92 Region * self,
93 AutomationPoint * ap,
94 bool freeing_region,
95 int free);
96
102void
104 Region * self,
105 Position * pos,
106 GPtrArray * aps);
107
117 Region * self,
118 Position * _pos,
119 double delta_ticks,
120 bool before_only,
121 bool use_snapshots);
122
123NONNULL bool
124automation_region_validate (Region * self);
125
131NONNULL void
133
138#endif // __AUDIO_AUTOMATION_REGION_H__
A region in the timeline.
void automation_region_remove_ap(Region *self, AutomationPoint *ap, bool freeing_region, int free)
Removes the AutomationPoint from the Region, optionally freeing it.
NONNULL void automation_region_free_members(Region *self)
Frees members only but not the Region itself.
NONNULL AutomationPoint * automation_region_get_prev_ap(Region *self, AutomationPoint *ap)
Returns the AutomationPoint before the given one.
void automation_region_force_sort(Region *self)
Forces sort of the automation points.
void automation_region_get_aps_since_last_recorded(Region *self, Position *pos, GPtrArray *aps)
Returns the automation points since the last recorded automation point (if the last recorded automati...
void automation_region_add_ap(Region *self, AutomationPoint *ap, int pub_events)
Adds an AutomationPoint to the Region.
AutomationPoint * automation_region_get_ap_around(Region *self, Position *_pos, double delta_ticks, bool before_only, bool use_snapshots)
Returns an automation point found within +/- delta_ticks from the position, or NULL.
Region * automation_region_new(const Position *start_pos, const Position *end_pos, unsigned int track_name_hash, int at_idx, int idx_inside_at)
Creates a new Region for automation.
void automation_region_print_automation(Region *self)
Prints the automation in this Region.
HOT AutomationPoint * automation_region_get_next_ap(Region *self, AutomationPoint *ap, bool check_positions, bool check_transients)
Returns the AutomationPoint after the given one.
Position end_pos
End Position, if the object has one.
Position pos
Position (or start Position if the object has length).
An automation point inside an AutomationTrack.
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:124
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
Definition region.h:72
AutomationPoint ** aps
The automation points this region contains.
Definition region.h:197
Track to be inserted into the Project's Tracklist.
Definition track.h:177