Region struct

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

Contents

It is uniquely identified using its name (and ArrangerObjectInfo type), so name must be unique throughout the Project.

Each main Region must have its obj_info member filled in with clones.

Public variables

char* name
Unique Region name to be shown on the RegionWidget.
Position start_pos
Start position in the timeline.
Position cache_start_pos
Cache, used in runtime operations.
Position end_pos
End position in the timeline.
Position cache_end_pos
Cache, used in runtime operations.
Position true_end_pos
Position that the original region ends in, without any loops or modifications.
Position clip_start_pos
Start position of the clip.
Position loop_start_pos
Start position of the clip loop.
Position loop_end_pos
End position of the clip loop.
RegionWidget* widget
Region widget.
int track_pos
Owner Track position.
TrackLane* lane
Owner lane.
char* linked_region_name
Linked parent region.
struct Region* linked_region
cache
int muted
Muted or not.
GdkRGBA color
TODO region color independent of track.
MidiNote** midi_notes
MIDI notes.
MidiNote* unended_notes
Unended notes started in recording with MIDI NOTE ON signal but haven't received a NOTE OFF yet.
Position fade_in_pos
Position to fade in until.
Position fade_out_pos
Position to fade out from.
float* buff
Buffer holding samples/frames.
int channels
Number of channels in the audio buffer.
char* filename
Original filename.
AutomationPoint** aps
The automation points.
AutomationCurve** acs
The AutomationCurve's.
AutomationTrack* at
Pointer back to the AutomationTrack.
int at_index
Used when undo/redoing.
ChordObject** chord_objects
ChordObject's in this Region.
ArrangerObjectInfo obj_info
Info on whether this Region is transient/lane and pointers to transient/lane equivalents.

Variable documentation

Position Region::loop_start_pos

Start position of the clip loop.

The first time the region plays it will start playing from the clip_start_pos and then loop to this position.

Position Region::loop_end_pos

End position of the clip loop.

Once this is reached, the clip will go back to the clip loop start position.

int Region::track_pos

Owner Track position.

Used in actions after cloning.

char* Region::linked_region_name

Linked parent region.

Either the midi notes from this region, or the midi notes from the linked region are used

GdkRGBA Region::color

TODO region color independent of track.

If null, the track color is used.

AutomationPoint** Region::aps

The automation points.

Must always stay sorted by position.

AutomationCurve** Region::acs

The AutomationCurve's.

Their size will always be aps_size - 1 (or 0 if there are no AutomationPoint's).

AutomationTrack* Region::at

Pointer back to the AutomationTrack.

This doesn't have to be serialized - during loading, you can traverse the AutomationTrack's automation Region's and set it.