Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
timeline_arranger.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 __GUI_WIDGETS_TIMELINE_ARRANGER_H__
11#define __GUI_WIDGETS_TIMELINE_ARRANGER_H__
12
13#include "dsp/position.h"
15#include "gui/backend/tool.h"
17#include "gui/widgets/main_window.h"
18
19#include <gtk/gtk.h>
20
21typedef struct _ArrangerWidget ArrangerWidget;
22typedef struct MidiNote MidiNote;
23typedef struct SnapGrid SnapGrid;
24typedef struct AutomationPoint AutomationPoint;
25typedef struct _AutomationPointWidget AutomationPointWidget;
26typedef struct AutomationCurve AutomationCurve;
27typedef struct ChordObject ChordObject;
28typedef struct ScaleObject ScaleObject;
29
36#define MW_TIMELINE (MW_TIMELINE_PANEL->timeline)
37#define MW_PINNED_TIMELINE (MW_TIMELINE_PANEL->pinned_timeline)
38
39void
40timeline_arranger_widget_snap_range_r (ArrangerWidget * self, Position * pos);
41
47
51Track *
53
59
64void
66
79bool
81 ArrangerWidget * self,
82 const RegionType type,
83 Track * track,
84 TrackLane * lane,
85 AutomationTrack * at,
86 const Position * pos,
87 GError ** error);
88
97void
99 ArrangerWidget * self,
100 Track * track,
101 double y,
102 const Position * pos);
103
110void
112 ArrangerWidget * self,
113 Track * track,
114 const Position * pos);
115
122void
124 ArrangerWidget * self,
125 Track * track,
126 const Position * pos);
127
140int
142 ArrangerWidget * self,
143 Position * pos,
144 int dry_run);
145
158int
160 ArrangerWidget * self,
161 Position * pos,
162 int dry_run);
163
168void
170
176int
178 ArrangerWidget * self,
179 const int vis_track_diff);
180
189int
191 ArrangerWidget * self,
192 const int diff);
193
200void
202
206void
208
216GMenu *
218 ArrangerWidget * self,
219 GMenu * menu,
220 double x,
221 double y);
222
228void
230 ArrangerWidget * self,
231 double offset_y,
232 int fade_in);
233
237void
239
244#endif
Arranger base widget.
RegionType
Type of Region.
void timeline_arranger_widget_set_select_type(ArrangerWidget *self, double y)
Determines the selection time (objects/range) and sets it.
void timeline_arranger_widget_fade_up(ArrangerWidget *self, double offset_y, int fade_in)
Fade up/down.
TrackLane * timeline_arranger_widget_get_track_lane_at_y(ArrangerWidget *self, double y)
Gets hit TrackLane at y.
void timeline_arranger_widget_create_marker(ArrangerWidget *self, Track *track, const Position *pos)
Create a Marker at the given Position in the given Track.
int timeline_arranger_widget_snap_regions_r(ArrangerWidget *self, Position *pos, int dry_run)
Snaps both the transients (to show in the GUI) and the actual regions.
bool timeline_arranger_widget_create_region(ArrangerWidget *self, const RegionType type, Track *track, TrackLane *lane, AutomationTrack *at, const Position *pos, GError **error)
Create a ZRegion at the given Position in the given Track's given TrackLane.
void timeline_arranger_widget_set_cut_lines_visible(ArrangerWidget *self)
Hides the cut dashed line from hovered regions and redraws them.
AutomationTrack * timeline_arranger_widget_get_at_at_y(ArrangerWidget *self, double y)
Returns the hit AutomationTrack at y.
void timeline_arranger_setup_drag_dest(ArrangerWidget *self)
Sets up the timeline arranger as a drag dest.
int timeline_arranger_widget_snap_regions_l(ArrangerWidget *self, Position *pos, int dry_run)
Snaps both the transients (to show in the GUI) and the actual regions.
int timeline_arranger_move_regions_to_new_tracks(ArrangerWidget *self, const int vis_track_diff)
Move the selected Regions to the new Track.
void timeline_arranger_widget_create_chord_or_scale(ArrangerWidget *self, Track *track, double y, const Position *pos)
Wrapper for timeline_arranger_widget_create_chord() or timeline_arranger_widget_create_scale().
void timeline_arranger_widget_scroll_to(ArrangerWidget *self, Position *pos)
Scroll to the given position.
GMenu * timeline_arranger_widget_gen_context_menu(ArrangerWidget *self, GMenu *menu, double x, double y)
Generate a context menu at x, y.
void timeline_arranger_widget_create_scale(ArrangerWidget *self, Track *track, const Position *pos)
Create a ScaleObject at the given Position in the given Track.
Track * timeline_arranger_widget_get_track_at_y(ArrangerWidget *self, double y)
Gets the Track at y.
void timeline_arranger_widget_remove_children(ArrangerWidget *self)
To be called when pinning/unpinning.
int timeline_arranger_move_regions_to_new_lanes(ArrangerWidget *self, const int diff)
Move the selected Regions to new Lanes.
Position struct and API.
Position pos
Position (or start Position if the object has length).
The arranger widget is a canvas that draws all the arranger objects it contains.
Definition arranger.h:108
An automation point inside an AutomationTrack.
A ChordObject to be shown in the TimelineArrangerWidget.
A MIDI note inside a ZRegion shown in the piano roll.
Definition midi_note.h:49
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:126
A ScaleObject to be shown in the TimelineArrangerWidget.
A TrackLane belongs to a Track (can have many TrackLanes in a Track) and contains Regions.
Definition track_lane.h:41
Track to be inserted into the Project's Tracklist.
Definition track.h:177
Current TimelineArranger selections.