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 (
40 ArrangerWidget * self,
41 Position * pos);
42
53bool
55 ArrangerWidget * self,
56 double x,
57 double y,
58 bool fade_in,
59 bool resize);
60
64bool
66 ArrangerWidget * self,
67 double x,
68 double y);
69
71audio_arranger_widget_get_action_on_drag_begin (
72 ArrangerWidget * self);
73
77void
79 ArrangerWidget * self,
80 double offset_y,
81 bool fade_in);
82
83void
84audio_arranger_widget_update_gain (
85 ArrangerWidget * self,
86 double offset_y);
87
100int
102 ArrangerWidget * self,
103 Position * pos,
104 bool fade_in,
105 bool dry_run);
106
111#endif
Arranger base widget.
UiOverlayAction
Various overlay actions to be shared.
Definition ui.h:254
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:113
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:137