3 Ann Hell Ex Machina - Music Software
4 Copyright (C) 2003/2004 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
41 ev1_type type
; /* event type */
42 double time
; /* event time (1: whole note) */
43 int trk_id
; /* track id */
48 ev1_type type
; /* EV1_NOTE */
51 int note
; /* MIDI-like note */
52 double len
; /* note length (1: whole note) */
53 double vol
; /* note volume (1: full volume) */
58 ev1_type type
; /* EV1_TEMPO */
60 int trk_id
; /* always -1 */
61 double tempo
; /* tempo in bpm */
66 ev1_type type
; /* EV1_METER */
68 int trk_id
; /* always -1 */
69 int num
; /* meter numerator */
70 int den
; /* meter denominator */
75 ev1_type type
; /* EV1_SS_NOTE */
78 double freq
; /* note frequency */
79 double len
; /* note length (1: whole note) */
80 double vol
; /* note volume (1: full volume) */
85 ev1_type type
; /* EV1_SS_SUSTAIN */
88 int sustain
; /* sustain time (in frames) */
91 struct ev1_ss_channel_map
93 ev1_type type
; /* EV1_SS_CHANNEL_MAP */
96 float vol
[CHANNELS
]; /* volume for each channel */
101 struct ev1_generic generic
;
102 struct ev1_note note
;
103 struct ev1_tempo tempo
;
104 struct ev1_meter meter
;
105 struct ev1_ss_note ss_note
;
106 struct ev1_ss_sustain ss_sustain
;
107 struct ev1_ss_channel_map ss_channel_map
;
110 extern union event1
* _events_1
;
111 extern int _n_events_1
;
128 ev2_type type
; /* event type */
129 int frame
; /* frame number (time) */
130 int trk_id
; /* track id */
136 ev2_type type
; /* EV2_NOTE_OFF */
139 int note_id
; /* note id */
144 ev2_type type
; /* EV2_NOTE_ON */
147 int note_id
; /* note id */
148 int note
; /* MIDI-like note number */
149 double vol
; /* volume */
152 struct ev2_ss_note_on
154 ev2_type type
; /* EV2_SS_NOTE_ON */
157 int note_id
; /* note id */
158 double freq
; /* note frequency */
159 double vol
; /* volume */
162 struct ev2_ss_sustain
164 ev2_type type
; /* EV2_SS_SUSTAIN */
167 int sustain
; /* sustain time (in frames) */
170 struct ev2_ss_channel_map
172 ev2_type type
; /* EV2_SS_CHANNEL_MAP */
175 float vol
[CHANNELS
]; /* volumes for each channel */
181 struct ev2_generic generic
;
182 struct ev2_note_on note_on
;
183 struct ev2_note_off note_off
;
184 struct ev2_ss_note_on ss_note_on
;
185 struct ev2_ss_sustain ss_sustain
;
186 struct ev2_ss_channel_map ss_channel_map
;
189 extern union event2
* _events_2
;
190 extern int _n_events_2
;
193 void event1_clear(void);
194 void new_event1(union event1
* ev
);
195 void event1_sort(void);
197 void event2_clear(void);
198 void new_event2(union event2
* ev
);
199 void event2_sort(void);
201 void event1_to_event2(void);