A Midi sequence that represent a midi file. More...
Public Member Functions | |
int | findAt (int trackIndex, int songPosition) |
return the index of the first event not less than songPosition, nil otherwise. More... | |
int | findNextAt (int trackIndex, int songPosition) |
return the index of the first event greater than songPosition, nil otherwise. More... | |
int | findPreviousAt (int trackIndex, int songPosition) |
return the index of the whose position is just before songPosition, nil otherwise. More... | |
MidiEvent & | getEvent (int trackIndex, int eventIndex) |
get a MidiEvent More... | |
int | getNumEventsForTrack (int trackIndex) |
return the number of events in the track. More... | |
Public Attributes | |
int | division |
time division: number of ticks per beat | |
int | format |
midi format type (0|1|2) | |
int | numTracks |
number of midi Tracks | |
A Midi sequence that represent a midi file.
a Midi Sequence is a collection of tracks containing MidiEvents.
int MidiSequence::getNumEventsForTrack | ( | int | trackIndex) |
return the number of events in the track.
trackIndex | index of the track (start at 1 and less or equal to numTracks) |
MidiEvent& MidiSequence::getEvent | ( | int | trackIndex, |
int | eventIndex | ||
) |
get a MidiEvent
trackIndex | index of the track (start at 1 and less or equal to numTracks) |
eventIndex | index of the track (start at 1 and less or equal to getNumEventsForTrack(trackIndex)) |
int MidiSequence::findAt | ( | int | trackIndex, |
int | songPosition | ||
) |
return the index of the first event not less than songPosition, nil otherwise.
trackIndex | index of the track (start at 1 and less or equal to numTracks) |
songPosition | song position in ticks |
int MidiSequence::findNextAt | ( | int | trackIndex, |
int | songPosition | ||
) |
return the index of the first event greater than songPosition, nil otherwise.
trackIndex | index of the track (start at 1 and less or equal to numTracks) |
songPosition | song position in ticks |
int MidiSequence::findPreviousAt | ( | int | trackIndex, |
int | songPosition | ||
) |
return the index of the whose position is just before songPosition, nil otherwise.
trackIndex | index of the track (start at 1 and less or equal to numTracks) |
songPosition | song position in ticks |