GUI backend module

Contents

Classes

struct ArrangerObjectInfo
Information about the objects associated with the current object.
struct AutomationEditor
Backend for the automation editor.
struct AutomationSelections
Selections to be used for the AutomationArrangerWidget's current selections, copying, undoing, etc.
struct ChordEditor
Backend for the chord editor.
struct ChordSelections
Selections to be used for the ChordArrangerWidget's current selections, copying, undoing, etc.
struct ClipEditor
Clip editor serializable backend.
struct MidiArrangerSelections
Selections to be used for the midi_arranger's current selections, copying, undoing, etc.
struct MidiNoteDescriptor
A descriptor for a MidiNote, used by the piano roll.
struct PianoRoll
Piano roll serializable backend.
struct TimelineSelections
Selections to be used for the timeline's current selections, copying, undoing, etc.

Enums

enum ArrangerObjectInfoType { AOI_TYPE_REGION, AOI_TYPE_MIDI_NOTE, AOI_TYPE_CHORD_OBJECT, AOI_TYPE_SCALE_OBJECT, AOI_TYPE_MARKER, AOI_TYPE_AUTOMATION_POINT, AOI_TYPE_VELOCITY }
The type of the object.
enum ArrangerObjectInfoCounterpart { AOI_COUNTERPART_MAIN, AOI_COUNTERPART_MAIN_TRANSIENT, AOI_COUNTERPART_LANE, AOI_COUNTERPART_LANE_TRANSIENT }
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.
enum PianoRollHighlighting { PR_HIGHLIGHT_NONE, PR_HIGHLIGHT_CHORD, PR_HIGHLIGHT_SCALE, PR_HIGHLIGHT_BOTH }
Highlighting for the piano roll.

Typedefs

using ArrangerObjectInfoType = enum ArrangerObjectInfoType
The type of the object.
using ArrangerObjectInfo = struct ArrangerObjectInfo
Information about the objects associated with the current object.
using AutomationEditor = struct AutomationEditor
Backend for the automation editor.
using AutomationSelections = struct AutomationSelections
Selections to be used for the AutomationArrangerWidget's current selections, copying, undoing, etc.
using ChordEditor = struct ChordEditor
Backend for the chord editor.
using ChordSelections = struct ChordSelections
Selections to be used for the ChordArrangerWidget's current selections, copying, undoing, etc.
using ClipEditor = struct ClipEditor
Clip editor serializable backend.
using MidiArrangerSelections = struct MidiArrangerSelections
Selections to be used for the midi_arranger's current selections, copying, undoing, etc.
using MidiModifier = enum MidiModifier
A MIDI modifier to use to display data for.
using PianoRollHighlighting = enum PianoRollHighlighting
Highlighting for the piano roll.
using MidiNoteDescriptor = struct MidiNoteDescriptor
A descriptor for a MidiNote, used by the piano roll.
using PianoRoll = struct PianoRoll
Piano roll serializable backend.
using TimelineSelections = struct TimelineSelections
Selections to be used for the timeline's current selections, copying, undoing, etc.

Functions

static void _arranger_object_info_init(ArrangerObjectInfo* self, void* main, void* main_trans, void* lane, void* lane_trans, ArrangerObjectInfoType type, ArrangerObjectInfoCounterpart counterpart)
Inits the ArrangerObjectInfo with the given values.
auto arranger_object_info_is_transient(ArrangerObjectInfo* self) -> int
Returns whether the object is transient or not.
auto arranger_object_info_is_lane(ArrangerObjectInfo* self) -> int
Returns whether the object is a lane object or not (only applies to TimelineArrangerWidget objects.
static auto arranger_object_info_is_main(ArrangerObjectInfo* self) -> int
Returns whether the object is a main object or not (only applies to TimelineArrangerWidget objects.
auto arranger_object_info_should_be_visible(ArrangerObjectInfo* self) -> int
Returns if the object represented by the ArrrangerObjectInfo should be visible.
static auto arranger_object_info_get_object(ArrangerObjectInfo* self) -> void*
Gets the object the ArrangerObjectInfo represents.
void arranger_object_info_set_widget_visibility_and_state(ArrangerObjectInfo* self, int all)
Sets the widget visibility and selection state to this counterpart only, or to all counterparts if all is 1.
auto arranger_object_info_get_visible_counterpart(ArrangerObjectInfo* self) -> void*
Returns the first visible counterpart found.
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.
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.
void clip_editor_init_loaded(ClipEditor* self)
Inits the ClipEditor after a Project is loaded.
void clip_editor_set_region(Region* region)
Sets the track and refreshes the piano roll widgets.
auto midi_arranger_selections_get_first_midi_note(MidiArrangerSelections* mas, int transient) -> MidiNote*
Gets first (position-wise) MidiNote.
auto midi_arranger_selections_get_last_midi_note(MidiArrangerSelections* mas, int transient) -> MidiNote*
Gets last (position-wise) MidiNote.
void piano_roll_init_loaded(PianoRoll* self)
Inits the PianoRoll after a Project has been loaded.
auto piano_roll_find_midi_note_descriptor_by_val(PianoRoll* self, int val) -> const MidiNoteDescriptor*
Returns the MidiNoteDescriptor matching the value (0-127).
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.
static void piano_roll_get_visible_notes(PianoRoll* self, MidiNoteDescriptor* arr, int* num)
Gets the visible notes.
void piano_roll_init(PianoRoll* self)
Initializes the PianoRoll.
auto timeline_selections_get_highest_track(TimelineSelections* ts, int transient) -> Track*
Gets highest track in the selections.
auto timeline_selections_get_lowest_track(TimelineSelections* ts, int transient) -> Track*
Gets lowest track in the selections.
void timeline_selections_reset_transient_poses(TimelineSelections* ts)
Set all transient Position's to their main counterparts.
void timeline_selections_set_to_transient_poses(TimelineSelections* ts)
Set all main Position's to their transient counterparts.
void timeline_selections_set_to_transient_values(TimelineSelections* ts)
Similar to set_to_transient_poses, but handles values for objects that support them (like AutomationPoint's).

Defines

#define arranger_object_info_init_main(_main, _main_trans, _lane, _lane_trans, _type)
Initializes each object starting from the main.
#define ARRANGER_SELECTIONS_DECLARE_INIT_LOADED(cc, sc)
Inits the selections after loading a project.
#define ARRANGER_SELECTIONS_DECLARE_CLONE(cc, sc)
Clone the struct for copying, undoing, etc.
#define ARRANGER_SELECTIONS_DECLARE_HAS_ANY(cc, sc)
Returns if there are any selections.
#define ARRANGER_SELECTIONS_DECLARE_GET_START_POS_W_GLOBAL(cc, sc)
Returns the position of the leftmost object.
#define ARRANGER_SELECTIONS_DECLARE_GET_START_POS(cc, sc)
Returns the position of the leftmost object.
#define ARRANGER_SELECTIONS_DECLARE_GET_END_POS_W_GLOBAL(cc, sc)
Returns the position of the rightmost object.
#define ARRANGER_SELECTIONS_DECLARE_GET_END_POS(cc, sc)
Returns the position of the rightmost object.
#define ARRANGER_SELECTIONS_DECLARE_GET_FIRST_OBJ(cc, sc)
Gets first object's widget.
#define ARRANGER_SELECTIONS_DECLARE_GET_LAST_OBJ(cc, sc)
Gets last object's widget.
#define ARRANGER_SELECTIONS_DECLARE_PASTE_TO_POS(cc, sc)
Pastes the given selections to the given Position.
#define ARRANGER_SELECTIONS_DECLARE_SET_CACHE_POSES(cc, sc)
Sets the cache Position's for each object in the selection.
#define ARRANGER_SELECTIONS_DECLARE_ADD_TICKS(cc, sc)
Moves the selections by the given amount of ticks.
#define ARRANGER_SELECTIONS_DECLARE_CLEAR(cc, sc)
Clears selections.
#define ARRANGER_SELECTIONS_DECLARE_FREE(cc, sc)
Frees the selections.
#define ARRANGER_SELECTIONS_DECLARE_FREE_FULL(cc, sc)
Frees all the objects as well.
#define ARRANGER_SELECTIONS_DECLARE_FUNCS(cc, sc)
Declares all of the above functions.
#define ARRANGER_SELECTIONS_DECLARE_ADD_OBJ(cc, sc, obj_cc, obj_sc)
Adds the arranger object to the selections.
#define ARRANGER_SELECTIONS_DECLARE_CONTAINS_OBJ(cc, sc, obj_cc, obj_sc)
Returns if the arranger object is in the selections or not.
#define ARRANGER_SELECTIONS_DECLARE_REMOVE_OBJ(cc, sc, obj_cc, obj_sc)
Removes the arranger object from the selections.
#define ARRANGER_SELECTIONS_DECLARE_OBJ_FUNCS(cc, sc, obj_cc, obj_sc)
Declares the above arranger object-related functions.
#define midi_arranger_selections_add_velocity(mas, vel)
Adds a Velocity (MidiNote) to the selections.
#define midi_arranger_selections_remove_velocity(mas, vel)
Removes a Velocity (MidiNote) from the selections.

Enum documentation

enum ArrangerObjectInfoCounterpart

Enumerators
AOI_COUNTERPART_MAIN

This is the main (non-lane) object.

AOI_COUNTERPART_MAIN_TRANSIENT

This is the transient of the main object.

AOI_COUNTERPART_LANE

This is the lane object.

AOI_COUNTERPART_LANE_TRANSIENT

This is the lane transient object.

Typedef documentation

typedef struct ArrangerObjectInfo ArrangerObjectInfo

Information about the objects associated with the current object.

Each arranger object (Region's, MidiNote's, etc.) should have a copy of this struct and indicate all associated objects here. The type is used to determine which object the current one is.

typedef struct ClipEditor ClipEditor

Clip editor serializable backend.

The actual widgets should reflect the information here.

typedef struct MidiNoteDescriptor MidiNoteDescriptor

A descriptor for a MidiNote, used by the piano roll.

Notes will only be draggable and reorderable in drum mode.

In normal mode, only visibility can be changed.

typedef struct PianoRoll PianoRoll

Piano roll serializable backend.

The actual widgets should reflect the information here.

Function documentation

int arranger_object_info_is_transient(ArrangerObjectInfo* self)

Returns whether the object is transient or not.

Transient objects are objects that are used during moving operations.

int arranger_object_info_should_be_visible(ArrangerObjectInfo* self)

Returns if the object represented by the ArrrangerObjectInfo should be visible.

This is counterpart-specific, ie. it checks if the transient should be visible or lane counterpart should be visible, etc., based on what is given.

Returns if the object represented by the ArrrangerObjectInfo should be visible.

This is counterpart-specific, ie. it checks if the transient should be visible or lane counterpart should be visible, etc., based on what is given.

void arranger_object_info_set_widget_visibility_and_state(ArrangerObjectInfo* self, int all)

Sets the widget visibility and selection state to this counterpart only, or to all counterparts if all is 1.

Sets a counterpart of the given object visible or not.

param cc CamelCase. param lc snake_case.

Sets this object counterpart visible or not.

Sets all object counterparts visible or not.

Sets all object counterparts visible or not.

void clip_editor_set_region(Region* region)

Sets the track and refreshes the piano roll widgets.

To be called only from GTK threads.

Sets the track and refreshes the piano roll widgets.

To be called only from GTK threads.

MidiNote* midi_arranger_selections_get_first_midi_note(MidiArrangerSelections* mas, int transient)

Gets first (position-wise) MidiNote.

If transient is 1, the transient notes are checked instead.

MidiNote* midi_arranger_selections_get_last_midi_note(MidiArrangerSelections* mas, int transient)

Gets last (position-wise) MidiNote.

If transient is 1, the transient notes are checked instead.

Track* timeline_selections_get_highest_track(TimelineSelections* ts, int transient)

Gets highest track in the selections.

If transient is 1, transient objects rae checked instead.

Track* timeline_selections_get_lowest_track(TimelineSelections* ts, int transient)

Gets lowest track in the selections.

If transient is 1, transient objects rae checked instead.

Define documentation

#define ARRANGER_SELECTIONS_DECLARE_SET_CACHE_POSES(cc, sc)

Sets the cache Position's for each object in the selection.

Used by the ArrangerWidget's.

#define ARRANGER_SELECTIONS_DECLARE_FREE_FULL(cc, sc)

Frees all the objects as well.

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

#define ARRANGER_SELECTIONS_DECLARE_CONTAINS_OBJ(cc, sc, obj_cc, obj_sc)

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

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