
typedef struct {
  int tempo;
  int ppqn;
} MidiTimeBase;  

typedef struct midievent {
  unsigned char msg[4];
  long stamp;
  int msglen;
  struct midievent * next;
  unsigned int seqevent;
  unsigned char * seqdata;
  int seqdatalen;
} MidiEvent;

typedef struct {
  int enabled;
  int portnum;
  char * trackname;
  char * instrumentname;
  MidiEvent cur;
  MidiEvent * evlist;
} MidiTrack;

typedef struct {
  char * filename;
  char * sequencename;
  MidiTimeBase timebase;
  MidiTrack track[256]; 
  int numtracks;
} MidiSequence;



