audio/track.h file

The backend for a timeline track.

Contents

Classes

struct Track
Track to be inserted into the Project's Tracklist.

Enums

enum TrackType { TRACK_TYPE_INSTRUMENT, TRACK_TYPE_AUDIO, TRACK_TYPE_MASTER, TRACK_TYPE_CHORD, TRACK_TYPE_MARKER, TRACK_TYPE_AUDIO_BUS, TRACK_TYPE_AUDIO_GROUP, TRACK_TYPE_MIDI, TRACK_TYPE_MIDI_BUS, TRACK_TYPE_MIDI_GROUP }

Typedefs

using Track = struct Track
Track to be inserted into the Project's Tracklist.

Functions

void track_init(Track* self, const int add_lane)
Inits the Track, optionally adding a single lane.
auto track_new(TrackType type, char* label, const int with_lane) -> Track*
Creates a track with the given label and returns it.
auto track_clone(Track* track) -> Track*
Clones the track and returns the clone.
static auto track_type_has_channel(TrackType type) -> int
Returns if the given TrackType is a type of Track that has a Channel.
void track_set_muted(Track* track, int mute, int trigger_undo)
Sets track muted and optionally adds the action to the undo stack.
void track_set_recording(Track* track, int recording)
Sets recording and connects/disconnects the JACK ports.
void track_set_soloed(Track* track, int solo, int trigger_undo)
Sets track soloed and optionally adds the action to the undo stack.
auto track_is_selected(Track* self) -> int
Returns if Track is in TracklistSelections.
void track_add_region(Track* track, Region* region, AutomationTrack* at, int lane_pos, int gen_name, int fire_events)
Adds a Region to the given lane or AutomationTrack of the track.
void track_write_to_midi_file(const Track* self, MIDI_FILE* mf)
Writes the track to the given MIDI file.
void track_select(Track* self, int select, int exclusive, int fire_events)
Appends the Track to the selections.
void track_remove_region(Track* track, Region* region, int fire_events, int free)
Removes the region from the track.
auto track_get_region_at_pos(const Track* track, const Position* pos) -> Region*
Returns the region at the given position, or NULL.
auto track_get_last_region(Track* track) -> Region*
Returns the last Region in the track, or NULL.
static auto track_type_can_record(const TrackType type) -> int
Returns if the Track can record.
void track_setup(Track* track)
Wrapper.
auto track_get_automation_tracklist(Track* track) -> AutomationTracklist*
Returns the automation tracklist if the track type has one, or NULL if it doesn't (like chord tracks).
auto track_get_channel(Track* track) -> Channel*
Returns the channel of the track, if the track type has a channel, or NULL if it doesn't.
auto track_get_fader_automatable(Track* track) -> Automatable*
Wrapper for track types that have fader automatables.
void track_set_pos(Track* track, int pos)
Updates position in the tracklist and also updates the information in the lanes.
auto track_has_piano_roll(const Track* track) -> int
Returns if the Track should have a piano roll.
static auto track_has_inputs(const Track* track) -> int
Returns if the Track should have an inputs selector.
void track_get_velocities_in_range(const Track* track, const Position* start_pos, const Position* end_pos, Velocity*** velocities, int* num_velocities, int* velocities_size, int inside)
Fills in the array with all the velocities in the project that are within or outside the range given.
auto track_get_name(Track* track) -> const char*
Getter for the track name.
void track_set_name(Track* track, const char* name)
Setter for the track name.
void track_add_modulator(Track* track, Modulator* modulator)
Adds and connects a Modulator to the Track.
static auto track_type_is_compatible_for_moving(const TrackType type1, const TrackType type2) -> int
Returns if regions in tracks from type1 can be moved to type2.
void track_update_frames(Track* track)
Updates the frames of each position in each child of the track recursively.
auto track_get_fader_type(const Track* track) -> FaderType
Returns the FaderType corresponding to the given Track.
auto track_get_passthrough_processor_type(const Track* track) -> PassthroughProcessorType
Returns the PassthroughProcessorType corresponding to the given Track.
void track_create_missing_lanes(Track* track, const int pos)
Creates missing TrackLane's until pos.
void track_remove_empty_last_lanes(Track* track)
Removes the empty last lanes of the Track (except the last one).
void track_free(Track* track)
Wrapper for each track type.