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
40 ev1_type type
; /* event type */
41 double time
; /* event time (1: whole note) */
42 int trk_id
; /* track id */
47 ev1_type type
; /* EV1_NOTE */
50 int note
; /* MIDI-like note */
51 double len
; /* note length (1: whole note) */
52 double vol
; /* note volume (1: full volume) */
57 ev1_type type
; /* EV1_TEMPO */
59 int trk_id
; /* always -1 */
60 double tempo
; /* tempo in bpm */
65 ev1_type type
; /* EV1_METER */
67 int trk_id
; /* always -1 */
68 int num
; /* meter numerator */
69 int den
; /* meter denominator */
74 ev1_type type
; /* EV1_SS_SUSTAIN */
77 int sustain
; /* sustain time (in frames) */
80 struct ev1_channel_map
82 ev1_type type
; /* EV1_SS_CHANNEL_MAP */
85 float vol
[CHANNELS
]; /* volume for each channel */
90 struct ev1_generic generic
;
92 struct ev1_tempo tempo
;
93 struct ev1_meter meter
;
94 struct ev1_sustain sustain
;
95 struct ev1_channel_map channel_map
;
98 extern union event1
* _events_1
;
99 extern int _n_events_1
;
115 ev2_type type
; /* event type */
116 int frame
; /* frame number (time) */
117 int trk_id
; /* track id */
123 ev2_type type
; /* EV2_NOTE_OFF */
126 int note_id
; /* note id */
131 ev2_type type
; /* EV2_NOTE_ON */
134 int note_id
; /* note id */
135 int note
; /* MIDI-like note number */
136 double vol
; /* volume */
141 ev2_type type
; /* EV2_SS_SUSTAIN */
144 int sustain
; /* sustain time (in frames) */
147 struct ev2_channel_map
149 ev2_type type
; /* EV2_SS_CHANNEL_MAP */
152 float vol
[CHANNELS
]; /* volumes for each channel */
158 struct ev2_generic generic
;
159 struct ev2_note_on note_on
;
160 struct ev2_note_off note_off
;
161 struct ev2_sustain sustain
;
162 struct ev2_channel_map channel_map
;
165 extern union event2
* _events_2
;
166 extern int _n_events_2
;
169 void event1_clear(void);
170 void new_event1(union event1
* ev
);
171 void event1_sort(void);
173 void event2_clear(void);
174 void new_event2(union event2
* ev
);
175 void event2_sort(void);
177 void event1_to_event2(void);