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_PITCH_STRETCH
,
61 struct song_ev_generic
63 song_ev_type type
; /* event type */
64 double time
; /* event time (1: whole note) */
65 int trk_id
; /* track id */
70 song_ev_type type
; /* SONG_EV_NOTE */
73 int note
; /* MIDI-like note */
74 double len
; /* note length (1: whole note) */
75 float vol
; /* note volume (1: full volume) */
80 song_ev_type type
; /* SONG_EV_TEMPO */
82 int trk_id
; /* always -1 */
83 double tempo
; /* tempo in bpm */
88 song_ev_type type
; /* SONG_EV_METER */
90 int trk_id
; /* always -1 */
91 int num
; /* meter numerator */
92 int den
; /* meter denominator */
95 struct song_ev_ss_pitch_stretch
97 song_ev_type type
; /* SONG_EV_SS_PITCH_STRETCH */
100 int note
; /* MIDI-like note (to find the wave) */
101 double len
; /* note length (1: whole note) */
102 float vol
; /* note volume (1: full volume) */
105 struct song_ev_ss_sustain
107 song_ev_type type
; /* SONG_EV_SS_SUSTAIN */
110 double sustain
; /* sustain time (in msecs) */
113 struct song_ev_ss_set_channel
115 song_ev_type type
; /* SONG_EV_SS_SET_CHANNEL */
118 int channel
; /* channel */
119 float vol
; /* volume */
122 struct song_ev_ss_wav
124 song_ev_type type
; /* SONG_EV_SS_WAV */
127 char * file
; /* path to .wav file */
128 int base
; /* MIDI-like base note */
129 int min
; /* MIDI-like minimum note */
130 int max
; /* MIDI-like maximum note */
131 double loop_start
; /* start of loop */
132 double loop_end
; /* end of loop */
135 struct song_ev_ss_pat
137 song_ev_type type
; /* SONG_EV_SS_PAT */
140 char * file
; /* path to .pat file */
143 struct song_ev_ss_eff
145 song_ev_type type
; /* effect type */
148 int channel
; /* channel */
149 double size
; /* size of effect */
150 float gain
; /* gain */
151 double depth
; /* depth */
152 double freq
; /* freq */
153 double phase
; /* phase */
154 float initial
; /* initial vol */
155 float final
; /* final vol */
158 struct song_ev_midi_channel
160 song_ev_type type
; /* SONG_EV_MIDI_CHANNEL */
163 int channel
; /* midi channel (1-16) */
166 struct song_ev_midi_program
168 song_ev_type type
; /* SONG_EV_MIDI_PROGRAM */
171 int program
; /* midi program (0-127) */
176 struct song_ev_generic generic
;
178 struct song_ev_tempo tempo
;
179 struct song_ev_meter meter
;
181 struct song_ev_note note
;
183 struct song_ev_ss_pitch_stretch ss_pitch_stretch
;
184 struct song_ev_ss_sustain ss_sustain
;
185 struct song_ev_ss_set_channel ss_set_channel
;
187 struct song_ev_ss_wav ss_wav
;
188 struct song_ev_ss_pat ss_pat
;
190 struct song_ev_ss_eff ss_eff
;
192 struct song_ev_midi_channel midi_channel
;
193 struct song_ev_midi_program midi_program
;
196 extern union song_ev
* song
;
197 extern int n_song_ev
;
199 void song_clear(void);
200 void add_song_ev(union song_ev
* ev
);
201 void song_sort(void);