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
,
51 SONG_EV_SS_NOTE_ON_BY_TIME
,
60 struct song_ev_generic
62 song_ev_type type
; /* event type */
63 double time
; /* event time (1: whole note) */
64 int trk_id
; /* track id */
69 song_ev_type type
; /* SONG_EV_NOTE */
72 int note
; /* MIDI-like note */
73 double len
; /* note length (1: whole note) */
74 float vol
; /* note volume (1: full volume) */
79 song_ev_type type
; /* SONG_EV_TEMPO */
81 int trk_id
; /* always -1 */
82 double tempo
; /* tempo in bpm */
87 song_ev_type type
; /* SONG_EV_METER */
89 int trk_id
; /* always -1 */
90 int num
; /* meter numerator */
91 int den
; /* meter denominator */
94 struct song_ev_ss_note_by_time
96 song_ev_type type
; /* SONG_EV_SS_NOTE_BY_TIME */
99 int note
; /* MIDI-like note (to find the wave) */
100 double len
; /* note length (1: whole note) */
101 float vol
; /* note volume (1: full volume) */
104 struct song_ev_ss_sustain
106 song_ev_type type
; /* SONG_EV_SS_SUSTAIN */
109 double sustain
; /* sustain time (in msecs) */
112 struct song_ev_ss_set_channel
114 song_ev_type type
; /* SONG_EV_SS_SET_CHANNEL */
117 int channel
; /* channel */
118 float vol
; /* volume */
121 struct song_ev_ss_wav
123 song_ev_type type
; /* SONG_EV_SS_WAV */
126 char * file
; /* path to .wav file */
127 int base
; /* MIDI-like base note */
128 int min
; /* MIDI-like minimum note */
129 int max
; /* MIDI-like maximum note */
130 double loop_start
; /* start of loop */
131 double loop_end
; /* end of loop */
134 struct song_ev_ss_pat
136 song_ev_type type
; /* SONG_EV_SS_PAT */
139 char * file
; /* path to .pat file */
142 struct song_ev_ss_eff
144 song_ev_type type
; /* effect type */
147 int channel
; /* channel */
148 double size
; /* size of effect */
149 float gain
; /* gain */
150 double depth
; /* depth */
151 double freq
; /* freq */
152 double phase
; /* phase */
153 float initial
; /* initial vol */
154 float final
; /* final vol */
157 struct song_ev_midi_channel
159 song_ev_type type
; /* SONG_EV_MIDI_CHANNEL */
162 int channel
; /* midi channel (1-16) */
165 struct song_ev_midi_program
167 song_ev_type type
; /* SONG_EV_MIDI_PROGRAM */
170 int program
; /* midi program (0-127) */
175 struct song_ev_generic generic
;
177 struct song_ev_tempo tempo
;
178 struct song_ev_meter meter
;
180 struct song_ev_note note
;
182 struct song_ev_ss_note_by_time ss_note_by_time
;
183 struct song_ev_ss_sustain ss_sustain
;
184 struct song_ev_ss_set_channel ss_set_channel
;
186 struct song_ev_ss_wav ss_wav
;
187 struct song_ev_ss_pat ss_pat
;
189 struct song_ev_ss_eff ss_eff
;
191 struct song_ev_midi_channel midi_channel
;
192 struct song_ev_midi_program midi_program
;
195 extern union song_ev
* song
;
196 extern int n_song_ev
;
198 void song_clear(void);
199 void add_song_ev(union song_ev
* ev
);
200 void song_sort(void);