3 Ann Hell Ex Machina - Music Software
4 Copyright (C) 2003/2005 Angel Ortega <angel@triptico.com>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program 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.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 http://www.triptico.com
32 SONG_EV_SS_SET_CHANNEL
,
40 SONG_EV_SS_EFF_ALLPASS
,
41 SONG_EV_SS_EFF_FLANGER
,
42 SONG_EV_SS_EFF_WOBBLE
,
43 SONG_EV_SS_EFF_SQWOBBLE
,
45 SONG_EV_SS_EFF_REVERB
,
52 SONG_EV_SS_NOTE_ON_BY_TIME
,
64 struct song_ev_generic
66 song_ev_type type
; /* event type */
67 double time
; /* event time (1: whole note) */
68 int trk_id
; /* track id */
73 song_ev_type type
; /* SONG_EV_NOTE */
76 int note
; /* MIDI-like note */
77 double len
; /* note length (1: whole note) */
78 float vol
; /* note volume (1: full volume) */
83 song_ev_type type
; /* SONG_EV_TEMPO */
85 int trk_id
; /* always -1 */
86 double tempo
; /* tempo in bpm */
91 song_ev_type type
; /* SONG_EV_METER */
93 int trk_id
; /* always -1 */
94 int num
; /* meter numerator */
95 int den
; /* meter denominator */
98 struct song_ev_ss_note_by_time
100 song_ev_type type
; /* SONG_EV_SS_NOTE_BY_TIME */
103 int note
; /* MIDI-like note (to find the wave) */
104 double len
; /* note length (1: whole note) */
105 float vol
; /* note volume (1: full volume) */
108 struct song_ev_ss_sustain
110 song_ev_type type
; /* SONG_EV_SS_SUSTAIN */
113 double sustain
; /* sustain time (in msecs) */
116 struct song_ev_ss_set_channel
118 song_ev_type type
; /* SONG_EV_SS_SET_CHANNEL */
121 int channel
; /* channel */
122 float vol
; /* volume */
125 struct song_ev_ss_wav
127 song_ev_type type
; /* SONG_EV_SS_WAV */
130 char * file
; /* path to .wav file */
131 int base
; /* MIDI-like base note */
132 int min
; /* MIDI-like minimum note */
133 int max
; /* MIDI-like maximum note */
134 double loop_start
; /* start of loop */
135 double loop_end
; /* end of loop */
138 struct song_ev_ss_pat
140 song_ev_type type
; /* SONG_EV_SS_PAT */
143 char * file
; /* path to .pat file */
146 struct song_ev_ss_eff
148 song_ev_type type
; /* effect type */
151 int channel
; /* channel */
152 double size
; /* size of effect */
153 float gain
; /* gain */
154 double depth
; /* depth */
155 double freq
; /* freq */
156 double phase
; /* phase */
157 float initial
; /* initial vol */
158 float final
; /* final vol */
161 struct song_ev_midi_channel
163 song_ev_type type
; /* SONG_EV_MIDI_CHANNEL */
166 int channel
; /* midi channel (1-16) */
169 struct song_ev_midi_program
171 song_ev_type type
; /* SONG_EV_MIDI_PROGRAM */
174 int program
; /* midi program (0-127) */
179 struct song_ev_generic generic
;
181 struct song_ev_tempo tempo
;
182 struct song_ev_meter meter
;
184 struct song_ev_note note
;
186 struct song_ev_ss_note_by_time ss_note_by_time
;
187 struct song_ev_ss_sustain ss_sustain
;
188 struct song_ev_ss_set_channel ss_set_channel
;
190 struct song_ev_ss_wav ss_wav
;
191 struct song_ev_ss_pat ss_pat
;
193 struct song_ev_ss_eff ss_eff
;
195 struct song_ev_midi_channel midi_channel
;
196 struct song_ev_midi_program midi_program
;
199 extern union song_ev
* song
;
200 extern int n_song_ev
;
202 void song_clear(void);
203 void add_song_ev(union song_ev
* ev
);
204 void song_sort(void);