1 /* GSequencer - Advanced GTK Sequencer 2 * Copyright (C) 2005-2019 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_COUNT_BEATS_AUDIO_RUN_H__ 21 #define __AGS_COUNT_BEATS_AUDIO_RUN_H__ 22 23 #include <glib.h> 24 #include <glib-object.h> 25 26 #include <ags/libags.h> 27 28 #include <ags/audio/ags_audio.h> 29 #include <ags/audio/ags_recall_audio_run.h> 30 31 #include <ags/audio/recall/ags_delay_audio_run.h> 32 33 G_BEGIN_DECLS 34 35 #define AGS_TYPE_COUNT_BEATS_AUDIO_RUN (ags_count_beats_audio_run_get_type()) 36 #define AGS_COUNT_BEATS_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, AgsCountBeatsAudioRun)) 37 #define AGS_COUNT_BEATS_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, AgsCountBeatsAudioRun)) 38 #define AGS_IS_COUNT_BEATS_AUDIO_RUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_COUNT_BEATS_AUDIO_RUN)) 39 #define AGS_IS_COUNT_BEATS_AUDIO_RUN_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_COUNT_BEATS_AUDIO_RUN)) 40 #define AGS_COUNT_BEATS_AUDIO_RUN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_COUNT_BEATS_AUDIO_RUN, AgsCountBeatsAudioRunClass)) 41 42 typedef struct _AgsCountBeatsAudioRun AgsCountBeatsAudioRun; 43 typedef struct _AgsCountBeatsAudioRunClass AgsCountBeatsAudioRunClass; 44 45 struct _AgsCountBeatsAudioRun 46 { 47 AgsRecallAudioRun recall_audio_run; 48 49 gboolean first_run; 50 51 gdouble bpm; 52 gdouble tact; 53 54 guint64 sequencer_counter; 55 guint64 notation_counter; 56 guint64 wave_counter; 57 guint64 midi_counter; 58 59 guint recall_ref; 60 61 guint hide_ref; 62 guint sequencer_hide_ref_counter; 63 guint notation_hide_ref_counter; 64 guint wave_hide_ref_counter; 65 guint midi_hide_ref_counter; 66 67 AgsDelayAudioRun *delay_audio_run; 68 }; 69 70 struct _AgsCountBeatsAudioRunClass 71 { 72 AgsRecallAudioRunClass recall_audio_run; 73 74 void (*sequencer_start)(AgsCountBeatsAudioRun *count_beats_audio_run, 75 guint nth_run); 76 void (*sequencer_loop)(AgsCountBeatsAudioRun *count_beats_audio_run, 77 guint nth_run); 78 void (*sequencer_stop)(AgsCountBeatsAudioRun *count_beats_audio_run, 79 guint nth_run); 80 81 void (*notation_start)(AgsCountBeatsAudioRun *count_beats_audio_run, 82 guint nth_run); 83 void (*notation_loop)(AgsCountBeatsAudioRun *count_beats_audio_run, 84 guint nth_run); 85 void (*notation_stop)(AgsCountBeatsAudioRun *count_beats_audio_run, 86 guint nth_run); 87 88 void (*wave_start)(AgsCountBeatsAudioRun *count_beats_audio_run, 89 guint nth_run); 90 void (*wave_loop)(AgsCountBeatsAudioRun *count_beats_audio_run, 91 guint nth_run); 92 void (*wave_stop)(AgsCountBeatsAudioRun *count_beats_audio_run, 93 guint nth_run); 94 95 void (*midi_start)(AgsCountBeatsAudioRun *count_beats_audio_run, 96 guint nth_run); 97 void (*midi_loop)(AgsCountBeatsAudioRun *count_beats_audio_run, 98 guint nth_run); 99 void (*midi_stop)(AgsCountBeatsAudioRun *count_beats_audio_run, 100 guint nth_run); 101 }; 102 103 G_DEPRECATED 104 GType ags_count_beats_audio_run_get_type(); 105 106 G_DEPRECATED 107 void ags_count_beats_audio_run_sequencer_start(AgsCountBeatsAudioRun *count_beats_audio_run, 108 guint nth_run); 109 G_DEPRECATED 110 void ags_count_beats_audio_run_sequencer_loop(AgsCountBeatsAudioRun *count_beats_audio_run, 111 guint nth_run); 112 G_DEPRECATED 113 void ags_count_beats_audio_run_sequencer_stop(AgsCountBeatsAudioRun *count_beats_audio_run, 114 guint nth_run); 115 116 G_DEPRECATED 117 void ags_count_beats_audio_run_notation_start(AgsCountBeatsAudioRun *count_beats_audio_run, 118 guint nth_run); 119 G_DEPRECATED 120 void ags_count_beats_audio_run_notation_loop(AgsCountBeatsAudioRun *count_beats_audio_run, 121 guint nth_run); 122 G_DEPRECATED 123 void ags_count_beats_audio_run_notation_stop(AgsCountBeatsAudioRun *count_beats_audio_run, 124 guint nth_run); 125 126 G_DEPRECATED 127 void ags_count_beats_audio_run_wave_start(AgsCountBeatsAudioRun *count_beats_audio_run, 128 guint nth_run); 129 G_DEPRECATED 130 void ags_count_beats_audio_run_wave_loop(AgsCountBeatsAudioRun *count_beats_audio_run, 131 guint nth_run); 132 G_DEPRECATED 133 void ags_count_beats_audio_run_wave_stop(AgsCountBeatsAudioRun *count_beats_audio_run, 134 guint nth_run); 135 136 G_DEPRECATED 137 void ags_count_beats_audio_run_midi_start(AgsCountBeatsAudioRun *count_beats_audio_run, 138 guint nth_run); 139 G_DEPRECATED 140 void ags_count_beats_audio_run_midi_loop(AgsCountBeatsAudioRun *count_beats_audio_run, 141 guint nth_run); 142 G_DEPRECATED 143 void ags_count_beats_audio_run_midi_stop(AgsCountBeatsAudioRun *count_beats_audio_run, 144 guint nth_run); 145 146 G_DEPRECATED 147 AgsCountBeatsAudioRun* ags_count_beats_audio_run_new(AgsAudio *audio, 148 AgsDelayAudioRun *delay_audio_run); 149 150 G_END_DECLS 151 152 #endif /*__AGS_COUNT_BEATS_AUDIO_RUN_H__*/ 153