Mercurial > hg > forks > bilotrip-mj12
annotate src/midifile.h @ 37:1db62040204e
Combine some headers to single mplatform.h
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 05 Aug 2013 21:53:33 +0300 |
parents | a14cc6c5d7ef |
children | d85542c96791 |
rev | line source |
---|---|
0 | 1 #ifndef _MIDIFILE_H |
2 #define _MIDIFILE_H | |
3 | |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
4 #include "midiinfo.h" /* enumerations and constants for GM */ |
37
1db62040204e
Combine some headers to single mplatform.h
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
5 #include "mplatform.h" |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
6 |
0 | 7 |
8 /* | |
9 * midiFile.c - Header file for Steevs MIDI Library | |
10 * Version 1.4 | |
11 * | |
12 * AUTHOR: Steven Goodwin (StevenGoodwin@gmail.com) | |
13 * Copyright 1998-2010, Steven Goodwin. | |
14 * | |
15 * This program is free software; you can redistribute it and/or | |
16 * modify it under the terms of the GNU General Public License as | |
17 * published by the Free Software Foundation; either version 2 of | |
18 * the License,or (at your option) any later version. | |
19 * | |
20 * This program is distributed in the hope that it will be useful, | |
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 * GNU General Public License for more details. | |
24 * | |
25 * You should have received a copy of the GNU General Public License | |
26 * along with this program; if not, write to the Free Software | |
27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
28 */ | |
29 | |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
30 /* |
0 | 31 ** All functions start with one of the following prefixes: |
32 ** midiFile* For non-GM features that relate to the file, and have | |
33 ** no use once the file has been created, i.e. CreateFile | |
34 ** or SetTrack (those data is embedded into the file, but | |
35 ** not explicitly stored) | |
36 ** midiSong* For operations that work across the song, i.e. SetTempo | |
37 ** midiTrack* For operations on a specific track, i.e. AddNoteOn | |
38 */ | |
39 | |
40 /* | |
41 ** MIDI Constants | |
42 */ | |
43 #define MIDI_PPQN_DEFAULT 384 | |
44 #define MIDI_VERSION_DEFAULT 1 | |
45 | |
46 /* | |
47 ** MIDI Limits | |
48 */ | |
49 #define MAX_MIDI_TRACKS 256 | |
50 #define MAX_TRACK_POLYPHONY 64 | |
51 | |
52 /* | |
53 ** MIDI structures, accessibly externably | |
54 */ | |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
55 typedef void MIDI_FILE; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
56 typedef struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
57 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
58 tMIDI_MSG iType; |
0 | 59 |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
60 Uint32 dt; /* delta time */ |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
61 Uint32 dwAbsPos; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
62 Uint32 iMsgSize; |
0 | 63 |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
64 BOOL bImpliedMsg; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
65 tMIDI_MSG iImpliedMsg; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
66 |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
67 /* Raw data chunk */ |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
68 Uint8 *data; /* dynamic data block */ |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
69 Uint32 data_sz; |
0 | 70 |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
71 union |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
72 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
73 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
74 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
75 int iNote; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
76 int iChannel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
77 int iVolume; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
78 } NoteOn; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
79 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
80 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
81 int iNote; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
82 int iChannel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
83 } NoteOff; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
84 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
85 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
86 int iNote; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
87 int iChannel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
88 int iPressure; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
89 } NoteKeyPressure; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
90 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
91 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
92 int iChannel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
93 tMIDI_CC iControl; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
94 int iParam; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
95 } NoteParameter; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
96 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
97 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
98 int iChannel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
99 int iProgram; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
100 } ChangeProgram; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
101 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
102 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
103 int iChannel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
104 int iPressure; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
105 } ChangePressure; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
106 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
107 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
108 int iChannel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
109 int iPitch; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
110 } PitchWheel; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
111 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
112 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
113 tMIDI_META iType; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
114 union |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
115 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
116 int iMIDIPort; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
117 int iSequenceNumber; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
118 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
119 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
120 Uint8 *pData; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
121 } Text; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
122 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
123 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
124 int iBPM; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
125 } Tempo; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
126 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
127 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
128 int iHours, iMins; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
129 int iSecs, iFrames, iFF; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
130 } SMPTE; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
131 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
132 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
133 tMIDI_KEYSIG iKey; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
134 } KeySig; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
135 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
136 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
137 int iNom, iDenom; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
138 } TimeSig; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
139 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
140 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
141 Uint8 *pData; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
142 int iSize; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
143 } Sequencer; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
144 } Data; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
145 } MetaEvent; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
146 struct |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
147 { |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
148 Uint8 *pData; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
149 int iSize; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
150 } SysEx; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
151 } MsgData; |
0 | 152 |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
153 /* State information - Please treat these as private */ |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
154 tMIDI_MSG iLastMsgType; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
155 Uint8 iLastMsgChnl; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
156 |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
157 } MIDI_MSG; |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
158 |
0 | 159 |
160 /* | |
161 ** midiFile* Prototypes | |
162 */ | |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
163 MIDI_FILE *midiFileCreate(const char *pFilename, BOOL bOverwriteIfExists); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
164 int midiFileSetTracksDefaultChannel(MIDI_FILE *pMF, int iTrack, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
165 int iChannel); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
166 int midiFileGetTracksDefaultChannel(const MIDI_FILE *pMF, int iTrack); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
167 BOOL midiFileFlushTrack(MIDI_FILE *pMF, int iTrack, BOOL bFlushToEnd, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
168 Uint32 dwEndTimePos); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
169 BOOL midiFileSyncTracks(MIDI_FILE *pMF, int iTrack1, int iTrack2); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
170 int midiFileSetPPQN(MIDI_FILE *pMF, int PPQN); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
171 int midiFileGetPPQN(const MIDI_FILE *pMF); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
172 int midiFileSetVersion(MIDI_FILE *pMF, int iVersion); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
173 int midiFileGetVersion(const MIDI_FILE *pMF); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
174 MIDI_FILE *midiFileOpen(const char *pFilename); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
175 BOOL midiFileClose(MIDI_FILE *pMF); |
0 | 176 |
177 /* | |
178 ** midiSong* Prototypes | |
179 */ | |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
180 BOOL midiSongAddSMPTEOffset(MIDI_FILE *pMF, int iTrack, int iHours, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
181 int iMins, int iSecs, int iFrames, int iFFrames); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
182 BOOL midiSongAddSimpleTimeSig(MIDI_FILE *pMF, int iTrack, int iNom, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
183 int iDenom); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
184 BOOL midiSongAddTimeSig(MIDI_FILE *pMF, int iTrack, int iNom, int iDenom, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
185 int iClockInMetroTick, int iNotated32nds); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
186 BOOL midiSongAddKeySig(MIDI_FILE *pMF, int iTrack, tMIDI_KEYSIG iKey); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
187 BOOL midiSongAddTempo(MIDI_FILE *pMF, int iTrack, int iTempo); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
188 BOOL midiSongAddMIDIPort(MIDI_FILE *pMF, int iTrack, int iPort); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
189 BOOL midiSongAddEndSequence(MIDI_FILE *pMF, int iTrack); |
0 | 190 |
191 /* | |
192 ** midiTrack* Prototypes | |
193 */ | |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
194 BOOL midiTrackAddRaw(MIDI_FILE *pMF, int iTrack, int iDataSize, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
195 const Uint8 * pData, BOOL bMovePtr, int iDeltaTime); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
196 BOOL midiTrackIncTime(MIDI_FILE *pMF, int iTrack, int iDeltaTime, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
197 BOOL bOverridePPQN); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
198 BOOL midiTrackAddText(MIDI_FILE *pMF, int iTrack, tMIDI_TEXT iType, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
199 const char *pTxt); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
200 BOOL midiTrackAddMsg(MIDI_FILE *pMF, int iTrack, tMIDI_MSG iMsg, int iParam1, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
201 int iParam2); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
202 BOOL midiTrackSetKeyPressure(MIDI_FILE *pMF, int iTrack, int iNote, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
203 int iAftertouch); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
204 BOOL midiTrackAddControlChange(MIDI_FILE *pMF, int iTrack, tMIDI_CC iCCType, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
205 int iParam); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
206 BOOL midiTrackAddProgramChange(MIDI_FILE *pMF, int iTrack, int iInstrPatch); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
207 BOOL midiTrackChangeKeyPressure(MIDI_FILE *pMF, int iTrack, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
208 int iDeltaPressure); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
209 BOOL midiTrackSetPitchWheel(MIDI_FILE *pMF, int iTrack, int iWheelPos); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
210 BOOL midiTrackAddNote(MIDI_FILE *pMF, int iTrack, int iNote, int iLength, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
211 int iVol, BOOL bAutoInc, BOOL bOverrideLength); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
212 BOOL midiTrackAddRest(MIDI_FILE *pMF, int iTrack, int iLength, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
213 BOOL bOverridePPQN); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
214 BOOL midiTrackGetEndPos(MIDI_FILE *pMF, int iTrack); |
0 | 215 |
216 /* | |
217 ** midiRead* Prototypes | |
218 */ | |
34
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
219 int midiReadGetNumTracks(const MIDI_FILE *pMF); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
220 BOOL midiReadGetNextMessage(const MIDI_FILE *pMF, int iTrack, |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
221 MIDI_MSG * pMsg); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
222 void midiReadInitMessage(MIDI_MSG * pMsg); |
a14cc6c5d7ef
Possibly fix 64-bit issues. Probably not.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
223 void midiReadFreeMessage(MIDI_MSG * pMsg); |
0 | 224 |
225 | |
226 #endif /* _MIDIFILE_H */ |