It should be noted that midi sequences store a bunch of tracks. Each track contains a collection of CMidiEvents. In this case the delta time for each event is a sample from a notional
zero position, that is essentially the start of the song.
Documented online at http://www.borg.com/~jglatt/tech/midifile.htm
Definition at line 46 of file CMidiSequence.hpp.
Exponent::Midi::CMidiSequence::CMidiSequence | ( | const double | sampleRate | ) |
Construction
sampleRate | The sample rate that we are playing back at |
virtual Exponent::Midi::CMidiSequence::~CMidiSequence | ( | ) | [virtual] |
Destruction
void Exponent::Midi::CMidiSequence::addTrack | ( | CMidiTrack * | track | ) |
Add a track
track | The midi event track |
void Exponent::Midi::CMidiSequence::compact | ( | ) |
Compact The list. Remove any dead tracks and then removes unused memory portions
CMidiTrack* Exponent::Midi::CMidiSequence::getMutableTrackAtIndex | ( | const long | index | ) |
Get the mutable track at index
index | The index of the track you desire, must be >= 0 && < getNumberOfTracks |
CMidiTrack* | The midi track or null on erorr |
long Exponent::Midi::CMidiSequence::getNumberOfTracks | ( | ) | const [inline] |
Get the number of tracks
long | The total number of tracks |
Definition at line 119 of file CMidiSequence.hpp.
References m_tracks.
double Exponent::Midi::CMidiSequence::getSampleRate | ( | ) | const [inline] |
Get the sample rate
double | The sample rate |
Definition at line 101 of file CMidiSequence.hpp.
References m_sampleRate.
double Exponent::Midi::CMidiSequence::getTempo | ( | ) | const [inline] |
Get the tempo
double | The tempo |
Definition at line 107 of file CMidiSequence.hpp.
References m_tempo.
const CTimeSignature& Exponent::Midi::CMidiSequence::getTimeSignature | ( | ) | const [inline] |
Get the time signature
const | CTimeSignature& The time signature |
Definition at line 113 of file CMidiSequence.hpp.
References m_timeSignature.
const CMidiTrack* Exponent::Midi::CMidiSequence::getTrackAtIndex | ( | const long | index | ) | const |
Get track at index
index | The index of the track you desire, must be >= 0 && < getNumberOfTracks |
const | CMidiTrack* The midi track or null on erorr |
void Exponent::Midi::CMidiSequence::setSampleRate | ( | const double | sampleRate | ) |
Set the sample rate. Note that this will cause the recomputation of all the events, which may take a long time. Be sure that you have got the time to perform this operation before you do it
sampleRate | The new sample rate |
void Exponent::Midi::CMidiSequence::setTempo | ( | const double | tempo | ) |
Set the tempo
tempo | The tempo in bpm |
void Exponent::Midi::CMidiSequence::setTimeSignature | ( | const CTimeSignature & | timeSignature | ) |
Set the time signature
timeSignature | The time signature |
double Exponent::Midi::CMidiSequence::m_sampleRate [protected] |
SAmple rate of the system
Definition at line 151 of file CMidiSequence.hpp.
Referenced by getSampleRate().
double Exponent::Midi::CMidiSequence::m_tempo [protected] |
BPM of the midi sequence
Definition at line 149 of file CMidiSequence.hpp.
Referenced by getTempo().
The time signature
Definition at line 150 of file CMidiSequence.hpp.
Referenced by getTimeSignature().
Tracks that we are dealing with
Definition at line 148 of file CMidiSequence.hpp.
Referenced by getNumberOfTracks().