1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
/**********************************************************************
Audacity: A Digital Audio Editor
ImportMIDI.h
Dominic Mazzoni
**********************************************************************/
#ifndef _IMPORT_MIDI_
#define _IMPORT_MIDI_
class NoteTrack;
bool ImportMIDI(wxString fName, NoteTrack * dest);
class MIDIParser {
public:
MIDIParser();
void Parse();
unsigned char *buffer;
int bufferLen;
int index;
NoteTrack *noteTrack;
int midifile_error;
int keys[16][128];
int division;
double tempo;
private:
int check_aborted(void);
int Mf_getc(void);
void Mf_error(char *);
void Mf_on(int, int, int);
void Mf_off(int, int, int);
void Mf_header(int, int, int);
void Mf_tempo(int);
void Mf_starttrack(void) {}
void Mf_endtrack(void) {}
void Mf_eot(void) {}
void Mf_pressure(int, int, int) {}
void Mf_controller(int, int, int) {}
void Mf_pitchbend(int, int, int) {}
void Mf_program(int, int) {}
void Mf_chanpressure(int, int) {}
void Mf_sysex(int, char *) {}
void Mf_arbitrary(int, char *) {}
void Mf_metamisc(int, int, char *) {}
void Mf_seqnum(int) {}
void Mf_smpte(int, int, int, int, int) {}
void Mf_timesig(int, int, int, int) {}
void Mf_keysig(int, int) {}
void Mf_sqspecific(int, char *) {}
void Mf_text(int, int, char *) {}
int Mf_nomerge; /* 1 => continue'ed system exclusives are */
/* not collapsed. */
long Mf_currtime; /* current time in delta-time units */
int Mf_skipinit;
long Mf_toberead;
int abort_flag;
long readvarinum(void);
long read32bit(void);
int read16bit(void);
void msgenlarge(void);
char *msg(void);
int readheader(void);
void readtrack(void);
void sysex(void);
void msginit(void);
int egetc(void);
int msgleng(void);
int readmt(char *, int);
long to32bit(int, int, int, int);
int to16bit(int, int);
void mferror(char *);
void badbyte(int);
void metaevent(int);
void msgadd(int);
void chanmessage(int, int, int);
char *Msgbuff; /* message buffer */
int Msgsize; /* Size of currently allocated Msg */
int Msgindex; /* index of next available location in Msg */
};
#endif
|