1 /* 2 * Copyright (C) 2019-2021 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_MIDI_MODIFIER_ARRANGER_H__ 21 #define __GUI_WIDGETS_MIDI_MODIFIER_ARRANGER_H__ 22 23 #include "gui/backend/tool.h" 24 #include "gui/widgets/arranger.h" 25 26 #include <gtk/gtk.h> 27 28 #define MW_MIDI_MODIFIER_ARRANGER \ 29 (MW_MIDI_EDITOR_SPACE->modifier_arranger) 30 31 typedef struct Velocity Velocity; 32 typedef struct _VelocityWidget VelocityWidget; 33 typedef struct _ArrangerWidget ArrangerWidget; 34 35 /** 36 * @addtogroup widgets 37 * 38 * @{ 39 */ 40 41 /** 42 * Sets the start velocities of all velocities 43 * in the current region. 44 */ 45 void 46 midi_modifier_arranger_widget_set_start_vel ( 47 ArrangerWidget * self); 48 49 void 50 midi_modifier_arranger_widget_select_vels_in_range ( 51 ArrangerWidget * self, 52 double offset_x); 53 54 void 55 midi_modifier_arranger_widget_resize_velocities ( 56 ArrangerWidget * self, 57 double offset_y); 58 59 /** 60 * Sets the value of each velocity hit at x to the 61 * value corresponding to y. 62 * 63 * Used with the pencil tool. 64 * 65 * @param append_to_selections Append the hit 66 * velocities to the selections. 67 */ 68 void 69 midi_modifier_arranger_set_hit_velocity_vals ( 70 ArrangerWidget * self, 71 double x, 72 double y, 73 bool append_to_selections); 74 75 /** 76 * Draws a ramp from the start coordinates to the 77 * given coordinates. 78 */ 79 void 80 midi_modifier_arranger_widget_ramp ( 81 ArrangerWidget * self, 82 double offset_x, 83 double offset_y); 84 85 /** 86 * @} 87 */ 88 89 #endif 90