Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
audio_arranger.h
1/*
2 * Copyright (C) 2020-2022 Alexandros Theodotou <alex at zrythm dot org>
3 *
4 * This file is part of Zrythm
5 *
6 * Zrythm is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Zrythm is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef __GUI_WIDGETS_AUDIO_ARRANGER_H__
21#define __GUI_WIDGETS_AUDIO_ARRANGER_H__
22
23#include "dsp/position.h"
24#include "gui/backend/tool.h"
26#include "gui/widgets/main_window.h"
27
28#include <gtk/gtk.h>
29
36#define MW_AUDIO_ARRANGER MW_AUDIO_EDITOR_SPACE->arranger
37
38void
39audio_arranger_widget_snap_range_r (ArrangerWidget * self, Position * pos);
40
51bool
53 ArrangerWidget * self,
54 double x,
55 double y,
56 bool fade_in,
57 bool resize);
58
62bool
64
66audio_arranger_widget_get_action_on_drag_begin (ArrangerWidget * self);
67
71void
73 ArrangerWidget * self,
74 double offset_y,
75 bool fade_in);
76
77void
78audio_arranger_widget_update_gain (ArrangerWidget * self, double offset_y);
79
92int
94 ArrangerWidget * self,
95 Position * pos,
96 bool fade_in,
97 bool dry_run);
98
103#endif
Arranger base widget.
UiOverlayAction
Various overlay actions to be shared.
Definition ui.h:249
bool audio_arranger_widget_is_cursor_gain(ArrangerWidget *self, double x, double y)
Returns whether the cursor touches the gain line.
bool audio_arranger_widget_is_cursor_in_fade(ArrangerWidget *self, double x, double y, bool fade_in, bool resize)
Returns whether the cursor is inside a fade area.
void audio_arranger_widget_fade_up(ArrangerWidget *self, double offset_y, bool fade_in)
Handle fade in/out curviness drag.
int audio_arranger_widget_snap_fade(ArrangerWidget *self, Position *pos, bool fade_in, bool dry_run)
Updates the fade position during drag update.
Position struct and API.
The arranger widget is a canvas that draws all the arranger objects it contains.
Definition arranger.h:107
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:127