Filedata


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

class Filedata {
public:
  Filedata(const char*, err_and_warn*);
  printToFile(const char*) const;
  MidiMsgArrayPtr getTrack(int) const;
  int2 getFormat() const;
  int2 getNumTracks() const;
  int2 getDivision() const;
};
Filedata(const char* x, err_and_warn *ewp)
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 does so via ewp.
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.