2
* Event types 0 to 127 are available for private use
6
#define EV_PRIVATE_META 0
13
int MThd_ntrk; /* Num of tracks */
26
unsigned char *events;
29
* The flags are set when loading the track. Let's hope they are
30
* updated also when the track gets changed.
33
#define TRK_MULTICHN 0x00000001 /* More than one channel */
34
#define TRK_MULTIPGM 0x00000002 /* More than one program */
35
#define TRK_VEL_NOTEON 0x00000004 /* Events with on vel. <> 64 */
36
#define TRK_AFTERTOUCH 0x00000008 /* Aftertouch events */
37
#define TRK_POLY_AFTERTOUCH 0x00000010 /* Polyph. aftertouch events */
38
#define TRK_VEL_NOTEOFF 0x00000020 /* Events with off vel. <> 64 */
39
#define TRK_CONTROLS 0x00000040 /* Controller events */
40
#define TRK_BENDER 0x00000080 /* Bender events */
41
#define TRK_NOTES 0x00000100 /* At least one note on */
42
int init_chn; /* First chn referenced by the track */
43
int init_pgm; /* First pgm referenced by the track */
44
int chn; /* chn assigned to the track */
45
int chnmask; /* channel bitmap */
46
int port; /* port assigned to the track */
47
int pgm; /* pgm assigned to the track */
49
int noteon_time; /* Time of the first noteon */
51
int min_note, max_note; /* Scale info */
52
short pgm_map[128]; /* MIDI pgm mapping table */
53
short drum_map[128]; /* MIDI drum pgm mapping table */
55
typedef struct mlib_track mlib_track;
59
int magic; /* 0x121234 */
68
unsigned char buf[1024];
73
unsigned char prev_status; /* For running status */
75
mlib_track *control_track;
77
mlib_track *tracks[MAX_TRACK];
80
typedef struct mlib_desc mlib_desc;
82
int mlib_chkdesc (mlib_desc * desc);
83
mlib_track *mlib_loadtrack (mlib_desc * desc, int *end_detected);
84
void mlib_deltrack (mlib_track * track);
85
mlib_desc *mlib_open (char *path);
86
void mlib_close (mlib_desc * desc);
87
char *mlib_errmsg (void);