audio/region.h file

Contents

A region in the timeline.

Classes

struct ZRegion
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.

Enums

enum RegionMusicalMode { REGION_MUSICAL_MODE_INHERIT, REGION_MUSICAL_MODE_OFF, REGION_MUSICAL_MODE_ON }
Musical mode setting for audio regions.

Typedefs

using RegionMusicalMode = enum RegionMusicalMode
Musical mode setting for audio regions.
using ZRegion = struct ZRegion
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.

Functions

void region_init(ZRegion* region, const Position* start_pos, const Position* end_pos, int track_pos, int lane_pos, int idx_inside_lane)
Only to be used by implementing structs.
auto region_find(RegionIdentifier* id) -> ZRegion*
Looks for the ZRegion matching the identifier.
void region_print(const ZRegion* region)
Print region info for debugging.
void region_set_link_group(ZRegion* region, int group_idx, bool update_identifier)
Sets the link group to the region.
auto region_find_midi_note(ZRegion* r, MidiNote* _mn) -> MidiNote*
Returns the MidiNote matching the properties of the given MidiNote.
auto region_timeline_frames_to_local(ZRegion* region, const long timeline_frames, const int normalize) -> long
Converts frames on the timeline (global) to local frames (in the clip).
void region_set_lane(ZRegion* region, TrackLane* lane)
Sets the track lane.
void region_gen_name(ZRegion* region, const char* base_name, AutomationTrack* at, Track* track)
Generates a name for the ZRegion, either using the given AutomationTrack or Track, or appending to the given base name.
void region_stretch(ZRegion* self, double ratio)
Stretch the region's contents.
void region_update_identifier(ZRegion* self)
To be called every time the identifier changes to update the region's children.
void region_update_link_group(ZRegion* self)
Updates all other regions in the region link group, if any.
void region_move_to_lane(ZRegion* region, TrackLane* lane)
Moves the given ZRegion to the given TrackLane.
void region_move_to_track(ZRegion* region, Track* track)
Moves the ZRegion to the given Track, maintaining the selection status of the ZRegion and the TrackLane position.
auto region_type_has_lane(const RegionType type) -> int
Returns if the given ZRegion type can exist in TrackLane's.
void region_set_automation_track(ZRegion* region, AutomationTrack* at)
Sets the automation track.
auto region_get_automation_track(ZRegion* region) -> AutomationTrack*
Gets the AutomationTrack using the saved index.
void region_copy(ZRegion* src, ZRegion* dest)
Copies the data from src to dest.
auto region_is_hit(const ZRegion* region, const long gframes, const int inclusive) -> int
Returns if the position is inside the region or not.
auto region_is_hit_by_range(const ZRegion* region, const long gframes_start, const long gframes_end, const int end_inclusive) -> int
Returns if any part of the ZRegion is inside the given range, inclusive.
auto region_at_position(Track* track, AutomationTrack* at, Position* pos) -> ZRegion*
Returns the region at the given position in the given Track.
auto region_generate_filename(ZRegion* region) -> char*
Generates the filename for this region.
void region_set_name(ZRegion* region, const char* name, int fire_events)
Sets ZRegion name (without appending anything to it) to all associated regions.
auto region_is_recording(ZRegion* self) -> bool
Returns if this region is currently being recorded onto.
auto region_get_musical_mode(ZRegion* self) -> bool
Returns whether the region is effectively in musical mode.
void region_remove_midi_note(ZRegion* region, MidiNote* midi_note)
Removes the MIDI note and its components completely.
void region_unlink(ZRegion* region)
Removes the link group from the region, if any.
void region_remove_all_children(ZRegion* region)
Removes all children objects from the region.
void region_copy_children(ZRegion* dest, ZRegion* src)
Clones and copies all children from src to dest.
auto region_get_arranger_selections(ZRegion* self) -> ArrangerSelections*
Returns the ArrangerSelections based on the given region type.
auto region_sanity_check(ZRegion* self, bool is_project) -> bool
Sanity checking.
void region_disconnect(ZRegion* self)
Disconnects the region and anything using it.

Defines

#define region_type_can_fade(rtype)
Returns if the given ZRegion type can have fades.