MidiFile class public functions

MidiFile
~MidiFile
absoluteTime
addTrack
deleteTrack
deltaTime
erase
getEvent
getNumEvents
getNumTracks
getTicksPerQuarterNote
getTimeState
getTrackCount
getTrackState
joinTracks
mergeTracks
read
sortTrack
sortTracks
splitTracks
write

MidiFile(void);
No description available.

MidiFile(char* aFile);
No description available.

~MidiFile();
No description available.

void absoluteTime(void);
Convert the time data to absolute time, which means that the time field in the _MFEvent struct represents the exact tick time to play the event rather than the time since the last event to wait untill playing the current event.

int addTrack(void);
Adds a blank track at end of the track list. Returns the track number of the added track.

void deltaTime(void);
convert the time data to delta time, which means that the time field in the _MFEvent struct represents the time since the last event was played. When a MIDI file is read from a file, this is the default setting.

void deleteTrack(int aTrack);
Removes a track from the MidiFile. Tracks are numbered starting at track 0.

void erase(void);
make the MIDI file empty with one track with no data in it.

_MFEvent& getEvent(int aTrack, int anIndex);
Return the associated event.

int getTimeState(void);
Returns what type of time method is being used: either TIME_STATE_ABSOLUTE or TIME_STATE_DELTA.

int getTrackState(void);
Returns what type of track method is being used: either TRACK_STATE_JOINED or TRACK_STATE_SPLIT.

int getTicksPerQuarterNote(void);
Returns the number of time units that are supposed to occur during a quarternote.

int getTrackCount(void);
Returns the number of tracks in the Midi File.

int getNumTracks(void);
No description available.

int getNumEvents(int aTrack);
Returns the number of events in a given track.

void joinTracks(void);
Merge the data from all tracks, but keeping the identity of the tracks unique so that the function splitTracks can be called to split the tracks into separate units again. The style of the MidiFile when read from a file is with tracks split.

void mergeTracks(int aTrack1, int aTrack2);
combine the data from two tracks into one. Placing the data in the first track location listed, and Moving the other tracks in the file around to fill in the spot where Track2 used to be. The results of this function call cannot be reversed.

int read(char* aFile);
Read a MIDI file and store its contents.

void sortTrack(Collection<_MFEvent>& trackData);
No description available.

void sortTracks(void);
Sorts all tracks in the MidiFile.

void splitTracks(void);
Takes the joined tracks and split them back into their separate track identities.

int write(char* aFile);
Write a standard MIDI file from data.