Filedata


The Filedata class provides a way to read in and store MIDI data from a standard MIDI file.

class Filedata {
public:
  typedef UtilArray<MidiMsg> MidiMsgArray;
  typedef UtilPtr<MidiMsgArray> MidiMsgArrayPtr;
  Filedata(const char*, void (*func)(const char*));
  ~Filedata();
  printToFile(const char*) const;
  MidiMsgArrayPtr getTrack(int) const;
  int2 getFormat() const;
  int2 getNumTracks() const;
  int2 getDivision() const;
};
Filedata(const char* x, void (*func)(const char*))
The constructor creates a Filedata object which contains the data named in the MIDI file named x. If the filereader wishes to print out any warnings about possible problems with the contents of the file, it calls func with its message.
~Filedata()
The destructor destroys the Filedata object.
printToFile(const char* f)
This member function prints a textual representation of the MIDI file to the file named f. This is mostly useful for debugging.
MidiMsgArrayPtr getTrack(int t)
This member function returns track t as an array of MidiMsgs.
int2 getFormat()
This member function returns the format of the MIDI file.
int2 getNumTracks()
This member function returns the number of tracks in the MIDI file.
int2 getDivision()
This member function returns the division of the MIDI file.

Modified 17 January 1996 pepellet@mit.edu