Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::sound::base::MIDIEvent Class Reference

A class that represents a single MIDI message that occurred at an absolute moment in time. More...

#include <omSoundMIDIEvent.h>

Public Member Functions

 MIDIEvent ()
 Create a default MIDI event with an undefined message and time. More...
 
 MIDIEvent (const MIDIMessage &newMessage)
 Create a MIDI event for the specified message. More...
 
 MIDIEvent (const MIDIMessage &newMessage, const Time &newTime)
 Create a MIDI event for the specified message at the specified time. More...
 
const MIDIMessagegetMessage () const
 Return a reference to the MIDI message associated with this event. More...
 
void setMessage (const MIDIMessage &newMessage)
 Set the MIDI message that is associated with this event. More...
 
const TimegetTime () const
 Return the relative time at which this MIDI event occurred. More...
 
void setTime (const Time &newTime)
 Set the absolute time at which this MIDI event occurred. More...
 

Detailed Description

A class that represents a single MIDI message that occurred at an absolute moment in time.

This class consists of a MIDIMessage object and a relative time at which that event occurs.

Constructor & Destructor Documentation

om::sound::base::MIDIEvent::MIDIEvent ( )
inline

Create a default MIDI event with an undefined message and time.

om::sound::base::MIDIEvent::MIDIEvent ( const MIDIMessage newMessage)
inline

Create a MIDI event for the specified message.

The time for the event is default-initialized to be 0, indicating it coincided with the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

om::sound::base::MIDIEvent::MIDIEvent ( const MIDIMessage newMessage,
const Time newTime 
)
inline

Create a MIDI event for the specified message at the specified time.

This time is measured relative to the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

Member Function Documentation

const MIDIMessage& om::sound::base::MIDIEvent::getMessage ( ) const
inline

Return a reference to the MIDI message associated with this event.

void om::sound::base::MIDIEvent::setMessage ( const MIDIMessage newMessage)
inline

Set the MIDI message that is associated with this event.

const Time& om::sound::base::MIDIEvent::getTime ( ) const
inline

Return the relative time at which this MIDI event occurred.

This time is measured relative to some reference time. For absolute-time MIDI events (real-time), the reference time is the Epoch, 1970-01-01 00:00:00 +0000 (UTC). For other events, such as those that are part of a SoundFrame, the time is specified relative to the frame's time.

void om::sound::base::MIDIEvent::setTime ( const Time newTime)
inline

Set the absolute time at which this MIDI event occurred.

This time is measured relative to some reference time. For absolute-time MIDI events (real-time), the reference time is the Epoch, 1970-01-01 00:00:00 +0000 (UTC). For other events, such as those that are part of a SoundFrame, the time is specified relative to the frame's time.


The documentation for this class was generated from the following file: