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(char*);
  ~Filedata();
  printToFile(char*) const;
  MidiMsgArrayPtr getTrack(int) const;
  int2 getFormat() const;
  int2 getNumTracks() const;
  int2 getDivision() const;
};
Filedata(char* x)
The constructor creates a Filedata object which contains the data named in the MIDI file named x.
~Filedata()
The destructor destroys the Filedata object.
printToFile(char* f)
This memeber 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 memeber function returns track t as an array of MidiMsgs.
int2 getFormat()
This member function returns the format of the MIDI file.
int2 getNumTracks()
This memeber function returns the number of tracks in the MIDI file.
int2 getDivision()
This member function returns the division of the MIDI file.

Modified 23 October 1995 pepellet@mit.edu