10#ifndef __AUDIO_TRACKLIST_H__
11#define __AUDIO_TRACKLIST_H__
20typedef struct Track ChordTrack;
30#define TRACKLIST (PROJECT->tracklist)
31#define MAX_TRACKS 3000
33#define tracklist_is_in_active_project(self) \
34 (self->project == PROJECT \
35 || (self->sample_processor && sample_processor_is_in_active_project (self->sample_processor)))
37#define tracklist_is_auditioner(self) \
38 (self->sample_processor && tracklist_is_in_active_project (self))
45 TRACKLIST_PIN_OPTION_PINNED_ONLY,
46 TRACKLIST_PIN_OPTION_UNPINNED_ONLY,
47 TRACKLIST_PIN_OPTION_BOTH,
153 Track ** visible_tracks,
167NONNULL OPTIMIZE_O3
Track *
171tracklist_contains_master_track (
Tracklist * self);
174tracklist_contains_chord_track (
Tracklist * self);
237 bool always_before_pos,
289tracklist_get_chord_track (const
Tracklist * self);
318 const
bool visible_only);
331 const
int visible_only);
383tracklist_import_regions (
384 GPtrArray * region_arrays,
427 GdkDragAction action);
438 Track * track_to_skip);
453tracklist_get_num_muted_tracks (const
Tracklist * self);
456tracklist_get_num_soloed_tracks (const
Tracklist * self);
459tracklist_get_num_listened_tracks (const
Tracklist * self);
501tracklist_get_total_bars (
Tracklist * self,
int * total_bars);
The backend for a timeline track.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
Track * tracklist_get_next_visible_track(Tracklist *self, Track *track)
Returns the next visible Track in the same Tracklist as the given one (ie, pinned or not).
Track * tracklist_get_visible_track_after_delta(Tracklist *self, Track *track, int delta)
Returns the Track after delta visible Track's.
void(* TracksReadyCallback)(const FileImportInfo *, const GError *)
Called when track(s) are actually imported into the project.
Track * tracklist_get_first_visible_track(Tracklist *self, const int pinned)
Returns the first visible Track.
NONNULL void tracklist_remove_track(Tracklist *self, Track *track, bool rm_pl, bool free_track, bool publish_events, bool recalc_graph)
Removes a track from the Tracklist and the TracklistSelections.
bool tracklist_multiply_track_heights(Tracklist *self, double multiplier, bool visible_only, bool check_only, bool fire_events)
Multiplies all tracks' heights and returns if the operation was valid.
void tracklist_expose_ports_to_backend(Tracklist *self)
Exposes each track's ports that should be exposed to the backend.
bool tracklist_import_files(Tracklist *self, char **uri_list, const SupportedFile *orig_file, Track *track, TrackLane *lane, int index, const Position *pos, TracksReadyCallback ready_cb, GError **error)
Begins file import Handles a file drop inside the timeline or in empty space in the tracklist.
NONNULL bool tracklist_has_soloed(const Tracklist *self)
Returns if the tracklist has soloed tracks.
Track * tracklist_find_track_by_name(Tracklist *self, const char *name)
Returns the Track matching the given name, if any.
Track * tracklist_get_track_by_type(Tracklist *self, TrackType type)
Returns the first track found with the given type.
NONNULL void tracklist_set_caches(Tracklist *self, CacheTypes types)
Set various caches (snapshots, track name hashes, plugin input/output ports, etc).
void tracklist_handle_move_or_copy(Tracklist *self, Track *this_track, TrackWidgetHighlight location, GdkDragAction action)
Handles a move or copy action based on a drag.
NONNULL void tracklist_select_all(Tracklist *self, bool select, bool fire_events)
Selects or deselects all tracks.
NONNULL OPTIMIZE_O3 Track * tracklist_find_track_by_name_hash(Tracklist *self, unsigned int hash)
Returns the Track matching the given name, if any.
bool tracklist_track_name_is_unique(Tracklist *self, const char *name, Track *track_to_skip)
Returns 1 if the track name is not taken.
void tracklist_append_track(Tracklist *self, Track *track, int publish_events, int recalc_graph)
Calls tracklist_insert_track with the given options.
void tracklist_get_visible_tracks(Tracklist *self, Track **visible_tracks, int *num_visible)
Finds visible tracks and puts them in given array.
int tracklist_get_num_visible_tracks(Tracklist *self, int visible)
NONNULL bool tracklist_has_listened(const Tracklist *self)
Returns if the tracklist has listened tracks.
int tracklist_get_visible_track_diff(Tracklist *self, const Track *src, const Track *dest)
Returns the number of visible Tracks between src and dest (negative if dest is before src).
TracklistPinOption
Used in track search functions.
int tracklist_get_track_pos(Tracklist *self, Track *track)
Returns the index of the given Track.
Tracklist * tracklist_clone(Tracklist *src)
Only clones what is needed for project save.
void tracklist_move_track(Tracklist *self, Track *track, int pos, bool always_before_pos, bool publish_events, bool recalc_graph)
Moves a track from its current position to the position given by pos.
int tracklist_get_last_pos(Tracklist *self, const TracklistPinOption pin_opt, const bool visible_only)
Returns the index of the last Track.
Track * tracklist_get_prev_visible_track(Tracklist *self, Track *track)
Returns the previous visible Track in the same Tracklist as the given one (ie, pinned or not).
void guile_tracklist_define_module(void)
Define guile module.
void tracklist_set_track_pinned(Tracklist *self, Track *track, const int pinned, int publish_events, int recalc_graph)
Pins or unpins the Track.
void tracklist_activate_all_plugins(Tracklist *self, bool activate)
Activate or deactivate all plugins.
NONNULL HOT Track * tracklist_get_track(Tracklist *self, int idx)
Returns the track at the given index or NULL if the index is invalid.
Track * tracklist_get_last_track(Tracklist *self, const TracklistPinOption pin_opt, const int visible_only)
Returns the last Track.
TrackType
The Track's type.
NONNULL void tracklist_print_tracks(Tracklist *self)
Prints the tracks (for debugging).
int tracklist_get_plugins(const Tracklist *const self, GPtrArray *arr)
Fills in the given array (if non-NULL) with all plugins in the tracklist and returns the number of pl...
void tracklist_mark_all_tracks_for_bounce(Tracklist *self, bool bounce)
Marks or unmarks all tracks for bounce.
NONNULL void tracklist_insert_track(Tracklist *self, Track *track, int pos, int publish_events, int recalc_graph)
Adds given track to given spot in tracklist.
A Position is made up of bars.beats.sixteenths.ticks.
Contains all of the info that will be serialized into a project file.
A processor to be used in the routing graph for playing samples independent of the timeline.
Metadata for a supported file.
A TrackLane belongs to a Track (can have many TrackLanes in a Track) and contains Regions.
Track to be inserted into the Project's Tracklist.
The Tracklist contains all the tracks in the Project.
Project * project
Pointer to owner project, if any.
bool swapping_tracks
When this is true, some tracks may temporarily be moved beyond num_tracks.
Track * tempo_track
The tempo track, for convenience.
Track * chord_track
The chord track, for convenience.
Track * marker_track
The marker track, for convenience.
PinnedTracklistWidget * pinned_widget
PinnedTracklistWidget.
Track * tracks[MAX_TRACKS]
All tracks that exist.
Track * modulator_track
The modulator track, for convenience.
int width
Width of track widgets.
int pinned_tracks_cutoff
Index starting from which tracks are unpinned.
TracklistWidget * widget
Non-pinned TracklistWidget.
Track * master_track
The master track, for convenience.
SampleProcessor * sample_processor
Pointer to owner sample processor, if any.