Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a sequence of MIDI events. More...
#include <omSoundMIDIBuffer.h>
Public Member Functions | |
MIDIBuffer () | |
Create an empty MIDI buffer with the default initial capacity. More... | |
~MIDIBuffer () | |
Destroy a MIDI buffer, deallocating its internal array of events. More... | |
MIDIBuffer & | operator= (const MIDIBuffer &other) |
Assign the contents of the specified MIDI buffer to this one. More... | |
Size | getEventCount () const |
Return the total number of valid events that are part of this MIDI buffer. More... | |
MIDIEvent & | getEvent (Index eventIndex) |
Return a reference to the MIDI event at the specified index in this MIDI buffer. More... | |
const MIDIEvent & | getEvent (Index eventIndex) const |
Return a const reference to the MIDI event at the specified index in this MIDI buffer. More... | |
void | addEvent (const MIDIEvent &newEvent) |
Add a new MIDI event to the end of this MIDI buffer. More... | |
void | clearEvents () |
Remove all events from this MIDI buffer. More... | |
const MIDITime & | getTime () const |
Return the musical time within the MIDI sequence for the start of this frame. More... | |
void | setTime (const MIDITime &newTime) |
Set the musical time within the MIDI sequence for the start of this frame. More... | |
void | copyTo (MIDIBuffer &other) const |
Copy the entire contents of this buffer to another MIDI buffer, including the MIDI time. More... | |
A class that represents a sequence of MIDI events.
A MIDI buffer keeps a small local storage space for events which avoids allocating any extra memory when the total number of events in a buffer small (less than a few).
om::sound::base::MIDIBuffer::MIDIBuffer | ( | ) |
Create an empty MIDI buffer with the default initial capacity.
om::sound::base::MIDIBuffer::~MIDIBuffer | ( | ) |
Destroy a MIDI buffer, deallocating its internal array of events.
MIDIBuffer& om::sound::base::MIDIBuffer::operator= | ( | const MIDIBuffer & | other | ) |
Assign the contents of the specified MIDI buffer to this one.
|
inline |
Return the total number of valid events that are part of this MIDI buffer.
|
inline |
|
inline |
Remove all events from this MIDI buffer.
|
inline |
Return the musical time within the MIDI sequence for the start of this frame.
|
inline |
Set the musical time within the MIDI sequence for the start of this frame.
void om::sound::base::MIDIBuffer::copyTo | ( | MIDIBuffer & | other | ) | const |