Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
GUI Backend

Data Structures

struct  ArrangerObject
 Base struct for arranger objects. More...
 
struct  ArrangerSelections
 
struct  AudioClipEditor
 Audio clip editor serializable backend. More...
 
struct  AudioSelections
 Selections to be used for the AudioArrangerWidget's current selections, copying, undoing, etc. More...
 
struct  AutomationEditor
 Backend for the automation editor. More...
 
struct  AutomationSelections
 Selections to be used for the AutomationArrangerWidget's current selections, copying, undoing, etc. More...
 
struct  ChordEditor
 Backend for the chord editor. More...
 
struct  ChordSelections
 Selections to be used for the ChordArrangerWidget's current selections, copying, undoing, etc. More...
 
struct  ClipEditor
 Clip editor serializable backend. More...
 
struct  EditorSettings
 Common editor settings. More...
 
struct  FileBrowserLocation
 Locations to be used in the file browser. More...
 
struct  FileManager
 
struct  MidiArrangerSelections
 A collection of selected MidiNote's. More...
 
struct  MixerSelections
 Selections to be used for the timeline's current selections, copying, undoing, etc. More...
 
struct  MidiNoteDescriptor
 A descriptor for a MidiNote, used by the piano roll. More...
 
struct  PianoRoll
 Piano roll serializable backend. More...
 
struct  Timeline
 Clip editor serializable backend. More...
 
struct  TimelineSelections
 Selections to be used for the timeline's current selections, copying, undoing, etc. More...
 
struct  TracklistSelections
 Selections to be used for the tracklist's current selections, copying, undoing, etc. More...
 

Macros

#define ARRANGER_OBJECT_MAGIC   347616554
 
#define IS_ARRANGER_OBJECT(tr)
 
#define IS_ARRANGER_OBJECT_AND_NONNULL(x)   (x && IS_ARRANGER_OBJECT (x))
 
#define arranger_object_type_has_length(type)
 Returns if the object type has a length.
 
#define arranger_object_type_has_global_pos(type)
 Returns if the object type has a global position.
 
#define arranger_object_type_has_name(type)    (type == ARRANGER_OBJECT_TYPE_REGION || type == ARRANGER_OBJECT_TYPE_MARKER)
 
#define arranger_object_can_have_lanes(_obj)
 Returns if the object is allowed to have lanes.
 
#define arranger_object_type_can_loop(type)    (type == ARRANGER_OBJECT_TYPE_REGION)
 Returns if the object can loop.
 
#define arranger_object_can_fade(_obj)
 
#define arranger_object_can_mute(_obj)
 
#define arranger_object_owned_by_region(_obj)
 
#define arranger_object_can_cache_drawing(_obj)   (false)
 Whether or not this object supports cached drawing.
 
#define arranger_object_validate_pos   arranger_object_is_position_valid
 
#define _ARRANGER_OBJECT_FREE_AND_SET_STRING(_obj, _val_name, _val_value)
 Not to be used anywhere besides below.
 
#define arranger_object_set_string(cc, obj, val_name, val_value)
 Updates an arranger object's string value.
 
#define ARRANGER_SELECTIONS_MAGIC   35867752
 
#define IS_ARRANGER_SELECTIONS(x)    (((ArrangerSelections *) x)->magic == ARRANGER_SELECTIONS_MAGIC)
 
#define IS_ARRANGER_SELECTIONS_AND_NONNULL(x)   (x && IS_ARRANGER_SELECTIONS (x))
 
#define ARRANGER_SELECTIONS(x)   arranger_selections_cast (x)
 
#define ARRANGER_SELECTIONS_DEFAULT_NUDGE_TICKS   0.1
 
#define AUDIO_CLIP_EDITOR_SCHEMA_VERSION   1
 
#define AUDIO_CLIP_EDITOR   (CLIP_EDITOR->audio_clip_editor)
 
#define AUDIO_SELECTIONS   (PROJECT->audio_selections)
 
#define AUTOMATION_EDITOR_SCHEMA_VERSION   1
 
#define AUTOMATION_EDITOR   (CLIP_EDITOR->automation_editor)
 
#define AUTOMATION_SELECTIONS   (PROJECT->automation_selections)
 
#define CHORD_EDITOR_SCHEMA_VERSION   1
 
#define CHORD_EDITOR   (CLIP_EDITOR->chord_editor)
 
#define CHORD_EDITOR_NUM_CHORDS   12
 
#define CHORD_SELECTIONS_SCHEMA_VERSION   1
 
#define CHORD_SELECTIONS   (PROJECT->chord_selections)
 
#define CLIP_EDITOR   (PROJECT->clip_editor)
 
#define EDITOR_SETTINGS_SCHEMA_VERSION   1
 
#define FILE_MANAGER   (ZRYTHM->file_manager)
 
#define MA_SELECTIONS   (PROJECT->midi_arranger_selections)
 
#define MIXER_SELECTIONS_SCHEMA_VERSION   1
 
#define MIXER_SELECTIONS   (PROJECT->mixer_selections)
 
#define MIXER_SELECTIONS_MAX_SLOTS   60
 
#define PIANO_ROLL_SCHEMA_VERSION   1
 
#define PIANO_ROLL   (CLIP_EDITOR->piano_roll)
 
#define DRUM_LABELS
 
#define piano_roll_is_next_key_black(x)   piano_roll_is_key_black (x + 1)
 
#define piano_roll_is_prev_key_black(x)   piano_roll_is_key_black (x - 1)
 
#define PRJ_TIMELINE   (PROJECT->timeline)
 
#define TL_SELECTIONS   (PROJECT->timeline_selections)
 
#define timeline_selections_move_w_action(sel, ticks, delta_tracks, delta_lanes, already_moved)
 
#define timeline_selections_duplicate_w_action(sel, ticks, delta_tracks, delta_lanes, already_moved)
 
#define TRACKLIST_SELECTIONS   (PROJECT->tracklist_selections)
 

Enumerations

enum  ArrangerObjectResizeType {
  ARRANGER_OBJECT_RESIZE_NORMAL , ARRANGER_OBJECT_RESIZE_LOOP , ARRANGER_OBJECT_RESIZE_FADE , ARRANGER_OBJECT_RESIZE_STRETCH ,
  ARRANGER_OBJECT_RESIZE_STRETCH_BPM_CHANGE
}
 Flag used in some functions. More...
 
enum  ArrangerObjectType {
  ARRANGER_OBJECT_TYPE_NONE , ARRANGER_OBJECT_TYPE_ALL , ARRANGER_OBJECT_TYPE_REGION , ARRANGER_OBJECT_TYPE_MIDI_NOTE ,
  ARRANGER_OBJECT_TYPE_CHORD_OBJECT , ARRANGER_OBJECT_TYPE_SCALE_OBJECT , ARRANGER_OBJECT_TYPE_MARKER , ARRANGER_OBJECT_TYPE_AUTOMATION_POINT ,
  ARRANGER_OBJECT_TYPE_VELOCITY
}
 The type of the object. More...
 
enum  ArrangerObjectFlags { ARRANGER_OBJECT_FLAG_NON_PROJECT = 1 << 0 }
 ArrangerObject flags. More...
 
enum  ArrangerObjectPositionType {
  ARRANGER_OBJECT_POSITION_TYPE_START , ARRANGER_OBJECT_POSITION_TYPE_END , ARRANGER_OBJECT_POSITION_TYPE_CLIP_START , ARRANGER_OBJECT_POSITION_TYPE_LOOP_START ,
  ARRANGER_OBJECT_POSITION_TYPE_LOOP_END , ARRANGER_OBJECT_POSITION_TYPE_FADE_IN , ARRANGER_OBJECT_POSITION_TYPE_FADE_OUT
}
 
enum  ArrangerSelectionsType {
  ARRANGER_SELECTIONS_TYPE_NONE , ARRANGER_SELECTIONS_TYPE_CHORD , ARRANGER_SELECTIONS_TYPE_TIMELINE , ARRANGER_SELECTIONS_TYPE_MIDI ,
  ARRANGER_SELECTIONS_TYPE_AUTOMATION , ARRANGER_SELECTIONS_TYPE_AUDIO
}
 
enum  ArrangerSelectionsProperty { ARRANGER_SELECTIONS_PROPERTY_HAS_LENGTH , ARRANGER_SELECTIONS_PROPERTY_CAN_LOOP , ARRANGER_SELECTIONS_PROPERTY_HAS_LOOPED , ARRANGER_SELECTIONS_PROPERTY_CAN_FADE }
 
enum  FileManagerSpecialLocation { FILE_MANAGER_NONE , FILE_MANAGER_HOME , FILE_MANAGER_DESKTOP , FILE_MANAGER_DRIVE }
 Special location type. More...
 
enum  FileBrowserSelectionType { FB_SELECTION_TYPE_COLLECTIONS , FB_SELECTION_TYPE_LOCATIONS }
 Current selection in the top window. More...
 
enum  MidiModifier { MIDI_MODIFIER_VELOCITY , MIDI_MODIFIER_PITCH_WHEEL , MIDI_MODIFIER_MOD_WHEEL , MIDI_MODIFIER_AFTERTOUCH }
 A MIDI modifier to use to display data for. More...
 
enum  PianoRollHighlighting { PR_HIGHLIGHT_NONE , PR_HIGHLIGHT_CHORD , PR_HIGHLIGHT_SCALE , PR_HIGHLIGHT_BOTH }
 Highlighting for the piano roll. More...
 
enum  PianoRollNoteNotation { PIANO_ROLL_NOTE_NOTATION_MUSICAL , PIANO_ROLL_NOTE_NOTATION_PITCH }
 

Functions

ArrangerWidgetarranger_object_get_arranger (const ArrangerObject *self)
 Gets the arranger for this arranger object.
 
void arranger_object_set_magic (ArrangerObject *self)
 Sets the magic on the arranger object.
 
HOT ZRegionarranger_object_get_region (const ArrangerObject *const self)
 If the object is part of a ZRegion, returns it, otherwise returns NULL.
 
const char * arranger_object_get_name (const ArrangerObject *self)
 Returns a pointer to the name of the object, if the object can have names.
 
char * arranger_object_gen_human_readable_name (const ArrangerObject *self)
 Generates a human readable name for the object.
 
void arranger_object_gen_escaped_name (const ArrangerObject *self)
 Generates the escaped name for the object, where applicable.
 
void arranger_object_set_to_object (ArrangerObject *dest, ArrangerObject *src)
 Sets the dest object's values to the main src object's values.
 
ArrangerObjectarranger_object_get_object (ArrangerObject *self)
 Gets the object the ArrangerObjectInfo represents.
 
void arranger_object_init (ArrangerObject *self)
 
void arranger_object_init_loaded (ArrangerObject *self)
 Initializes the object after loading a Project.
 
ArrangerSelectionsarranger_object_get_selections_for_type (ArrangerObjectType type)
 Returns the ArrangerSelections corresponding to the given object type.
 
void arranger_object_select (ArrangerObject *self, const bool select, const bool append, bool fire_events)
 Selects the object by adding it to its corresponding selections or making it the only selection.
 
PURE WARN_UNUSED_RESULT bool arranger_object_is_hit (const ArrangerObject *self, const Position *start, const Position *end)
 Returns whether the given object is hit by the given position or range.
 
int arranger_object_get_num_loops (ArrangerObject *self, const int count_incomplete)
 Returns the number of loops in the ArrangerObject, optionally including incomplete ones.
 
bool arranger_object_is_selected (ArrangerObject *self)
 Returns if the object is in the selections.
 
NONNULL void arranger_object_print (const ArrangerObject *self)
 Prints debug information about the given object.
 
NONNULL bool arranger_object_get_muted (ArrangerObject *self, bool check_parent)
 Gets the mute status of the object.
 
void arranger_object_set_muted (ArrangerObject *self, bool muted, bool fire_events)
 Sets the mute status of the object.
 
void arranger_object_get_pos (const ArrangerObject *self, Position *pos)
 Getter.
 
void arranger_object_get_end_pos (const ArrangerObject *self, Position *pos)
 Getter.
 
void arranger_object_get_clip_start_pos (const ArrangerObject *self, Position *pos)
 Getter.
 
void arranger_object_get_loop_start_pos (const ArrangerObject *self, Position *pos)
 Getter.
 
void arranger_object_get_loop_end_pos (const ArrangerObject *self, Position *pos)
 Getter.
 
void arranger_object_get_fade_in_pos (const ArrangerObject *self, Position *pos)
 Getter.
 
void arranger_object_get_fade_out_pos (const ArrangerObject *self, Position *pos)
 Getter.
 
void arranger_object_get_position_from_type (const ArrangerObject *self, Position *pos, ArrangerObjectPositionType type)
 
void arranger_object_edit_begin (const ArrangerObject *self)
 Callback when beginning to edit the object.
 
void arranger_object_edit_finish (const ArrangerObject *self, ArrangerSelectionsActionEditType type)
 Callback when finishing editing the object.
 
void arranger_object_edit_position_finish (const ArrangerObject *self)
 
void arranger_object_pos_setter (ArrangerObject *self, const Position *pos)
 The setter is for use in e.g.
 
void arranger_object_end_pos_setter (ArrangerObject *self, const Position *pos)
 The setter is for use in e.g.
 
void arranger_object_clip_start_pos_setter (ArrangerObject *self, const Position *pos)
 The setter is for use in e.g.
 
void arranger_object_loop_start_pos_setter (ArrangerObject *self, const Position *pos)
 The setter is for use in e.g.
 
void arranger_object_loop_end_pos_setter (ArrangerObject *self, const Position *pos)
 The setter is for use in e.g.
 
HOT NONNULL WARN_UNUSED_RESULT bool arranger_object_is_position_valid (const ArrangerObject *const self, const Position *pos, ArrangerObjectPositionType pos_type)
 Returns if the given Position is valid.
 
bool arranger_object_set_position (ArrangerObject *self, const Position *pos, ArrangerObjectPositionType pos_type, const bool validate)
 Sets the given position on the object, optionally attempting to validate before.
 
const char * arranger_object_stringize_type (ArrangerObjectType type)
 Returns the type as a string.
 
void arranger_object_copy_identifier (ArrangerObject *dest, ArrangerObject *src)
 Copies the identifier from src to dest.
 
void arranger_object_add_linked_region (ArrangerObject *self, ZRegion *region)
 
void arranger_object_remove_linked_region (ArrangerObject *self, ZRegion *region)
 
void arranger_object_update_positions (ArrangerObject *self, bool from_ticks, bool bpm_change, UndoableAction *action)
 Updates the positions in each child recursively.
 
void arranger_object_free (ArrangerObject *self)
 Frees only this object.
 
WARN_UNUSED_RESULT bool arranger_object_resize (ArrangerObject *self, const bool left, ArrangerObjectResizeType type, const double ticks, bool during_ui_action, GError **error)
 Resizes the object on the left side or right side by given amount of ticks, for objects that do not have loops (currently none? keep it as reference).
 
void arranger_object_append_children (ArrangerObject *self, GPtrArray *children)
 
void arranger_object_add_ticks_to_children (ArrangerObject *self, const double ticks)
 Adds the given ticks to each included object.
 
HOT NONNULL Trackarranger_object_get_track (const ArrangerObject *const self)
 Returns the Track this ArrangerObject is in.
 
void arranger_object_post_deserialize (ArrangerObject *self)
 
bool arranger_object_validate_name (ArrangerObject *self, const char *name)
 Validates the given name.
 
ArrangerObjectarranger_object_find (ArrangerObject *obj)
 Returns the ArrangerObject matching the given one.
 
ArrangerObjectarranger_object_clone (const ArrangerObject *self)
 Clones the ArrangerObject.
 
WARN_UNUSED_RESULT bool arranger_object_split (ArrangerObject *self, const Position *pos, const bool pos_is_local, ArrangerObject **r1, ArrangerObject **r2, bool is_project, GError **error)
 Splits the given object at the given Position.
 
WARN_UNUSED_RESULT NONNULL_ARGS (1, 2) bool arranger_object_unsplit(ArrangerObject *r1
 Undoes what arranger_object_split() did.
 
void arranger_object_set_name_with_action (ArrangerObject *self, const char *name)
 Changes the name and adds an action to the undo stack.
 
void arranger_object_set_start_pos_full_size (ArrangerObject *obj, Position *pos)
 Sets the end position of the ArrangerObject and also sets the loop end and fade out so that they are at the end.
 
void arranger_object_set_end_pos_full_size (ArrangerObject *obj, Position *pos)
 Sets the end position of the ArrangerObject and also sets the loop end and fade out to that position.
 
WARN_UNUSED_RESULT NONNULL_ARGS (1) bool arranger_object_add_to_project(ArrangerObject *obj
 Appends the ArrangerObject to where it belongs in the project (eg, a Track), without taking into account its previous index (eg, before deletion if undoing).
 
WARN_UNUSED_RESULT bool arranger_object_insert_to_project (ArrangerObject *obj, GError **error)
 Inserts the ArrangerObject where it belongs in the project (eg, a Track).
 
void arranger_object_remove_from_project (ArrangerObject *obj)
 Removes the object from its parent in the project.
 
bool arranger_object_is_frozen (ArrangerObject *obj)
 Returns whether the arranger object is part of a frozen track.
 
bool arranger_object_is_deletable (const ArrangerObject *obj)
 Returns whether the given object is deletable or not (eg, start marker).
 
bool arranger_object_is_renamable (const ArrangerObject *obj)
 
void arranger_object_remove_child (ArrangerObject *self, ArrangerObject *child)
 Removes the child from the given object.
 
void arranger_selections_init_loaded (ArrangerSelections *self, bool project, UndoableAction *action)
 Inits the selections after loading a project.
 
NONNULL void arranger_selections_init (ArrangerSelections *self, ArrangerSelectionsType type)
 Initializes the selections.
 
ArrangerSelectionsarranger_selections_new (ArrangerSelectionsType type)
 Creates new arranger selections.
 
NONNULL bool arranger_selections_verify (ArrangerSelections *self)
 Verify that the objects are not invalid.
 
NONNULL void arranger_selections_add_object (ArrangerSelections *self, ArrangerObject *obj)
 Appends the given object to the selections.
 
NONNULL void arranger_selections_set_from_selections (ArrangerSelections *dest, ArrangerSelections *src)
 Sets the values of each object in the dest selections to the values in the src selections.
 
NONNULL void arranger_selections_sort_by_indices (ArrangerSelections *sel, int desc)
 Sorts the selections by their indices (eg, for regions, their track indices, then the lane indices, then the index in the lane).
 
NONNULL void arranger_selections_sort_by_positions (ArrangerSelections *self, int desc)
 
NONNULL ArrangerSelectionsarranger_selections_clone (const ArrangerSelections *self)
 Clone the struct for copying, undoing, etc.
 
NONNULL bool arranger_selections_has_any (ArrangerSelections *self)
 Returns if there are any selections.
 
NONNULL void arranger_selections_get_start_pos (const ArrangerSelections *self, Position *pos, const bool global)
 Returns the position of the leftmost object.
 
NONNULL void arranger_selections_get_end_pos (ArrangerSelections *self, Position *pos, int global)
 Returns the end position of the rightmost object.
 
NONNULL int arranger_selections_get_num_objects (const ArrangerSelections *self)
 Returns the number of selected objects.
 
NONNULL ArrangerObjectarranger_selections_get_first_object (const ArrangerSelections *self)
 Gets first object.
 
NONNULL ArrangerObjectarranger_selections_get_last_object (const ArrangerSelections *self, bool ends_last)
 Gets last object.
 
NONNULL void arranger_selections_paste_to_pos (ArrangerSelections *self, Position *pos, bool undoable)
 Pastes the given selections to the given Position.
 
NONNULL void arranger_selections_get_all_objects (const ArrangerSelections *self, GPtrArray *arr)
 Appends all objects in the given array.
 
void arranger_selections_add_to_region (ArrangerSelections *self, ZRegion *region, bool clone)
 Adds each object in the selection to the given region (if applicable).
 
NONNULL void arranger_selections_add_ticks (ArrangerSelections *self, const double ticks)
 Moves the selections by the given amount of ticks.
 
NONNULL bool arranger_selections_all_on_same_lane (ArrangerSelections *self)
 Returns whether all the selections are on the same lane (track lane or automation lane).
 
NONNULL void arranger_selections_select_all (ArrangerSelections *self, bool fire_events)
 Selects all possible objects from the project.
 
NONNULL void arranger_selections_clear (ArrangerSelections *self, bool free, bool fire_events)
 Clears selections.
 
NONNULL void arranger_selections_post_deserialize (ArrangerSelections *self)
 Code to run after deserializing.
 
NONNULL bool arranger_selections_validate (ArrangerSelections *self)
 
NONNULL void arranger_selections_free_members (ArrangerSelections *self)
 Frees anything allocated by the selections but not the objects or self itself.
 
NONNULL void arranger_selections_free (ArrangerSelections *self)
 Frees the selections but not the objects.
 
NONNULL void arranger_selections_free_full (ArrangerSelections *self)
 Frees all the objects as well.
 
NONNULL int arranger_selections_contains_object (ArrangerSelections *self, ArrangerObject *obj)
 Returns if the arranger object is in the selections or not.
 
NONNULL bool arranger_selections_contains_undeletable_object (const ArrangerSelections *self)
 Returns if the selections contain an undeletable object (such as the start marker).
 
NONNULL bool arranger_selections_contains_unclonable_object (const ArrangerSelections *self)
 Returns if the selections contain an unclonable object (such as the start marker).
 
NONNULL bool arranger_selections_contains_unrenamable_object (const ArrangerSelections *self)
 
NONNULL bool arranger_selections_contains_object_with_property (ArrangerSelections *self, ArrangerSelectionsProperty property, bool value)
 Checks whether an object matches the given parameters.
 
NONNULL void arranger_selections_remove_object (ArrangerSelections *self, ArrangerObject *obj)
 Removes the arranger object from the selections.
 
NONNULL void arranger_selections_merge (ArrangerSelections *self)
 Merges the given selections into one region.
 
NONNULL bool arranger_selections_can_be_pasted (ArrangerSelections *self)
 Returns if the selections can be pasted.
 
NONNULL bool arranger_selections_contains_looped (ArrangerSelections *self)
 
NONNULL bool arranger_selections_can_be_merged (ArrangerSelections *self)
 
NONNULL double arranger_selections_get_length_in_ticks (ArrangerSelections *self)
 
NONNULL bool arranger_selections_contains_clip (ArrangerSelections *self, AudioClip *clip)
 
NONNULL bool arranger_selections_can_split_at_pos (const ArrangerSelections *self, const Position *pos)
 
NONNULL ArrangerSelectionsarranger_selections_get_for_type (ArrangerSelectionsType type)
 
void audio_clip_editor_init (AudioClipEditor *self)
 
AudioClipEditoraudio_clip_editor_clone (AudioClipEditor *src)
 
AudioClipEditoraudio_clip_editor_new (void)
 
void audio_clip_editor_free (AudioClipEditor *self)
 
bool audio_selections_can_be_pasted (AudioSelections *ts, Position *pos, ZRegion *r)
 Returns if the selections can be pasted.
 
void automation_editor_init_loaded (AutomationEditor *self)
 Inits the AutomationEditor after a Project has been loaded.
 
void automation_editor_init (AutomationEditor *self)
 Initializes the AutomationEditor.
 
AutomationEditorautomation_editor_clone (AutomationEditor *src)
 
AutomationEditorautomation_editor_new (void)
 
void automation_editor_free (AutomationEditor *self)
 
bool automation_selections_can_be_pasted (AutomationSelections *ts, Position *pos, ZRegion *r)
 Returns if the selections can be pasted.
 
void chord_editor_init_loaded (ChordEditor *self)
 Inits the ChordEditor after a Project has been loaded.
 
void chord_editor_init (ChordEditor *self)
 Initializes the ChordEditor.
 
ChordEditorchord_editor_clone (ChordEditor *src)
 
void chord_editor_apply_single_chord (ChordEditor *self, const ChordDescriptor *chord, const int idx, bool undoable)
 
void chord_editor_apply_chords (ChordEditor *self, const ChordDescriptor **chords, bool undoable)
 
void chord_editor_apply_preset (ChordEditor *self, ChordPreset *pset, bool undoable)
 
void chord_editor_apply_preset_from_scale (ChordEditor *self, MusicalScaleType scale, MusicalNote root_note, bool undoable)
 
void chord_editor_transpose_chords (ChordEditor *self, bool up, bool undoable)
 
NONNULL ChordDescriptorchord_editor_get_chord_from_note_number (const ChordEditor *self, midi_byte_t note_number)
 Returns the ChordDescriptor for the given note number, otherwise NULL if the given note number is not in the proper range.
 
NONNULL int chord_editor_get_chord_index (const ChordEditor *self, const ChordDescriptor *chord)
 
ChordEditorchord_editor_new (void)
 
void chord_editor_free (ChordEditor *self)
 
int chord_selections_can_be_pasted (ChordSelections *ts, Position *pos, ZRegion *region)
 Returns if the selections can be pasted.
 
void clip_editor_init_loaded (ClipEditor *self)
 Inits the ClipEditor after a Project is loaded.
 
void clip_editor_init (ClipEditor *self)
 Inits the clip editor.
 
ClipEditorclip_editor_new (void)
 Creates a new clip editor.
 
void clip_editor_set_region (ClipEditor *self, ZRegion *region, bool fire_events)
 Sets the track and refreshes the piano roll widgets.
 
ZRegionclip_editor_get_region (ClipEditor *self)
 
ArrangerSelectionsclip_editor_get_arranger_selections (ClipEditor *self)
 
Trackclip_editor_get_track (ClipEditor *self)
 
void clip_editor_set_caches (ClipEditor *self)
 To be called when recalculating the graph.
 
ClipEditorclip_editor_clone (const ClipEditor *src)
 
void clip_editor_free (ClipEditor *self)
 
void editor_settings_init (EditorSettings *self)
 
void editor_settings_set_scroll_start_x (EditorSettings *self, int x, bool validate)
 
void editor_settings_set_scroll_start_y (EditorSettings *self, int y, bool validate)
 
void editor_settings_append_scroll (EditorSettings *self, int dx, int dy, bool validate)
 Appends the given deltas to the scroll x/y values.
 
FileManagerfile_manager_new (void)
 Creates the file manager.
 
void file_manager_load_files (FileManager *self)
 Loads the files under the current selection.
 
NONNULL void file_manager_set_selection (FileManager *self, FileBrowserLocation *sel, bool load_files, bool save_to_settings)
 
void file_manager_free (FileManager *self)
 Frees the file manager.
 
FileBrowserLocationfile_browser_location_new (void)
 
FileBrowserLocationfile_browser_location_clone (FileBrowserLocation *loc)
 
void file_browser_location_print (const FileBrowserLocation *loc)
 
void file_manager_add_location_and_save (FileManager *self, const char *abs_path)
 Adds a location and saves the settings.
 
void file_manager_remove_location_and_save (FileManager *self, const char *location, bool skip_if_standard)
 Removes the given location (bookmark) from the saved locations.
 
GMenuModel * file_browser_location_generate_context_menu (const FileBrowserLocation *self)
 
NONNULL void file_browser_location_free (FileBrowserLocation *loc)
 
MidiNotemidi_arranger_selections_get_lowest_note (MidiArrangerSelections *mas)
 
void midi_arranger_selections_unlisten_note_diff (MidiArrangerSelections *prev, MidiArrangerSelections *mas)
 Sets the listen status of notes on and off based on changes in the previous selections and the current selections.
 
int midi_arranger_selections_can_be_pasted (MidiArrangerSelections *ts, Position *pos, ZRegion *region)
 Returns if the selections can be pasted.
 
NONNULL void midi_arranger_selections_sort_by_pitch (MidiArrangerSelections *self, bool desc)
 
void mixer_selections_init_loaded (MixerSelections *ms, bool is_project)
 
MixerSelectionsmixer_selections_new (void)
 
void mixer_selections_init (MixerSelections *self)
 
MixerSelectionsmixer_selections_clone (const MixerSelections *src, bool src_is_project)
 Clone the struct for copying, undoing, etc.
 
int mixer_selections_has_any (MixerSelections *ms)
 Returns if there are any selections.
 
int mixer_selections_get_highest_slot (MixerSelections *ms)
 Gets highest slot in the selections.
 
int mixer_selections_get_lowest_slot (MixerSelections *ms)
 Gets lowest slot in the selections.
 
void mixer_selections_post_deserialize (MixerSelections *self)
 
NONNULL bool mixer_selections_can_be_pasted (MixerSelections *self, Channel *ch, PluginSlotType type, int slot)
 Returns whether the selections can be pasted to MixerWidget.paste_slot.
 
NONNULL void mixer_selections_paste_to_slot (MixerSelections *ms, Channel *ch, PluginSlotType type, int slot)
 Paste the selections starting at the slot in the given channel.
 
Trackmixer_selections_get_track (const MixerSelections *const self)
 Get current Track.
 
bool mixer_selections_contains_slot (MixerSelections *ms, PluginSlotType type, int slot)
 Returns if the slot is selected or not.
 
bool mixer_selections_contains_plugin (MixerSelections *ms, Plugin *pl)
 Returns if the plugin is selected or not.
 
bool mixer_selections_contains_uninstantiated_plugin (const MixerSelections *const self)
 
void mixer_selections_add_slot (MixerSelections *ms, Track *track, PluginSlotType type, int slot, bool clone_pl, const bool fire_events)
 Adds a slot to the selections.
 
NONNULL void mixer_selections_remove_slot (MixerSelections *ms, int slot, PluginSlotType type, bool publish_events)
 Removes a slot from the selections.
 
NONNULL void mixer_selections_sort (MixerSelections *self, bool asc)
 Sorts the selections by slot index.
 
NONNULL Pluginmixer_selections_get_first_plugin (MixerSelections *self)
 Returns the first selected plugin if any is selected, otherwise NULL.
 
NONNULL bool mixer_selections_validate (MixerSelections *self)
 
NONNULL void mixer_selections_clear (MixerSelections *ms, const int pub_events)
 Clears selections.
 
NONNULL void mixer_selections_free (MixerSelections *self)
 
MidiNoteDescriptormidi_note_descriptor_new (void)
 
void midi_note_descriptor_free (MidiNoteDescriptor *self)
 
int piano_roll_is_key_black (int note)
 Returns if the key is black.
 
void piano_roll_add_current_note (PianoRoll *self, int note)
 Adds the note if it doesn't exist in the array.
 
void piano_roll_remove_current_note (PianoRoll *self, int note)
 Removes the note if it exists in the array.
 
int piano_roll_contains_current_note (PianoRoll *self, int note)
 Returns 1 if it contains the given note, 0 otherwise.
 
Trackpiano_roll_get_current_track (const PianoRoll *self)
 Returns the current track whose regions are being shown in the piano roll.
 
void piano_roll_set_notes_zoom (PianoRoll *self, float notes_zoom, int fire_events)
 
void piano_roll_init_loaded (PianoRoll *self)
 Inits the PianoRoll after a Project has been loaded.
 
const MidiNoteDescriptorpiano_roll_find_midi_note_descriptor_by_val (PianoRoll *self, bool drum_mode, const uint8_t val)
 Returns the MidiNoteDescriptor matching the value (0-127).
 
void midi_note_descriptor_set_custom_name (MidiNoteDescriptor *descr, char *str)
 
void piano_roll_set_highlighting (PianoRoll *self, PianoRollHighlighting highlighting)
 Updates the highlighting and notifies the UI.
 
void piano_roll_set_midi_modifier (PianoRoll *self, MidiModifier modifier)
 Sets the MIDI modifier.
 
void piano_roll_init (PianoRoll *self)
 Initializes the PianoRoll.
 
PianoRollpiano_roll_clone (const PianoRoll *src)
 Only clones what is needed for serialization.
 
PianoRollpiano_roll_new (void)
 
void piano_roll_free (PianoRoll *self)
 
void timeline_init_loaded (Timeline *self)
 Inits the Timeline after a Project is loaded.
 
void timeline_init (Timeline *self)
 Inits the Timeline instance.
 
Timelinetimeline_clone (Timeline *src)
 
Timelinetimeline_new (void)
 Creates a new Timeline instance.
 
void timeline_free (Timeline *self)
 
Tracktimeline_selections_get_first_track (TimelineSelections *ts)
 Gets highest track in the selections.
 
Tracktimeline_selections_get_last_track (TimelineSelections *ts)
 Gets lowest track in the selections.
 
void timeline_selections_set_vis_track_indices (TimelineSelections *ts)
 Replaces the track positions in each object with visible track indices starting from 0.
 
int timeline_selections_can_be_pasted (TimelineSelections *ts, Position *pos, const int idx)
 Returns whether the selections can be pasted.
 
void timeline_selections_mark_for_bounce (TimelineSelections *ts, bool with_parents)
 
bool timeline_selections_move_regions_to_new_ats (TimelineSelections *self, const int vis_at_diff)
 Move the selected regions to new automation tracks.
 
bool timeline_selections_move_regions_to_new_lanes (TimelineSelections *self, const int diff)
 Move the selected Regions to new lanes.
 
bool timeline_selections_move_regions_to_new_tracks (TimelineSelections *self, const int vis_track_diff)
 Move the selected Regions to the new Track.
 
void timeline_selections_set_index_in_prev_lane (TimelineSelections *self)
 Sets the regions' ZRegion::index_in_prev_lane.
 
NONNULL bool timeline_selections_contains_only_regions (const TimelineSelections *self)
 
NONNULL bool timeline_selections_contains_only_region_types (const TimelineSelections *self, RegionType types)
 
NONNULL bool timeline_selections_export_to_midi_file (const TimelineSelections *self, const char *full_path, int midi_version, const bool export_full_regions, const bool lanes_as_tracks)
 Exports the selections to the given MIDI file.
 
void tracklist_selections_init_loaded (TracklistSelections *ts)
 
TracklistSelectionstracklist_selections_new (bool is_project)
 
TracklistSelectionstracklist_selections_clone (TracklistSelections *src, GError **error)
 Clone the struct for copying, undoing, etc.
 
Tracktracklist_selections_get_highest_track (TracklistSelections *self)
 Gets highest track in the selections.
 
Tracktracklist_selections_get_lowest_track (TracklistSelections *self)
 Gets lowest track in the selections.
 
void tracklist_selections_add_track (TracklistSelections *self, Track *track, bool fire_events)
 
void tracklist_selections_add_tracks_in_range (TracklistSelections *self, int min_pos, int max_pos, bool fire_events)
 
void tracklist_selections_clear (TracklistSelections *self, const bool fire_events)
 Clears the selections.
 
void tracklist_selections_select_foldable_children (TracklistSelections *self)
 Make sure all children of foldable tracks in the selection are also selected.
 
void tracklist_selections_handle_click (Track *track, bool ctrl, bool shift, bool dragged)
 Handle a click selection.
 
bool tracklist_selections_contains_uninstantiated_plugin (const TracklistSelections *self)
 
bool tracklist_selections_contains_undeletable_track (const TracklistSelections *self)
 
bool tracklist_selections_contains_uncopyable_track (const TracklistSelections *self)
 
bool tracklist_selections_contains_non_automatable_track (const TracklistSelections *self)
 Returns whether the tracklist selections contains a track that cannot have automation lanes.
 
bool tracklist_selections_contains_soloed_track (TracklistSelections *self, bool soloed)
 Returns whether the selections contain a soloed track if soloed is true or an unsoloed track if soloed is false.
 
bool tracklist_selections_contains_listened_track (TracklistSelections *self, bool listened)
 Returns whether the selections contain a listened track if listened is true or an unlistened track if listened is false.
 
bool tracklist_selections_contains_muted_track (TracklistSelections *self, bool muted)
 Returns whether the selections contain a muted track if muted is true or an unmuted track if muted is false.
 
bool tracklist_selections_contains_enabled_track (TracklistSelections *self, bool enabled)
 
bool tracklist_selections_contains_track (TracklistSelections *self, Track *track)
 Returns if the Track is selected or not.
 
bool tracklist_selections_contains_track_index (TracklistSelections *self, int track_idx)
 
void tracklist_selections_remove_track (TracklistSelections *ts, Track *track, int fire_events)
 
void tracklist_selections_select_single (TracklistSelections *ts, Track *track, bool fire_events)
 Selects a single track after clearing the selections.
 
void tracklist_selections_select_all (TracklistSelections *ts, int visible_only)
 Selects all Track's.
 
void tracklist_selections_select_last_visible (TracklistSelections *ts)
 Selects the last visible track after clearing the selections.
 
void tracklist_selections_toggle_visibility (TracklistSelections *ts)
 Toggle visibility of the selected tracks.
 
void tracklist_selections_toggle_pinned (TracklistSelections *ts)
 Toggle pin/unpin of the selected tracks.
 
void tracklist_selections_print (TracklistSelections *self)
 For debugging.
 
void tracklist_selections_post_deserialize (TracklistSelections *self)
 To be called after receiving tracklist selections from the clipboard.
 
void tracklist_selections_paste_to_pos (TracklistSelections *ts, int pos)
 
void tracklist_selections_sort (TracklistSelections *self, bool asc)
 Sorts the tracks by position.
 
NONNULL void tracklist_selections_get_plugins (TracklistSelections *self, GPtrArray *arr)
 
void tracklist_selections_mark_for_bounce (TracklistSelections *ts, bool with_parents, bool mark_master)
 Marks the tracks to be bounced.
 
void tracklist_selections_free (TracklistSelections *self)
 
void ArrangerObject::arranger_object_move (ArrangerObject *self, const double ticks)
 Moves the object by the given amount of ticks.
 
bool ArrangerObject::arranger_object_validate (const ArrangerObject *const self)
 Validates the arranger object.
 
void ArrangerObject::arranger_object_set_name (ArrangerObject *self, const char *name, int fire_events)
 Sets the name of the object, if the object can have a name.
 
void AudioSelections::audio_selections_set_has_range (AudioSelections *self, bool has_range)
 Sets whether a range selection exists and sends events to update the UI.
 
MidiNoteMidiArrangerSelections::midi_arranger_selections_get_highest_note (MidiArrangerSelections *mas)
 
int MixerSelections::mixer_selections_get_plugins (const MixerSelections *const self, GPtrArray *arr, bool from_cache)
 Fills in the array with the plugins in the selections.
 
TimelineSelectionsTimelineSelections::timeline_selections_new_for_range (Position *start_pos, Position *end_pos, bool clone_objs)
 Creates a new TimelineSelections instance for the given range.
 

Variables

WARN_UNUSED_RESULT ArrangerObjectr2
 
WARN_UNUSED_RESULT ArrangerObject ArrangerObject ** obj
 
WARN_UNUSED_RESULT ArrangerObject ArrangerObject bool fire_events
 
WARN_UNUSED_RESULT ArrangerObject ArrangerObject bool GError ** error
 

Detailed Description

Serializable structs that define how the GUI should behave.

Macro Definition Documentation

◆ _ARRANGER_OBJECT_FREE_AND_SET_STRING

#define _ARRANGER_OBJECT_FREE_AND_SET_STRING ( _obj,
_val_name,
_val_value )
Value:
g_free_and_null (_obj->_val_name); \
_obj->_val_name = g_strdup (_val_value)
#define g_free_and_null(ptr)
Convenience wrapper.
Definition objects.h:126

Not to be used anywhere besides below.

Definition at line 757 of file arranger_object.h.

◆ arranger_object_can_cache_drawing

#define arranger_object_can_cache_drawing ( _obj)    (false)

Whether or not this object supports cached drawing.

FIXME off for now.

Definition at line 338 of file arranger_object.h.

◆ arranger_object_can_fade

#define arranger_object_can_fade ( _obj)
Value:
((_obj)->type == ARRANGER_OBJECT_TYPE_REGION \
&& region_type_can_fade (((ZRegion *) _obj)->id.type))
#define region_type_can_fade(rtype)
Returns if the given ZRegion type can have fades.
Definition region.h:284
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
Definition region.h:77

Definition at line 321 of file arranger_object.h.

◆ arranger_object_can_have_lanes

#define arranger_object_can_have_lanes ( _obj)
Value:
((_obj)->type == ARRANGER_OBJECT_TYPE_REGION \
&& region_type_has_lane (((ZRegion *) _obj)->id.type))

Returns if the object is allowed to have lanes.

Definition at line 313 of file arranger_object.h.

◆ arranger_object_can_mute

#define arranger_object_can_mute ( _obj)
Value:
((_obj)->type == ARRANGER_OBJECT_TYPE_REGION \
|| (_obj)->type == ARRANGER_OBJECT_TYPE_MIDI_NOTE)

Definition at line 325 of file arranger_object.h.

◆ ARRANGER_OBJECT_MAGIC

#define ARRANGER_OBJECT_MAGIC   347616554

Definition at line 35 of file arranger_object.h.

◆ arranger_object_owned_by_region

#define arranger_object_owned_by_region ( _obj)
Value:
((_obj)->type == ARRANGER_OBJECT_TYPE_VELOCITY \
|| (_obj)->type == ARRANGER_OBJECT_TYPE_MIDI_NOTE \
|| (_obj)->type == ARRANGER_OBJECT_TYPE_CHORD_OBJECT \
|| (_obj)->type == ARRANGER_OBJECT_TYPE_AUTOMATION_POINT)

Definition at line 329 of file arranger_object.h.

◆ arranger_object_set_string

#define arranger_object_set_string ( cc,
obj,
val_name,
val_value )
Value:
{ \
cc * _obj = (cc *) obj; \
_ARRANGER_OBJECT_FREE_AND_SET_STRING (_obj, val_name, val_value); \
}

Updates an arranger object's string value.

Parameters
ccCamelCase (eg, Region).
objThe object.
val_nameThe struct member name to set the primitive value to.
val_valueThe value to store.

Definition at line 769 of file arranger_object.h.

◆ arranger_object_type_can_loop

#define arranger_object_type_can_loop ( type)     (type == ARRANGER_OBJECT_TYPE_REGION)

Returns if the object can loop.

Definition at line 318 of file arranger_object.h.

◆ arranger_object_type_has_global_pos

#define arranger_object_type_has_global_pos ( type)
Value:
(type == ARRANGER_OBJECT_TYPE_REGION \
|| type == ARRANGER_OBJECT_TYPE_SCALE_OBJECT \
|| type == ARRANGER_OBJECT_TYPE_MARKER)

Returns if the object type has a global position.

Definition at line 302 of file arranger_object.h.

◆ arranger_object_type_has_length

#define arranger_object_type_has_length ( type)
Value:
(type == ARRANGER_OBJECT_TYPE_REGION \
|| type == ARRANGER_OBJECT_TYPE_MIDI_NOTE)

Returns if the object type has a length.

Definition at line 295 of file arranger_object.h.

◆ arranger_object_type_has_name

#define arranger_object_type_has_name ( type)     (type == ARRANGER_OBJECT_TYPE_REGION || type == ARRANGER_OBJECT_TYPE_MARKER)

Definition at line 307 of file arranger_object.h.

◆ arranger_object_validate_pos

#define arranger_object_validate_pos   arranger_object_is_position_valid

Definition at line 609 of file arranger_object.h.

◆ ARRANGER_SELECTIONS

#define ARRANGER_SELECTIONS ( x)    arranger_selections_cast (x)

Definition at line 33 of file arranger_selections.h.

◆ ARRANGER_SELECTIONS_DEFAULT_NUDGE_TICKS

#define ARRANGER_SELECTIONS_DEFAULT_NUDGE_TICKS   0.1

Definition at line 35 of file arranger_selections.h.

◆ ARRANGER_SELECTIONS_MAGIC

#define ARRANGER_SELECTIONS_MAGIC   35867752

Definition at line 29 of file arranger_selections.h.

◆ AUDIO_CLIP_EDITOR

#define AUDIO_CLIP_EDITOR   (CLIP_EDITOR->audio_clip_editor)

Definition at line 24 of file audio_clip_editor.h.

◆ AUDIO_CLIP_EDITOR_SCHEMA_VERSION

#define AUDIO_CLIP_EDITOR_SCHEMA_VERSION   1

Definition at line 22 of file audio_clip_editor.h.

◆ AUDIO_SELECTIONS

#define AUDIO_SELECTIONS   (PROJECT->audio_selections)

Definition at line 25 of file audio_selections.h.

◆ AUTOMATION_EDITOR

#define AUTOMATION_EDITOR   (CLIP_EDITOR->automation_editor)

Definition at line 24 of file automation_editor.h.

◆ AUTOMATION_EDITOR_SCHEMA_VERSION

#define AUTOMATION_EDITOR_SCHEMA_VERSION   1

Definition at line 22 of file automation_editor.h.

◆ AUTOMATION_SELECTIONS

#define AUTOMATION_SELECTIONS   (PROJECT->automation_selections)

Definition at line 24 of file automation_selections.h.

◆ CHORD_EDITOR

#define CHORD_EDITOR   (CLIP_EDITOR->chord_editor)

Definition at line 29 of file chord_editor.h.

◆ CHORD_EDITOR_NUM_CHORDS

#define CHORD_EDITOR_NUM_CHORDS   12

Definition at line 31 of file chord_editor.h.

◆ CHORD_EDITOR_SCHEMA_VERSION

#define CHORD_EDITOR_SCHEMA_VERSION   1

Definition at line 27 of file chord_editor.h.

◆ CHORD_SELECTIONS

#define CHORD_SELECTIONS   (PROJECT->chord_selections)

Definition at line 25 of file chord_selections.h.

◆ CHORD_SELECTIONS_SCHEMA_VERSION

#define CHORD_SELECTIONS_SCHEMA_VERSION   1

Definition at line 23 of file chord_selections.h.

◆ CLIP_EDITOR

#define CLIP_EDITOR   (PROJECT->clip_editor)

Definition at line 30 of file clip_editor.h.

◆ DRUM_LABELS

#define DRUM_LABELS

Definition at line 33 of file piano_roll.h.

◆ EDITOR_SETTINGS_SCHEMA_VERSION

#define EDITOR_SETTINGS_SCHEMA_VERSION   1

Definition at line 21 of file editor_settings.h.

◆ FILE_MANAGER

#define FILE_MANAGER   (ZRYTHM->file_manager)

Definition at line 28 of file file_manager.h.

◆ IS_ARRANGER_OBJECT

#define IS_ARRANGER_OBJECT ( tr)
Value:
(((ArrangerObject *) tr)->magic == ARRANGER_OBJECT_MAGIC \
&& ((ArrangerObject *) tr)->type >= ARRANGER_OBJECT_TYPE_REGION \
&& ((ArrangerObject *) tr)->type <= ARRANGER_OBJECT_TYPE_VELOCITY)
Base struct for arranger objects.

Definition at line 36 of file arranger_object.h.

◆ IS_ARRANGER_OBJECT_AND_NONNULL

#define IS_ARRANGER_OBJECT_AND_NONNULL ( x)    (x && IS_ARRANGER_OBJECT (x))

Definition at line 40 of file arranger_object.h.

◆ IS_ARRANGER_SELECTIONS

#define IS_ARRANGER_SELECTIONS ( x)     (((ArrangerSelections *) x)->magic == ARRANGER_SELECTIONS_MAGIC)

Definition at line 30 of file arranger_selections.h.

◆ IS_ARRANGER_SELECTIONS_AND_NONNULL

#define IS_ARRANGER_SELECTIONS_AND_NONNULL ( x)    (x && IS_ARRANGER_SELECTIONS (x))

Definition at line 32 of file arranger_selections.h.

◆ MA_SELECTIONS

#define MA_SELECTIONS   (PROJECT->midi_arranger_selections)

Definition at line 24 of file midi_arranger_selections.h.

◆ MIXER_SELECTIONS

#define MIXER_SELECTIONS   (PROJECT->mixer_selections)

Definition at line 29 of file mixer_selections.h.

◆ MIXER_SELECTIONS_MAX_SLOTS

#define MIXER_SELECTIONS_MAX_SLOTS   60

Definition at line 31 of file mixer_selections.h.

◆ MIXER_SELECTIONS_SCHEMA_VERSION

#define MIXER_SELECTIONS_SCHEMA_VERSION   1

Definition at line 27 of file mixer_selections.h.

◆ PIANO_ROLL

#define PIANO_ROLL   (CLIP_EDITOR->piano_roll)

Definition at line 31 of file piano_roll.h.

◆ piano_roll_is_next_key_black

#define piano_roll_is_next_key_black ( x)    piano_roll_is_key_black (x + 1)

Definition at line 237 of file piano_roll.h.

◆ piano_roll_is_prev_key_black

#define piano_roll_is_prev_key_black ( x)    piano_roll_is_key_black (x - 1)

Definition at line 239 of file piano_roll.h.

◆ PIANO_ROLL_SCHEMA_VERSION

#define PIANO_ROLL_SCHEMA_VERSION   1

Definition at line 29 of file piano_roll.h.

◆ PRJ_TIMELINE

#define PRJ_TIMELINE   (PROJECT->timeline)

Definition at line 21 of file timeline.h.

◆ timeline_selections_duplicate_w_action

#define timeline_selections_duplicate_w_action ( sel,
ticks,
delta_tracks,
delta_lanes,
already_moved )
Value:
arranger_selections_duplicate_w_action ( \
sel, ticks, 0, 0, delta_tracks, delta_lanes, 0, already_moved)

Definition at line 185 of file timeline_selections.h.

◆ timeline_selections_move_w_action

#define timeline_selections_move_w_action ( sel,
ticks,
delta_tracks,
delta_lanes,
already_moved )
Value:
arranger_selections_move_w_action ( \
sel, ticks, 0, 0, delta_tracks, delta_lanes, 0, already_moved)

Definition at line 180 of file timeline_selections.h.

◆ TL_SELECTIONS

#define TL_SELECTIONS   (PROJECT->timeline_selections)

Definition at line 25 of file timeline_selections.h.

◆ TRACKLIST_SELECTIONS

#define TRACKLIST_SELECTIONS   (PROJECT->tracklist_selections)

Definition at line 25 of file tracklist_selections.h.

Enumeration Type Documentation

◆ ArrangerObjectFlags

ArrangerObject flags.

Enumerator
ARRANGER_OBJECT_FLAG_NON_PROJECT 

This object is not a project object, but an object used temporarily eg.

when undoing/ redoing.

Definition at line 94 of file arranger_object.h.

◆ ArrangerObjectPositionType

enum ArrangerObjectPositionType

Definition at line 107 of file arranger_object.h.

◆ ArrangerObjectResizeType

Flag used in some functions.

Enumerator
ARRANGER_OBJECT_RESIZE_STRETCH_BPM_CHANGE 

Used when we want to resize to contents when BPM changes.

Only applies to audio.

Definition at line 45 of file arranger_object.h.

◆ ArrangerObjectType

The type of the object.

Definition at line 64 of file arranger_object.h.

◆ ArrangerSelectionsProperty

enum ArrangerSelectionsProperty

Definition at line 59 of file arranger_selections.h.

◆ ArrangerSelectionsType

enum ArrangerSelectionsType

Definition at line 37 of file arranger_selections.h.

◆ FileBrowserSelectionType

Current selection in the top window.

Definition at line 57 of file file_manager.h.

◆ FileManagerSpecialLocation

Special location type.

Definition at line 20 of file file_manager.h.

◆ MidiModifier

A MIDI modifier to use to display data for.

Definition at line 87 of file piano_roll.h.

◆ PianoRollHighlighting

Highlighting for the piano roll.

Definition at line 98 of file piano_roll.h.

◆ PianoRollNoteNotation

enum PianoRollNoteNotation

Definition at line 106 of file piano_roll.h.

Function Documentation

◆ arranger_object_clip_start_pos_setter()

void arranger_object_clip_start_pos_setter ( ArrangerObject * self,
const Position * pos )

The setter is for use in e.g.

the digital meters whereas the set_pos func is used during arranger actions.

◆ arranger_object_edit_begin()

void arranger_object_edit_begin ( const ArrangerObject * self)

Callback when beginning to edit the object.

This saves a clone of its current state to its arranger.

◆ arranger_object_edit_finish()

void arranger_object_edit_finish ( const ArrangerObject * self,
ArrangerSelectionsActionEditType type )

Callback when finishing editing the object.

This performs an undoable action.

◆ arranger_object_end_pos_setter()

void arranger_object_end_pos_setter ( ArrangerObject * self,
const Position * pos )

The setter is for use in e.g.

the digital meters whereas the set_pos func is used during arranger actions.

◆ arranger_object_find()

ArrangerObject * arranger_object_find ( ArrangerObject * obj)

Returns the ArrangerObject matching the given one.

This should be called when we have a copy or a clone, to get the actual region in the project.

◆ arranger_object_gen_human_readable_name()

char * arranger_object_gen_human_readable_name ( const ArrangerObject * self)

Generates a human readable name for the object.

If the object has a name, this returns a copy of the name, otherwise generates something appropriate.

Must be free'd by caller.

◆ arranger_object_get_muted()

NONNULL bool arranger_object_get_muted ( ArrangerObject * self,
bool check_parent )

Gets the mute status of the object.

Parameters
check_parentWhether to check parent (parent region or parent track lane if region), otherwise only whether this object itself is muted is returned. This will take the solo status of other lanes if true and if self is a region that can have lanes.

◆ arranger_object_insert_to_project()

WARN_UNUSED_RESULT bool arranger_object_insert_to_project ( ArrangerObject * obj,
GError ** error )

Inserts the ArrangerObject where it belongs in the project (eg, a Track).

This function assumes that the object already knows the index where it should be inserted in its parent.

This is mostly used when undoing.

Returns
Whether successful.

◆ arranger_object_is_hit()

PURE WARN_UNUSED_RESULT bool arranger_object_is_hit ( const ArrangerObject * self,
const Position * start,
const Position * end )

Returns whether the given object is hit by the given position or range.

Parameters
startStart position.
endEnd position, or NULL to only check for intersection with start.

◆ arranger_object_is_position_valid()

HOT NONNULL WARN_UNUSED_RESULT bool arranger_object_is_position_valid ( const ArrangerObject *const self,
const Position * pos,
ArrangerObjectPositionType pos_type )

Returns if the given Position is valid.

Parameters
posThe position to set to.
pos_typeThe type of Position to set in the ArrangerObject.

◆ arranger_object_loop_end_pos_setter()

void arranger_object_loop_end_pos_setter ( ArrangerObject * self,
const Position * pos )

The setter is for use in e.g.

the digital meters whereas the set_pos func is used during arranger actions.

◆ arranger_object_loop_start_pos_setter()

void arranger_object_loop_start_pos_setter ( ArrangerObject * self,
const Position * pos )

The setter is for use in e.g.

the digital meters whereas the set_pos func is used during arranger actions.

◆ arranger_object_pos_setter()

void arranger_object_pos_setter ( ArrangerObject * self,
const Position * pos )

The setter is for use in e.g.

the digital meters whereas the set_pos func is used during arranger actions.

Note
This validates the position.

◆ arranger_object_remove_from_project()

void arranger_object_remove_from_project ( ArrangerObject * obj)

Removes the object from its parent in the project.

Note
Also frees the object.

◆ arranger_object_resize()

WARN_UNUSED_RESULT bool arranger_object_resize ( ArrangerObject * self,
const bool left,
ArrangerObjectResizeType type,
const double ticks,
bool during_ui_action,
GError ** error )

Resizes the object on the left side or right side by given amount of ticks, for objects that do not have loops (currently none? keep it as reference).

Parameters
left1 to resize left side, 0 to resize right side.
ticksNumber of ticks to resize.
during_ui_actionWhether this is called during a UI action (not at the end).
Returns
Whether successful.

◆ arranger_object_select()

void arranger_object_select ( ArrangerObject * self,
const bool select,
const bool append,
bool fire_events )

Selects the object by adding it to its corresponding selections or making it the only selection.

Parameters
select1 to select, 0 to deselect.
append1 to append, 0 to make it the only selection.

◆ arranger_object_set_name_with_action()

void arranger_object_set_name_with_action ( ArrangerObject * self,
const char * name )

Changes the name and adds an action to the undo stack.

Calls arranger_object_set_name() internally.

◆ arranger_object_set_position()

bool arranger_object_set_position ( ArrangerObject * self,
const Position * pos,
ArrangerObjectPositionType pos_type,
const bool validate )

Sets the given position on the object, optionally attempting to validate before.

Parameters
posThe position to set to.
pos_typeThe type of Position to set in the ArrangerObject.
validateValidate the Position before setting it.
Returns
Whether the position was set (false if invalid).

◆ arranger_object_split()

WARN_UNUSED_RESULT bool arranger_object_split ( ArrangerObject * self,
const Position * pos,
const bool pos_is_local,
ArrangerObject ** r1,
ArrangerObject ** r2,
bool is_project,
GError ** error )

Splits the given object at the given Position.

if is_project is true, it deletes the original object and adds 2 new objects in the same parent (Track or AutomationTrack or Region).

Parameters
regionThe ArrangerObject to split. This ArrangerObject will be deleted.
posThe Position to split at.
pos_is_localIf the position is local (1) or global (0).
r1Address to hold the pointer to the newly created ArrangerObject 1.
r2Address to hold the pointer to the newly created ArrangerObject 2.
is_projectWhether the object being passed is a project object. If true, it will be removed from the project and the child objects will be added to the project, otherwise it will be untouched and the children will be mere clones.
Returns
Whether successful.

◆ arranger_object_update_positions()

void arranger_object_update_positions ( ArrangerObject * self,
bool from_ticks,
bool bpm_change,
UndoableAction * action )

Updates the positions in each child recursively.

Parameters
from_ticksWhether to update the positions based on ticks (true) or frames (false).
actionTo be passed when called from an undoable action.

◆ arranger_object_validate()

bool arranger_object_validate ( const ArrangerObject *const self)

Validates the arranger object.

Returns
Whether valid.

◆ arranger_object_validate_name()

bool arranger_object_validate_name ( ArrangerObject * self,
const char * name )

Validates the given name.

Returns
True if valid, false otherwise.

◆ arranger_selections_add_ticks()

NONNULL void arranger_selections_add_ticks ( ArrangerSelections * self,
const double ticks )

Moves the selections by the given amount of ticks.

Parameters
ticksTicks to add.

◆ arranger_selections_add_to_region()

void arranger_selections_add_to_region ( ArrangerSelections * self,
ZRegion * region,
bool clone )

Adds each object in the selection to the given region (if applicable).

Parameters
cloneWhether to clone each object instead of adding it directly.

◆ arranger_selections_contains_object()

NONNULL int arranger_selections_contains_object ( ArrangerSelections * self,
ArrangerObject * obj )

Returns if the arranger object is in the selections or not.

The object must be the main object (see ArrangerObjectInfo).

◆ arranger_selections_contains_object_with_property()

NONNULL bool arranger_selections_contains_object_with_property ( ArrangerSelections * self,
ArrangerSelectionsProperty property,
bool value )

Checks whether an object matches the given parameters.

If a parameter should be checked, the has_* argument must be true and the corresponding argument must have the value to be checked against.

◆ arranger_selections_free_full()

NONNULL void arranger_selections_free_full ( ArrangerSelections * self)

Frees all the objects as well.

To be used in actions where the selections are all clones.

◆ arranger_selections_get_end_pos()

NONNULL void arranger_selections_get_end_pos ( ArrangerSelections * self,
Position * pos,
int global )

Returns the end position of the rightmost object.

Parameters
posThe return value will be stored here.
globalReturn global (timeline) Position, otherwise returns the local (from the start of the Region) Position.

◆ arranger_selections_get_last_object()

NONNULL ArrangerObject * arranger_selections_get_last_object ( const ArrangerSelections * self,
bool ends_last )

Gets last object.

Parameters
ends_lastWhether to get the object that ends last, otherwise the object that starts last.

◆ arranger_selections_get_start_pos()

NONNULL void arranger_selections_get_start_pos ( const ArrangerSelections * self,
Position * pos,
const bool global )

Returns the position of the leftmost object.

Parameters
pos[out]The return value will be stored here.
globalReturn global (timeline) Position, otherwise returns the local (from the start of the Region) Position.

◆ arranger_selections_init_loaded()

void arranger_selections_init_loaded ( ArrangerSelections * self,
bool project,
UndoableAction * action )

Inits the selections after loading a project.

Parameters
projectWhether these are project selections (as opposed to clones).
actionTo be passed when this is called from an undoable action.

◆ arranger_selections_merge()

NONNULL void arranger_selections_merge ( ArrangerSelections * self)

Merges the given selections into one region.

Note
All selections must be on the same lane.

◆ arranger_selections_sort_by_indices()

NONNULL void arranger_selections_sort_by_indices ( ArrangerSelections * sel,
int desc )

Sorts the selections by their indices (eg, for regions, their track indices, then the lane indices, then the index in the lane).

Note
Only works for objects whose tracks exist.
Parameters
descDescending or not.

◆ audio_selections_can_be_pasted()

bool audio_selections_can_be_pasted ( AudioSelections * ts,
Position * pos,
ZRegion * r )

Returns if the selections can be pasted.

Parameters
posPosition to paste to.
regionZRegion to paste to.

◆ automation_selections_can_be_pasted()

bool automation_selections_can_be_pasted ( AutomationSelections * ts,
Position * pos,
ZRegion * r )

Returns if the selections can be pasted.

Parameters
posPosition to paste to.
regionZRegion to paste to.

◆ chord_selections_can_be_pasted()

int chord_selections_can_be_pasted ( ChordSelections * ts,
Position * pos,
ZRegion * region )

Returns if the selections can be pasted.

Parameters
posPosition to paste to.
regionZRegion to paste to.

◆ clip_editor_set_region()

void clip_editor_set_region ( ClipEditor * self,
ZRegion * region,
bool fire_events )

Sets the track and refreshes the piano roll widgets.

To be called only from GTK threads.

◆ file_manager_remove_location_and_save()

void file_manager_remove_location_and_save ( FileManager * self,
const char * location,
bool skip_if_standard )

Removes the given location (bookmark) from the saved locations.

Parameters
skip_if_standardSkip removal if the given location is a standard location.

◆ file_manager_set_selection()

NONNULL void file_manager_set_selection ( FileManager * self,
FileBrowserLocation * sel,
bool load_files,
bool save_to_settings )
Parameters
save_to_settingsWhether to save this location to GSettings.

◆ midi_arranger_selections_can_be_pasted()

int midi_arranger_selections_can_be_pasted ( MidiArrangerSelections * ts,
Position * pos,
ZRegion * region )

Returns if the selections can be pasted.

Parameters
posPosition to paste to.
regionZRegion to paste to.

◆ mixer_selections_add_slot()

void mixer_selections_add_slot ( MixerSelections * ms,
Track * track,
PluginSlotType type,
int slot,
bool clone_pl,
const bool fire_events )

Adds a slot to the selections.

The selections can only be from one channel.

Parameters
trackThe track.
slotThe slot to add to the selections.
clone_plWhether to clone the plugin when storing it in MixerSelections::plugins. Used in some actions.

◆ mixer_selections_clone()

MixerSelections * mixer_selections_clone ( const MixerSelections * src,
bool src_is_project )

Clone the struct for copying, undoing, etc.

@bool src_is_project Whether src are the project selections.

◆ mixer_selections_remove_slot()

NONNULL void mixer_selections_remove_slot ( MixerSelections * ms,
int slot,
PluginSlotType type,
bool publish_events )

Removes a slot from the selections.

Assumes that the channel is the one already selected.

◆ mixer_selections_sort()

NONNULL void mixer_selections_sort ( MixerSelections * self,
bool asc )

Sorts the selections by slot index.

Parameters
ascAscending or not.

◆ NONNULL_ARGS() [1/2]

WARN_UNUSED_RESULT NONNULL_ARGS ( 1 )

Appends the ArrangerObject to where it belongs in the project (eg, a Track), without taking into account its previous index (eg, before deletion if undoing).

Returns
Whether successful.

◆ NONNULL_ARGS() [2/2]

WARN_UNUSED_RESULT NONNULL_ARGS ( 1 ,
2  )

Undoes what arranger_object_split() did.

Returns
Whether successful.

◆ timeline_selections_can_be_pasted()

int timeline_selections_can_be_pasted ( TimelineSelections * ts,
Position * pos,
const int idx )

Returns whether the selections can be pasted.

Zrythm only supports pasting all the selections into a single destination track.

Parameters
posPosition to paste to.
idxTrack index to start pasting to.

◆ timeline_selections_mark_for_bounce()

void timeline_selections_mark_for_bounce ( TimelineSelections * ts,
bool with_parents )
Parameters
with_parentsAlso mark all the track's parents recursively.

◆ timeline_selections_move_regions_to_new_ats()

bool timeline_selections_move_regions_to_new_ats ( TimelineSelections * self,
const int vis_at_diff )

Move the selected regions to new automation tracks.

Returns
True if moved.

◆ timeline_selections_move_regions_to_new_lanes()

bool timeline_selections_move_regions_to_new_lanes ( TimelineSelections * self,
const int diff )

Move the selected Regions to new lanes.

Parameters
diffThe delta to move the tracks.
Returns
True if moved.

◆ timeline_selections_move_regions_to_new_tracks()

bool timeline_selections_move_regions_to_new_tracks ( TimelineSelections * self,
const int vis_track_diff )

Move the selected Regions to the new Track.

Parameters
new_track_is_before1 if the Region's should move to their previous tracks, 0 for their next tracks.
Returns
True if moved.

◆ timeline_selections_new_for_range()

TimelineSelections * timeline_selections_new_for_range ( Position * start_pos,
Position * end_pos,
bool clone_objs )

Creates a new TimelineSelections instance for the given range.

@bool clone_objs True to clone each object, false to use pointers to project objects.

◆ timeline_selections_set_vis_track_indices()

void timeline_selections_set_vis_track_indices ( TimelineSelections * ts)

Replaces the track positions in each object with visible track indices starting from 0.

Used during copying.

◆ tracklist_selections_contains_listened_track()

bool tracklist_selections_contains_listened_track ( TracklistSelections * self,
bool listened )

Returns whether the selections contain a listened track if listened is true or an unlistened track if listened is false.

Parameters
listenedWhether to check for listened or unlistened tracks.

◆ tracklist_selections_contains_muted_track()

bool tracklist_selections_contains_muted_track ( TracklistSelections * self,
bool muted )

Returns whether the selections contain a muted track if muted is true or an unmuted track if muted is false.

Parameters
mutedWhether to check for muted or unmuted tracks.

◆ tracklist_selections_contains_soloed_track()

bool tracklist_selections_contains_soloed_track ( TracklistSelections * self,
bool soloed )

Returns whether the selections contain a soloed track if soloed is true or an unsoloed track if soloed is false.

Parameters
soloedWhether to check for soloed or unsoloed tracks.

◆ tracklist_selections_get_highest_track()

Track * tracklist_selections_get_highest_track ( TracklistSelections * self)

Gets highest track in the selections.

If transient is 1, transient objects rae checked instead.

◆ tracklist_selections_get_lowest_track()

Track * tracklist_selections_get_lowest_track ( TracklistSelections * self)

Gets lowest track in the selections.

If transient is 1, transient objects rae checked instead.

◆ tracklist_selections_mark_for_bounce()

void tracklist_selections_mark_for_bounce ( TracklistSelections * ts,
bool with_parents,
bool mark_master )

Marks the tracks to be bounced.

Parameters
with_parentsAlso mark all the track's parents recursively.
mark_masterAlso mark the master track. Set to true when exporting the mixdown, false otherwise.

◆ tracklist_selections_new()

TracklistSelections * tracklist_selections_new ( bool is_project)
Parameters
is_projectWhether these selections are the project selections (as opposed to clones).

◆ tracklist_selections_select_all()

void tracklist_selections_select_all ( TracklistSelections * ts,
int visible_only )

Selects all Track's.

Parameters
visible_onlyOnly select visible tracks.

◆ tracklist_selections_sort()

void tracklist_selections_sort ( TracklistSelections * self,
bool asc )

Sorts the tracks by position.

Parameters
ascAscending or not.

Variable Documentation

◆ error

WARN_UNUSED_RESULT bool GError ** error

Definition at line 864 of file arranger_object.h.

◆ fire_events

WARN_UNUSED_RESULT bool fire_events

Definition at line 863 of file arranger_object.h.

◆ obj

WARN_UNUSED_RESULT ArrangerObject ArrangerObject** obj

Definition at line 862 of file arranger_object.h.

◆ r2

WARN_UNUSED_RESULT ArrangerObject* r2

Definition at line 861 of file arranger_object.h.