|
|
Stores a MIDI track. This can be thought of as a list of MIDI events.
The data types used to store the track is similar to how events are stored on a MIDI file, but used in a way that allows for faster parses.
This class is used on MidiPlayer::loadSong() to load the song and later play it with MidiPlayer::play().
|
Constructor.
Parameters:
file | the file to read the track from. It should be ready at the start of a track. MidiTrack reads just that track and the file is left at the end of this track). |
tpcn | the ticks per cuarter note used in this file. |
Id | the ID for this track. |
~ |
Destructor
int |
Makes the iterator advance the given number of ticks.
Returns: 0 if OK, and 1 if you didn't handle this track well and you forgot to take an event (thing that will never happen if you use MidiPlayer::play() ).
int |
Makes the iterator advance the given number of milliseconds.
Returns: 0 if OK, and 1 if you didn't handle this track well and you forgot to take an event (thing that will never happen if you use MidiPlayer::play() ).
int |
Returns the current millisecond which the iterator is at.
ulong |
Returns the number of ticks left for the next event.
double |
Returns the absolute number of milliseconds of the next event.
void |
Change the tempo of the song.
void |
Reads the event at the iterator position, and puts it on the structure
pointed to by ev
.
void |
Initializes the iterator.
void |
Clears the internal variables.