Just Intonation
Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
|
Class managing the EventList in the MidiPlayer. More...
#include <midiplayereventlist.h>
Public Member Functions | |
MidiPlayerEventList () | |
Constructor, resetting member variables. More... | |
void | clear () |
Clear the event list (clear all Midi data). More... | |
void | insert (double time, const MidiPlayerEvent &event) |
Insert a new event in the time-ordered list of events. More... | |
void | rewind () |
Rewind: Move the iterator back to the beginning of the Midi song. More... | |
void | advance () |
Advance iterator in the list of events. More... | |
bool | atEnd () const |
Predicate, telling us whether we are already at the end of the list. More... | |
const MidiPlayerEvent | getEvent () const |
Return a copy of the actual event (zero event if iterator is at the end of the list). More... | |
quint32 | getCumulativeTime () const |
Return time of actual event (zero if iterator is at the end of the list). More... | |
int | getSize () const |
Get actual list size. More... | |
double | getProgressInPercent () const |
Get the playing progress in percent. More... | |
void | setProgress (double percent) |
Set the EventList iterator according to a given progress in percent. More... | |
void | writeListInReadableForm (QString filename) |
Write content of the list to file in a readable form (for debugging). More... | |
Private Types | |
typedef QMultiMap< double, MidiPlayerEvent > | MidiEventList |
Private Attributes | |
MidiEventList | mEventList |
Instance of the event list. More... | |
quint32 | mMaxTime |
Maximum time at the end of the list. More... | |
MidiEventList::Iterator | pEventIterator |
Iterator playing the notes. More... | |
QMutex | mAccessMutex |
Mutex for access. More... | |
Class managing the EventList in the MidiPlayer.
This class holds a time-ordered list of Midi events for playing. The access is channeled through public functions in order to guarantee thread-safety. The class also provides an iterator (cursor) that can be advanded and controlled. This iterator is used for the actual playing process.
Definition at line 65 of file midiplayereventlist.h.
|
private |
Definition at line 85 of file midiplayereventlist.h.
MidiPlayerEventList::MidiPlayerEventList | ( | ) |
Constructor, resetting member variables.
Definition at line 63 of file midiplayereventlist.cpp.
void MidiPlayerEventList::advance | ( | ) |
Advance iterator in the list of events.
This function simply advances the iterator in the list by one step. It is called repeatedly while the player is playing.
Definition at line 129 of file midiplayereventlist.cpp.
bool MidiPlayerEventList::atEnd | ( | ) | const |
Predicate, telling us whether we are already at the end of the list.
Definition at line 145 of file midiplayereventlist.cpp.
void MidiPlayerEventList::clear | ( | ) |
Clear the event list (clear all Midi data).
Definition at line 79 of file midiplayereventlist.cpp.
quint32 MidiPlayerEventList::getCumulativeTime | ( | ) | const |
Return time of actual event (zero if iterator is at the end of the list).
Definition at line 180 of file midiplayereventlist.cpp.
const MidiPlayerEvent MidiPlayerEventList::getEvent | ( | ) | const |
Return a copy of the actual event (zero event if iterator is at the end of the list).
Definition at line 162 of file midiplayereventlist.cpp.
double MidiPlayerEventList::getProgressInPercent | ( | ) | const |
Get the playing progress in percent.
Definition at line 213 of file midiplayereventlist.cpp.
int MidiPlayerEventList::getSize | ( | ) | const |
Get actual list size.
Definition at line 197 of file midiplayereventlist.cpp.
void MidiPlayerEventList::insert | ( | double | time, |
const MidiPlayerEvent & | event | ||
) |
Insert a new event in the time-ordered list of events.
time | : Integer time in ticks used for time-ordering. |
event | : New event to be inserted. |
Definition at line 96 of file midiplayereventlist.cpp.
void MidiPlayerEventList::rewind | ( | ) |
Rewind: Move the iterator back to the beginning of the Midi song.
Definition at line 112 of file midiplayereventlist.cpp.
void MidiPlayerEventList::setProgress | ( | double | percent | ) |
Set the EventList iterator according to a given progress in percent.
percent | : Temporal progress in percent. |
Definition at line 232 of file midiplayereventlist.cpp.
void MidiPlayerEventList::writeListInReadableForm | ( | QString | filename | ) |
Write content of the list to file in a readable form (for debugging).
filename | : Name of the file |
Definition at line 252 of file midiplayereventlist.cpp.
|
mutableprivate |
Mutex for access.
Definition at line 90 of file midiplayereventlist.h.
|
private |
Instance of the event list.
Definition at line 87 of file midiplayereventlist.h.
|
private |
Maximum time at the end of the list.
Definition at line 88 of file midiplayereventlist.h.
|
private |
Iterator playing the notes.
Definition at line 89 of file midiplayereventlist.h.