Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
track.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __AUDIO_TRACK_H__
11#define __AUDIO_TRACK_H__
12
14#include "dsp/channel.h"
15#include "dsp/chord_object.h"
16#include "dsp/marker.h"
18#include "dsp/region.h"
19#include "dsp/scale.h"
20#include "dsp/scale_object.h"
21#include "dsp/track_lane.h"
22#include "dsp/track_processor.h"
23#include "plugins/plugin.h"
24#include "utils/yaml.h"
25
26#include <glib/gi18n.h>
27
29typedef struct Region Region;
30typedef struct Position Position;
31typedef struct _TrackWidget TrackWidget;
32typedef struct _FolderChannelWidget FolderChannelWidget;
33typedef struct Channel Channel;
34typedef struct MidiEvents MidiEvents;
35typedef struct AutomationTrack AutomationTrack;
36typedef struct Automatable Automatable;
37typedef struct AutomationPoint AutomationPoint;
38typedef struct ChordObject ChordObject;
39typedef struct MusicalScale MusicalScale;
40typedef struct Modulator Modulator;
41typedef struct Marker Marker;
43typedef struct Tracklist Tracklist;
44typedef struct SupportedFile SupportedFile;
46enum class PassthroughProcessorType;
47enum class FaderType;
48typedef void MIDI_FILE;
49typedef struct _WrappedObjectWithChangeSignal WrappedObjectWithChangeSignal;
50
51TYPEDEF_STRUCT_UNDERSCORED (FileImportInfo);
52
59#define TRACK_MIN_HEIGHT 24
60#define TRACK_DEF_HEIGHT 48
61
62#define TRACK_MAGIC 21890135
63#define IS_TRACK(x) (((Track *) x)->magic == TRACK_MAGIC)
64#define IS_TRACK_AND_NONNULL(x) (x && IS_TRACK (x))
65
66#define TRACK_MAX_MODULATOR_MACROS 128
67
68#define TRACK_DND_PREFIX Z_DND_STRING_PREFIX "Track::"
69
70#define track_is_in_active_project(self) \
71 (self->tracklist && tracklist_is_in_active_project (self->tracklist))
72
75#define track_is_auditioner(self) \
76 (self->tracklist && tracklist_is_auditioner (self->tracklist))
77
161
162static const char * track_type_strings[] = {
163 N_ ("Instrument"), N_ ("Audio"), N_ ("Master"), N_ ("Chord"),
164 N_ ("Marker"), N_ ("Tempo"), N_ ("Modulator"), N_ ("Audio FX"),
165 N_ ("Audio Group"), N_ ("MIDI"), N_ ("MIDI FX"), N_ ("MIDI Group"),
166 N_ ("Folder"),
167};
168
176typedef struct Track
177{
184 int pos;
185
188
190 char * name;
191
193 unsigned int name_hash;
194
196 char * icon_name;
197
203
208
211
214
217
221
224
227
237
245
251 GdkRGBA color;
252
253 /* ==== INSTRUMENT/MIDI/AUDIO TRACK ==== */
254
257 int num_lanes;
258 size_t lanes_size;
259
262 int num_lane_snapshots;
263
265 uint8_t midi_ch;
266
274
283
292
302
312
322
326
327 /* ==== INSTRUMENT/MIDI/AUDIO TRACK END ==== */
328
329 /* ==== AUDIO TRACK ==== */
330
333
334 /* ==== AUDIO TRACK END ==== */
335
336 /* ==== CHORD TRACK ==== */
337
344 int num_chord_regions;
345 size_t chord_regions_size;
346
349 int num_chord_region_snapshots;
350
357 int num_scales;
358 size_t scales_size;
359
362 int num_scale_snapshots;
363
364 /* ==== CHORD TRACK END ==== */
365
366 /* ==== MARKER TRACK ==== */
367
368 Marker ** markers;
369 int num_markers;
370 size_t markers_size;
371
374 int num_marker_snapshots;
375
376 /* ==== MARKER TRACK END ==== */
377
378 /* ==== TEMPO TRACK ==== */
379
382
385
388
389 /* ==== TEMPO TRACK END ==== */
390
391 /* ==== FOLDABLE TRACK ==== */
392
398 int size;
399
401 bool folded;
402
403 /* ==== FOLDABLE TRACK END ==== */
404
405 /* ==== MODULATOR TRACK ==== */
406
409 int num_modulators;
410 size_t modulators_size;
411
413 ModulatorMacroProcessor * modulator_macros[TRACK_MAX_MODULATOR_MACROS];
414 int num_modulator_macros;
415 int num_visible_modulator_macros;
416
417 /* ==== MODULATOR TRACK END ==== */
418
419 /* ==== CHANNEL TRACK ==== */
420
423
424 /* ==== CHANNEL TRACK END ==== */
425
433
434 AutomationTracklist automation_tracklist;
435
445
451
457
459 char * comment;
460
467 bool bounce;
468
474
481 unsigned int * children;
482 int num_children;
483 size_t children_size;
484
486 bool frozen;
487
490
491 int magic;
492
495
498
501
514
517
520} Track;
521
522COLD NONNULL_ARGS (1) void track_init_loaded (
523 Track * self,
524 Tracklist * tracklist,
526
535void
536track_init (Track * self, const int add_lane);
537
548Track *
549track_new (TrackType type, int pos, const char * label, const int with_lane);
550
556NONNULL_ARGS (1) Track * track_clone (Track * track, GError ** error);
557
562bool
564
565static inline bool
566track_type_can_have_direct_out (TrackType type)
567{
568 return type != TrackType::TRACK_TYPE_MASTER;
569}
570
571static inline bool
572track_type_can_have_region_type (TrackType type, RegionType region_type)
573{
574 switch (region_type)
575 {
576 case RegionType::REGION_TYPE_AUDIO:
577 return type == TrackType::TRACK_TYPE_AUDIO;
578 case RegionType::REGION_TYPE_MIDI:
579 return type == TrackType::TRACK_TYPE_MIDI
581 case RegionType::REGION_TYPE_CHORD:
582 return type == TrackType::TRACK_TYPE_CHORD;
583 case RegionType::REGION_TYPE_AUTOMATION:
584 return true;
585 }
586
587 g_return_val_if_reached (false);
588}
589
590static inline bool
591track_type_is_foldable (TrackType type)
592{
593 return type == TrackType::TRACK_TYPE_FOLDER
596}
597
598static inline bool
599track_type_is_copyable (TrackType type)
600{
605}
606
610NONNULL void
612
613#define track_get_name_hash(self) g_str_hash (self->name)
614
619NONNULL void
621 Track * track,
622 bool mute,
623 bool trigger_undo,
624 bool auto_select,
625 bool fire_events);
626
631NONNULL void
633 Track * self,
634 bool folded,
635 bool trigger_undo,
636 bool auto_select,
637 bool fire_events);
638
639NONNULL TrackType
640track_get_type_from_plugin_descriptor (PluginDescriptor * descr);
641
646NONNULL bool
648
649NONNULL Tracklist *
650track_get_tracklist (Track * self);
651
658NONNULL bool
660
668NONNULL double
670
671bool
672track_multiply_heights (
673 Track * self,
674 double multiplier,
675 bool visible_only,
676 bool check_only);
677
681HOT NONNULL bool
683
689NONNULL bool
691
695NONNULL bool
697
701NONNULL bool
703
707NONNULL bool
709
713NONNULL void
715 Track * self,
716 bool monitor,
717 bool auto_select,
718 bool fire_events);
719
731NONNULL void
733 Track * self,
734 bool listen,
735 bool trigger_undo,
736 bool auto_select,
737 bool fire_events);
738
739HOT NONNULL bool
740track_get_recording (const Track * const track);
741
746NONNULL void
747track_set_recording (Track * track, bool recording, bool fire_events);
748
760NONNULL void
762 Track * self,
763 bool solo,
764 bool trigger_undo,
765 bool auto_select,
766 bool fire_events);
767
771NONNULL bool
772track_has_soloed_lanes (const Track * const self);
773
777NONNULL int
779
783#define track_is_pinned(x) (x->pos < TRACKLIST->pinned_tracks_cutoff)
784
800#define track_add_region( \
801 self, region, at, lane_pos, gen_name, fire_events, error) \
802 track_insert_region ( \
803 self, region, at, lane_pos, -1, gen_name, fire_events, error)
804
825bool
827 Track * track,
828 Region * region,
829 AutomationTrack * at,
830 int lane_pos,
831 int idx,
832 int gen_name,
833 int fire_events,
834 GError ** error);
835
846NONNULL_ARGS (1, 2)
848 const Track * self,
849 MIDI_FILE * mf,
850 MidiEvents * events,
851 const Position * start,
852 const Position * end,
853 bool lanes_as_tracks,
854 bool use_track_pos);
855
863NONNULL void
864track_select (Track * self, bool select, bool exclusive, bool fire_events);
865
869NONNULL void
871
872NONNULL bool
873track_contains_uninstantiated_plugin (const Track * const self);
874
878NONNULL void
880
886NONNULL void
887track_remove_region (Track * self, Region * region, bool fire_events, bool free);
888
900void
902 const Track * self,
903 const EngineProcessTimeInfo * const time_nfo,
904 MidiEvents * midi_events,
905 StereoPorts * stereo_ports);
906
913bool
915
923void
924track_add_folder_parents (const Track * self, GPtrArray * parents, bool prepend);
925
929Track *
931
937void
939
947Region *
949 const Track * track,
950 const Position * pos,
951 bool include_region_end);
952
957Region *
959
963void
964track_set_lanes_visible (Track * track, const int visible);
965
969void
970track_set_automation_visible (Track * track, const bool visible);
971
976int
978
979static inline bool
980track_type_has_mono_compat_switch (const TrackType tt)
981{
984}
985
986#define track_type_is_audio_group track_type_has_mono_compat_switch
987
988static inline bool
989track_type_is_fx (const TrackType type)
990{
993}
994
998static inline int
999track_type_can_record (const TrackType type)
1000{
1004}
1005
1012void
1014
1018void
1020
1025static inline AutomationTracklist *
1026track_get_automation_tracklist (Track * const track)
1027{
1028 g_return_val_if_fail (IS_TRACK (track), NULL);
1029
1030 switch (track->type)
1031 {
1034 break;
1046 return &track->automation_tracklist;
1047 default:
1048 g_warn_if_reached ();
1049 break;
1050 }
1051
1052 return NULL;
1053}
1054
1059NONNULL static inline Channel *
1060track_get_channel (const Track * const track)
1061{
1062 switch (track->type)
1063 {
1073 return track->channel;
1074 default:
1075 return NULL;
1076 }
1077}
1078
1084void
1086
1090CONST
1091static inline bool
1092track_type_has_piano_roll (const TrackType type)
1093{
1094 return type == TrackType::TRACK_TYPE_MIDI
1096}
1097
1102static inline int
1103track_has_inputs (const Track * track)
1104{
1105 return track->type == TrackType::TRACK_TYPE_MIDI
1107 || track->type == TrackType::TRACK_TYPE_AUDIO;
1108}
1109
1110Track *
1111track_find_by_name (const char * name);
1112
1121void
1123 const Track * track,
1124 const Position * start_pos,
1125 const Position * end_pos,
1126 Velocity *** velocities,
1127 int * num_velocities,
1128 size_t * velocities_size,
1129 int inside);
1130
1134const char *
1136
1141NONNULL bool
1142track_set_name_with_action_full (Track * track, const char * name);
1143
1148void
1149track_set_name_with_action (Track * track, const char * name);
1150
1159void
1160track_set_name (Track * self, const char * name, bool pub_events);
1161
1166char *
1167track_get_unique_name (Track * track_to_skip, const char * name);
1168
1175Track *
1176track_get_from_name (const char * name);
1177
1178const char *
1179track_stringize_type (TrackType type);
1180
1185static inline int
1186track_type_is_compatible_for_moving (const TrackType type1, const TrackType type2)
1187{
1188 return type1 == type2
1191}
1192
1201void
1202track_update_positions (Track * self, bool from_ticks, bool bpm_change);
1203
1210Fader *
1211track_get_fader (Track * track, bool post_fader);
1212
1219
1226
1232bool
1233track_create_missing_lanes (Track * self, const int pos);
1234
1239void
1241
1249int
1251 Track * self,
1252 Position * p1,
1253 Position * p2,
1254 Region ** regions);
1255
1261int
1262track_get_plugins (const Track * const self, GPtrArray * arr);
1263
1264void
1265track_activate_all_plugins (Track * track, bool activate);
1266
1272void
1273track_comment_setter (void * track, const char * comment);
1274
1278void
1279track_set_comment (Track * self, const char * comment, bool undoable);
1280
1284const char *
1285track_get_comment (void * track);
1286
1290void
1292 Track * self,
1293 const GdkRGBA * color,
1294 bool undoable,
1295 bool fire_events);
1296
1300void
1302 Track * self,
1303 const char * icon_name,
1304 bool undoable,
1305 bool fire_events);
1306
1313Plugin *
1314track_get_plugin_at_slot (Track * track, ZPluginSlotType slot_type, int slot);
1315
1327void
1329 Track * self,
1330 bool bounce,
1331 bool mark_regions,
1332 bool mark_children,
1333 bool mark_parents);
1334
1339void
1340track_append_ports (Track * self, GPtrArray * ports, bool include_plugins);
1341
1355bool
1356track_freeze (Track * self, bool freeze, GError ** error);
1357
1365void
1367 Track * self,
1368 Plugin * pl,
1369 ZPluginSlotType slot_type,
1370 int slot,
1371 bool instantiate_plugin,
1372 bool replacing_plugin,
1373 bool moving_plugin,
1374 bool confirm,
1375 bool gen_automatables,
1376 bool recalc_graph,
1377 bool fire_events);
1378
1383void
1385 Track * self,
1386 ZPluginSlotType slot_type,
1387 int slot,
1388 bool replacing_plugin,
1389 bool moving_plugin,
1390 bool deleting_plugin,
1391 bool deleting_track,
1392 bool recalc_graph);
1393
1404void
1405track_disconnect (Track * self, bool remove_pl, bool recalc_graph);
1406
1407NONNULL bool
1408track_is_enabled (Track * self);
1409
1410NONNULL void
1411track_set_enabled (
1412 Track * self,
1413 bool enabled,
1414 bool trigger_undo,
1415 bool auto_select,
1416 bool fire_events);
1417
1418static inline const char *
1419track_type_to_string (TrackType type)
1420{
1421 return track_type_strings[static_cast<int> (type)];
1422}
1423
1425track_type_get_from_string (const char * str);
1426
1427void
1428track_get_total_bars (Track * self, int * total_bars);
1429
1434void
1435track_set_caches (Track * self, CacheTypes types);
1436
1441typedef void (*TracksReadyCallback) (const FileImportInfo *, const GError *);
1442
1448bool
1450 TrackType type,
1451 const PluginSetting * pl_setting,
1452 const SupportedFile * file_descr,
1453 const Position * pos,
1454 int index,
1455 int num_tracks,
1456 int disable_track_idx,
1457 TracksReadyCallback ready_cb,
1458 GError ** error);
1459
1460Track *
1461track_create_empty_at_idx_with_action (TrackType type, int index, GError ** error);
1462
1463Track *
1464track_create_for_plugin_at_idx_w_action (
1465 TrackType type,
1466 const PluginSetting * pl_setting,
1467 int index,
1468 GError ** error);
1469
1474#define track_create_empty_with_action(type, error) \
1475 track_create_empty_at_idx_with_action (type, TRACKLIST->num_tracks, error)
1476
1477GMenu *
1478track_generate_edit_context_menu (Track * track, int num_selected);
1479
1484GMenu *
1486
1490void
1492
1497#endif // __AUDIO_TRACK_H__
Automation tracklist containing automation points and curves.
API for Channel, representing a channel strip on the mixer.
Chord object in the TimelineArranger.
Marker related code.
A region in the timeline.
Scale object inside the chord Track in the TimelineArranger.
NONNULL_ARGS(1) int undo_manager_undo(UndoManager *self
Undo last action.
NONNULL bool track_get_listened(Track *self)
Returns if the track is listened.
NONNULL void track_set_monitor_audio(Track *self, bool monitor, bool auto_select, bool fire_events)
Sets whether monitor audio is on.
void(* TracksReadyCallback)(const FileImportInfo *, const GError *)
Called when track(s) are actually imported into the project.
Definition track.h:1441
GMenu * track_generate_channel_context_menu(Track *track)
Generates a menu to be used for channel-related items, eg, fader buttons, direct out,...
void track_remove_plugin(Track *self, ZPluginSlotType slot_type, int slot, bool replacing_plugin, bool moving_plugin, bool deleting_plugin, bool deleting_track, bool recalc_graph)
Wrapper over channel_remove_plugin() and modulator_track_remove_modulator().
FaderType
Fader type.
Definition fader.h:56
bool track_create_with_action(TrackType type, const PluginSetting *pl_setting, const SupportedFile *file_descr, const Position *pos, int index, int num_tracks, int disable_track_idx, TracksReadyCallback ready_cb, GError **error)
NONNULL int track_is_selected(Track *self)
Returns if Track is in TracklistSelections.
void track_disconnect(Track *self, bool remove_pl, bool recalc_graph)
Disconnects the track from the processing chain.
void track_append_ports(Track *self, GPtrArray *ports, bool include_plugins)
Appends all channel ports and optionally plugin ports to the array.
bool track_freeze(Track *self, bool freeze, GError **error)
Freezes or unfreezes the track.
Track * track_get_direct_folder_parent(Track *track)
Returns the closest foldable parent or NULL.
Plugin * track_get_plugin_at_slot(Track *track, ZPluginSlotType slot_type, int slot)
Returns the plugin at the given slot, if any.
const char * track_get_name(Track *track)
Getter for the track name.
void track_add_folder_parents(const Track *self, GPtrArray *parents, bool prepend)
Adds the track's folder parents to the given array.
int track_get_plugins(const Track *const self, GPtrArray *arr)
Fills in the given array (if non-NULL) with all plugins in the track and returns the number of plugin...
Fader * track_get_fader(Track *track, bool post_fader)
Returns the Fader (if applicable).
void track_update_children(Track *self)
Updates the track's children.
void track_write_to_midi_file(const Track *self, MIDI_FILE *mf, MidiEvents *events, const Position *start, const Position *end, bool lanes_as_tracks, bool use_track_pos)
Writes the track to the given MIDI file.
Region * track_get_region_at_pos(const Track *track, const Position *pos, bool include_region_end)
Returns the region at the given position, or NULL.
HOT NONNULL bool track_get_soloed(Track *self)
Returns if the track is soloed.
Region * track_get_last_region(Track *track)
Returns the last Region in the track, or NULL.
ZPortType
Type of signals the Port handles.
bool track_type_has_channel(TrackType type)
Returns if the given TrackType is a type of Track that has a Channel.
void track_set_lanes_visible(Track *track, const int visible)
Set track lanes visible and fire events.
void track_get_velocities_in_range(const Track *track, const Position *start_pos, const Position *end_pos, Velocity ***velocities, int *num_velocities, size_t *velocities_size, int inside)
Fills in the array with all the velocities in the project that are within or outside the range given.
bool track_create_missing_lanes(Track *self, const int pos)
Creates missing TrackLane's until pos.
NONNULL bool track_set_name_with_action_full(Track *track, const char *name)
Internally called by track_set_name_with_action().
bool track_insert_region(Track *track, Region *region, AutomationTrack *at, int lane_pos, int idx, int gen_name, int fire_events, GError **error)
Inserts a Region to the given lane or AutomationTrack of the track, at the given index.
void track_mark_for_bounce(Track *self, bool bounce, bool mark_regions, bool mark_children, bool mark_parents)
Marks the track for bouncing.
void track_set_color(Track *self, const GdkRGBA *color, bool undoable, bool fire_events)
Sets the track color.
FaderType track_type_get_prefader_type(TrackType type)
Returns the prefader type corresponding to the given Track.
void track_update_positions(Track *self, bool from_ticks, bool bpm_change)
Updates the frames/ticks of each position in each child of the track recursively.
void track_remove_from_folder_parents(Track *self)
Remove the track from all folders.
NONNULL void track_set_muted(Track *track, bool mute, bool trigger_undo, bool auto_select, bool fire_events)
Sets track muted and optionally adds the action to the undo stack.
void track_insert_plugin(Track *self, Plugin *pl, ZPluginSlotType slot_type, int slot, bool instantiate_plugin, bool replacing_plugin, bool moving_plugin, bool confirm, bool gen_automatables, bool recalc_graph, bool fire_events)
Wrapper over channel_add_plugin() and modulator_track_insert_modulator().
void track_fill_events(const Track *self, const EngineProcessTimeInfo *const time_nfo, MidiEvents *midi_events, StereoPorts *stereo_ports)
Wrapper for audio and MIDI/instrument tracks to fill in MidiEvents or StereoPorts from the timeline d...
FaderType track_get_fader_type(const Track *track)
Returns the FaderType corresponding to the given Track.
NONNULL double track_get_full_visible_height(Track *const self)
Returns the full visible height (main height + height of all visible automation tracks + height of al...
void track_remove_empty_last_lanes(Track *self)
Removes the empty last lanes of the Track (except the last one).
void track_set_name(Track *self, const char *name, bool pub_events)
Setter for the track name.
void track_setup(Track *track)
Wrapper.
void track_generate_automation_tracks(Track *track)
Generates automatables for the track.
NONNULL void track_unselect_all(Track *self)
Unselects all arranger objects in the track.
int track_type_can_host_region_type(const TrackType tt, const RegionType rt)
Returns if the given TrackType can host the given RegionType.
void track_set_caches(Track *self, CacheTypes types)
Set various caches (snapshots, track name hash, plugin input/output ports, etc).
NONNULL void track_set_magic(Track *self)
Sets magic on objects recursively.
bool track_validate(Track *self)
Verifies the identifiers on a live Track (in the project, not a clone).
void track_set_name_with_action(Track *track, const char *name)
Setter to be used by the UI to create an undoable action.
NONNULL void track_set_listened(Track *self, bool listen, bool trigger_undo, bool auto_select, bool fire_events)
Sets track soloed, updates UI and optionally adds the action to the undo stack.
void track_free(Track *track)
Wrapper for each track type.
char * track_get_unique_name(Track *track_to_skip, const char *name)
Returns a unique name for a new track based on the given name.
void track_init(Track *self, const int add_lane)
Inits the Track, optionally adding a single lane.
const char * track_get_comment(void *track)
Comment getter.
NONNULL void track_clear(Track *self)
Removes all objects recursively from the track.
RegionType
Type of Region.
NONNULL bool track_get_monitor_audio(Track *self)
Returns whether monitor audio is on.
NONNULL void track_set_folded(Track *self, bool folded, bool trigger_undo, bool auto_select, bool fire_events)
Sets track folded and optionally adds the action to the undo stack.
NONNULL bool track_get_implied_soloed(Track *self)
Returns whether the track is not soloed on its own but its direct out (or its direct out's direct out...
NONNULL bool track_has_soloed_lanes(const Track *const self)
Returns whether the track has any soloed lanes.
void track_set_icon(Track *self, const char *icon_name, bool undoable, bool fire_events)
Sets the track icon.
void track_set_automation_visible(Track *track, const bool visible)
Set automation visible and fire events.
NONNULL void track_set_recording(Track *track, bool recording, bool fire_events)
Sets recording and connects/disconnects the JACK ports.
Track * track_get_from_name(const char *name)
Returns the Track from the Project matching name.
NONNULL bool track_get_should_be_visible(const Track *self)
Returns whether the track should be visible.
NONNULL void track_select(Track *self, bool select, bool exclusive, bool fire_events)
Appends the Track to the selections.
TrackType
The Track's type.
Definition track.h:82
NONNULL void track_remove_region(Track *self, Region *region, bool fire_events, bool free)
Only removes the region from the track.
int track_get_regions_in_range(Track *self, Position *p1, Position *p2, Region **regions)
Returns all the regions inside the given range, or all the regions if both p1 and p2 are NULL.
void track_set_comment(Track *self, const char *comment, bool undoable)
NONNULL bool track_type_is_deletable(TrackType type)
Returns whether the track type is deletable by the user.
NONNULL void track_set_soloed(Track *self, bool solo, bool trigger_undo, bool auto_select, bool fire_events)
Sets track soloed, updates UI and optionally adds the action to the undo stack.
Track * track_new(TrackType type, int pos, const char *label, const int with_lane)
Creates a track with the given label and returns it.
void track_comment_setter(void *track, const char *comment)
Comment setter.
NONNULL bool track_get_muted(Track *self)
Returns if the track is muted.
@ TRACK_TYPE_INSTRUMENT
Instrument tracks must have an Instrument plugin at the first slot and they produce audio output.
@ TRACK_TYPE_MIDI
Midi tracks can only have MIDI effects in the strip and produce MIDI output that can be routed to ins...
@ TRACK_TYPE_AUDIO
Audio tracks can record and contain audio clips.
@ TRACK_TYPE_MODULATOR
Special track to contain global Modulator's.
@ TRACK_TYPE_AUDIO_BUS
Buses are channels that receive audio input and have effects on their channel strip.
@ TRACK_TYPE_TEMPO
Special track for BPM (tempo) and time signature events.
@ TRACK_TYPE_MASTER
The master track is a special type of group track.
@ TRACK_TYPE_MARKER
Marker Track's contain named markers at specific Position's in the song.
@ TRACK_TYPE_AUDIO_GROUP
Group Tracks are used for grouping audio signals, for example routing multiple drum tracks to a "Drum...
@ TRACK_TYPE_MIDI_GROUP
Same with audio group but for MIDI signals.
@ TRACK_TYPE_FOLDER
Foldable track used for visual grouping.
@ TRACK_TYPE_MIDI_BUS
Same with audio bus but for MIDI signals.
@ TRACK_TYPE_CHORD
The chord track contains chords that can be used to modify midi in real time or to color the piano ro...
ZPluginSlotType
Modulator macro button processor.
Base plugin.
Musical scales.
An automation point inside an AutomationTrack.
Each track has an automation tracklist with automation tracks to be generated at runtime,...
A Channel is part of a Track (excluding Tracks that don't have Channels) and contains information rel...
Definition channel.h:57
A ChordObject to be shown in the TimelineArrangerWidget.
Common struct to pass around during processing to avoid repeating the data in function arguments.
Definition types.h:142
A Fader is a processor that is used for volume controls and pan.
Definition fader.h:91
Marker for the MarkerTrack.
Definition marker.h:50
Container for passing midi events through ports.
Definition midi_event.h:62
Modulator macro button processor.
Musical scale descriptor.
Definition scale.h:130
A setting for a specific plugin descriptor.
The base plugin Inheriting plugins must have this as a child.
Definition plugin.h:74
Must ONLY be created via port_new()
Definition port.h:136
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:124
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
Definition region.h:72
A ScaleObject to be shown in the TimelineArrangerWidget.
L & R port, for convenience.
Definition port.h:501
Stretcher interface.
Definition stretcher.h:43
Metadata for a supported file.
A TrackLane belongs to a Track (can have many TrackLanes in a Track) and contains Regions.
Definition track_lane.h:45
A TrackProcessor is a processor that is used as the first entry point when processing a track.
The TrackWidget is split into 3 parts.
Definition track.h:107
Track to be inserted into the Project's Tracklist.
Definition track.h:177
bool block_auto_creation_and_deletion
Block auto-creating or deleting lanes.
Definition track.h:516
bool frozen
Whether the track is currently frozen.
Definition track.h:486
bool drum_mode
Whether drum mode in the piano roll is enabled for this track.
Definition track.h:273
char * name
Track name, used in channel too.
Definition track.h:190
ZPortType in_signal_type
The input signal type (eg audio bus tracks have audio input signals).
Definition track.h:450
bool automation_visible
Flag to set automations visible or not.
Definition track.h:210
bool lanes_visible
Flag to set track lanes visible or not.
Definition track.h:213
bool record_set_automatically
Whether record was set automatically when the channel was selected.
Definition track.h:236
bool bounce
Set to ON during bouncing if this track should be included.
Definition track.h:467
WrappedObjectWithChangeSignal * gobj
Used in Gtk.
Definition track.h:519
ScaleObject ** scale_snapshots
Snapshots used during playback TODO unimplemented.
Definition track.h:361
Region ** chord_region_snapshots
Snapshots used during playback.
Definition track.h:348
bool recording_paused
This must only be set by the RecordingManager when temporarily pausing recording, eg when looping or ...
Definition track.h:321
unsigned int * children
Name hashes of tracks that are routed to this track, if group track.
Definition track.h:481
Plugin ** modulators
Modulators.
Definition track.h:408
unsigned int name_hash
Cache calculated when adding to graph.
Definition track.h:193
Port * beats_per_bar_port
Automatable beats per bar port.
Definition track.h:384
char * comment
User comments.
Definition track.h:459
Port * recording
Recording or not.
Definition track.h:226
int last_lane_idx
Lane index of region before recording paused.
Definition track.h:325
GdkRGBA color
Track color.
Definition track.h:251
bool disconnecting
Whether currently disconnecting.
Definition track.h:494
bool trigger_midi_activity
Flag to tell the UI that this channel had MIDI activity.
Definition track.h:444
Port * bpm_port
Automatable BPM control.
Definition track.h:381
Stretcher * rt_stretcher
Real-time time stretcher.
Definition track.h:332
double main_height
Height of the main part (without lanes).
Definition track.h:223
Region ** chord_regions
ChordObject's.
Definition track.h:343
Region * recording_region
Region currently recording on.
Definition track.h:291
uint8_t midi_ch
MIDI channel (MIDI/Instrument track only).
Definition track.h:265
TrackType type
The type of track this is.
Definition track.h:187
char * icon_name
Icon name of the track.
Definition track.h:196
TrackProcessor * processor
The TrackProcessor, used for processing.
Definition track.h:432
int size
Number of tracks inside this track.
Definition track.h:398
Marker ** marker_snapshots
Snapshots used during playback TODO unimplemented.
Definition track.h:373
bool bounce_to_master
Whether to temporarily route the output to master (e.g., when bouncing the track on its own without i...
Definition track.h:473
TrackLane ** lanes
Lanes in this track containing Regions.
Definition track.h:256
int pos
Position in the Tracklist.
Definition track.h:184
ZPortType out_signal_type
The output signal type (eg midi tracks have MIDI output signals).
Definition track.h:456
Port * beat_unit_port
Automatable beat unit port.
Definition track.h:387
Tracklist * tracklist
Pointer to owner tracklist, if any.
Definition track.h:497
bool folded
Whether currently folded.
Definition track.h:401
bool recording_stop_sent
This is a flag to let the recording manager know that a STOP signal was already sent for recording.
Definition track.h:311
ScaleObject ** scales
ScaleObject's.
Definition track.h:356
bool recording_start_sent
This is a flag to let the recording manager know that a START signal was already sent for recording.
Definition track.h:301
bool visible
Whole Track is visible or not.
Definition track.h:216
TrackWidget * widget
Track Widget created dynamically.
Definition track.h:202
int pool_id
Pool ID of the clip if track is frozen.
Definition track.h:489
TrackLane ** lane_snapshots
Snapshots used during playback.
Definition track.h:261
bool enabled
Active (enabled) or not.
Definition track.h:244
TracklistSelections * ts
Pointer to owner tracklist selections, if any.
Definition track.h:500
FolderChannelWidget * folder_ch_widget
Widget used for foldable tracks in the mixer.
Definition track.h:207
ModulatorMacroProcessor * modulator_macros[TRACK_MAX_MODULATOR_MACROS]
Modulator macros.
Definition track.h:413
bool filtered
Track will be hidden if true (temporary and not serializable).
Definition track.h:220
Channel * channel
1 Track has 0 or 1 Channel.
Definition track.h:422
int passthrough_midi_input
If set to 1, the input received will not be changed to the selected MIDI channel.
Definition track.h:282
int last_lane_created
Last lane created during this drag.
Definition track.h:513
Selections to be used for the tracklist's current selections, copying, undoing, etc.
The Tracklist contains all the tracks in the Project.
Definition tracklist.h:61
The MidiNote velocity.
Definition velocity.h:41
A GObject-ified normal C object with a signal that interested parties can listen to for changes.
Track lanes for each track.
Track processor.
YAML utils.