MidiTrack Class Reference
Stores a MIDI track. Stores a MIDI track with a simple API. More...
#include <track.h>
Public Member Functions | |
MidiTrack (FILE *file, int tpcn, int Id) | |
Constructor. | |
~MidiTrack () | |
Destructor. | |
int | ticksPassed (ulong ticks) |
Makes the iterator advance the given number of ticks. | |
int | msPassed (ulong ms) |
Makes the iterator advance the given number of milliseconds. | |
int | currentMs (double ms) |
Returns the current millisecond which the iterator is at. | |
ulong | waitTicks (void) |
Returns the number of ticks left for the next event. | |
double | absMsOfNextEvent (void) |
Returns the absolute number of milliseconds of the next event. | |
void | changeTempo (ulong t) |
Change the tempo of the song. | |
void | readEvent (MidiEvent *ev) |
Reads the event at the iterator position, and puts it on the structure pointed to by ev . | |
void | init (void) |
Initializes the iterator. | |
void | clear (void) |
Clears the internal variables. |
Detailed Description
Stores a MIDI track. Stores a MIDI track with a simple API.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().
- Version:
- 0.9.5 17/01/2000
- Author:
- Antonio Larrosa Jimenez <larrosa@kde.org>
Definition at line 126 of file track.h.
Constructor & Destructor Documentation
|
Constructor.
|
|
Destructor.
|
Member Function Documentation
|
Makes the iterator advance the given number of ticks.
|
|
Makes the iterator advance the given number of milliseconds.
|
|
Returns the current millisecond which the iterator is at.
Definition at line 174 of file track.cc. Referenced by MidiPlayer::play(), and MidiPlayer::setPos(). |
|
Returns the number of ticks left for the next event.
|
|
Returns the absolute number of milliseconds of the next event.
Definition at line 212 of file track.h. Referenced by MidiPlayer::play(), and MidiPlayer::setPos(). |
|
Change the tempo of the song.
Definition at line 544 of file track.cc. Referenced by MidiPlayer::play(), and MidiPlayer::setPos(). |
|
Reads the event at the iterator position, and puts it on the structure pointed to by
Definition at line 190 of file track.cc. References MidiEvent::chn, MidiEvent::command, MidiEvent::ctl, MidiEvent::d1, MidiEvent::d2, MidiEvent::d3, MidiEvent::d4, MidiEvent::d5, MidiEvent::data, MidiEvent::length, MidiEvent::note, MidiEvent::patch, and MidiEvent::vel. Referenced by MidiPlayer::play(), and MidiPlayer::setPos(). |
|
Initializes the iterator.
Definition at line 519 of file track.cc. References clear(). Referenced by MidiTrack(), MidiPlayer::play(), and MidiPlayer::setPos(). |
|
Clears the internal variables.
Definition at line 498 of file track.cc. Referenced by init(), and MidiTrack(). |
The documentation for this class was generated from the following files: