1 /* GSequencer - Advanced GTK Sequencer 2 * Copyright (C) 2005-2021 Joël Krähemann 3 * 4 * This file is part of GSequencer. 5 * 6 * GSequencer is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU 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 * GSequencer 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 General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with GSequencer. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef __AGS_MATRIX_H__ 21 #define __AGS_MATRIX_H__ 22 23 #include <glib.h> 24 #include <glib-object.h> 25 26 #include <gtk/gtk.h> 27 28 #include <ags/libags.h> 29 #include <ags/libags-audio.h> 30 31 #include <ags/libags-gui.h> 32 33 #include <ags/X/ags_machine.h> 34 35 #include <ags/X/machine/ags_cell_pattern.h> 36 37 G_BEGIN_DECLS 38 39 #define AGS_TYPE_MATRIX (ags_matrix_get_type()) 40 #define AGS_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_MATRIX, AgsMatrix)) 41 #define AGS_MATRIX_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_MATRIX, AgsMatrixClass)) 42 #define AGS_IS_MATRIX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_MATRIX)) 43 #define AGS_IS_MATRIX_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_MATRIX)) 44 #define AGS_MATRIX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_MATRIX, AgsMatrixClass)) 45 46 typedef struct _AgsMatrix AgsMatrix; 47 typedef struct _AgsMatrixClass AgsMatrixClass; 48 49 struct _AgsMatrix 50 { 51 AgsMachine machine; 52 53 guint flags; 54 55 guint mapped_output_pad; 56 guint mapped_input_pad; 57 58 gchar *name; 59 gchar *xml_type; 60 61 AgsRecallContainer *playback_play_container; 62 AgsRecallContainer *playback_recall_container; 63 64 AgsRecallContainer *pattern_play_container; 65 AgsRecallContainer *pattern_recall_container; 66 67 AgsRecallContainer *notation_play_container; 68 AgsRecallContainer *notation_recall_container; 69 70 AgsRecallContainer *volume_play_container; 71 AgsRecallContainer *volume_recall_container; 72 73 AgsRecallContainer *envelope_play_container; 74 AgsRecallContainer *envelope_recall_container; 75 76 AgsRecallContainer *buffer_play_container; 77 AgsRecallContainer *buffer_recall_container; 78 79 GtkGrid *grid; 80 81 GtkToggleButton *run; 82 GtkToggleButton *selected; 83 GtkToggleButton *index[9]; 84 85 AgsCellPattern *cell_pattern; 86 87 GtkSpinButton *length_spin; 88 GtkCheckButton *loop_button; 89 90 GtkScale *volume; 91 }; 92 93 struct _AgsMatrixClass 94 { 95 AgsMachineClass machine; 96 }; 97 98 GType ags_matrix_get_type(void); 99 100 void ags_matrix_input_map_recall(AgsMatrix *matrix, 101 guint input_pad_start); 102 void ags_matrix_output_map_recall(AgsMatrix *matrix, 103 guint output_pad_start); 104 105 AgsMatrix* ags_matrix_new(GObject *soundcard); 106 107 G_END_DECLS 108 109 #endif /*__AGS_MATRIX_H__*/ 110