struct MidiOut {
  FILE *midi_f;
  int data_size,
      cur_time,
      seek_setsize,
      cur_track, // current track nr
      new_chan,  // channel nr, start at 0, skip 9
      us_per_beat;
  bool init_ok,
       chan_warn; // channel > 16?
  int col_gr2chan[inst_max],
      instr_mapping[inst_max];  // actual mapping
  void make_midi();  // in bigband.cpp
  bool init(const char*,int subd,int us_pb);
  void init2(int nr_tracks);
  void write_track1();
  void init_track(int tracknr,int col);
  void init_perc_track(int tracknr);
  void close_track();
  void close();
  void note_onoff(bool start,int col,int midi_instr,bool sampled,int tim,int nr,int ampl);
  int get_chan(bool sampled,int ind);
};

extern MidiOut midi_out;
extern int col2pan[inst_max];
