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 <stdbool.h>
14
15#include "dsp/region.h"
16
17typedef struct Track Track;
18typedef struct Position Position;
19typedef struct AutomationPoint AutomationPoint;
20typedef struct AutomationCurve AutomationCurve;
21typedef struct ZRegion ZRegion;
22
32ZRegion *
34 const Position * start_pos,
35 const Position * end_pos,
36 unsigned int track_name_hash,
37 int at_idx,
38 int idx_inside_at);
39
43void
45
46PURE int
47automation_region_sort_func (const void * _a, const void * _b);
48
52void
54
58void
59automation_region_add_ap (ZRegion * self, AutomationPoint * ap, int pub_events);
60
65NONNULL PURE AutomationPoint *
67
80 ZRegion * self,
81 AutomationPoint * ap,
82 bool check_positions,
83 bool check_transients);
84
92void
94 ZRegion * self,
95 AutomationPoint * ap,
96 bool freeing_region,
97 int free);
98
104void
106 ZRegion * self,
107 Position * pos,
108 GPtrArray * aps);
109
119 ZRegion * self,
120 Position * _pos,
121 double delta_ticks,
122 bool before_only,
123 bool use_snapshots);
124
125NONNULL bool
126automation_region_validate (ZRegion * self);
127
133NONNULL void
135
140#endif // __AUDIO_AUTOMATION_REGION_H__
A region in the timeline.
NONNULL void automation_region_free_members(ZRegion *self)
Frees members only but not the ZRegion itself.
HOT AutomationPoint * automation_region_get_next_ap(ZRegion *self, AutomationPoint *ap, bool check_positions, bool check_transients)
Returns the AutomationPoint after the given one.
void automation_region_print_automation(ZRegion *self)
Prints the automation in this Region.
void automation_region_add_ap(ZRegion *self, AutomationPoint *ap, int pub_events)
Adds an AutomationPoint to the Region.
NONNULL PURE AutomationPoint * automation_region_get_prev_ap(ZRegion *self, AutomationPoint *ap)
Returns the AutomationPoint before the given one.
AutomationPoint * automation_region_get_ap_around(ZRegion *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.
void automation_region_get_aps_since_last_recorded(ZRegion *self, Position *pos, GPtrArray *aps)
Returns the automation points since the last recorded automation point (if the last recorded automati...
ZRegion * 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 ZRegion for automation.
void automation_region_force_sort(ZRegion *self)
Forces sort of the automation points.
void automation_region_remove_ap(ZRegion *self, AutomationPoint *ap, bool freeing_region, int free)
Removes the AutomationPoint from the ZRegion, optionally freeing it.
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:126
Track to be inserted into the Project's Tracklist.
Definition track.h:177
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