svcore  1.9
MIDIEvent Class Reference

#include <MIDIEvent.h>

Collaboration diagram for MIDIEvent:

Public Member Functions

 MIDIEvent (unsigned long deltaTime, MIDIByte eventCode, MIDIByte data1=0, MIDIByte data2=0)
 
 MIDIEvent (unsigned long deltaTime, MIDIByte eventCode, MIDIByte metaEventCode, const std::string &metaMessage)
 
 MIDIEvent (unsigned long deltaTime, MIDIByte eventCode, const std::string &sysEx)
 
 ~MIDIEvent ()
 
void setTime (const unsigned long &time)
 
void setDuration (const unsigned long &duration)
 
unsigned long addTime (const unsigned long &time)
 
MIDIByte getMessageType () const
 
MIDIByte getChannelNumber () const
 
unsigned long getTime () const
 
unsigned long getDuration () const
 
MIDIByte getPitch () const
 
MIDIByte getVelocity () const
 
MIDIByte getData1 () const
 
MIDIByte getData2 () const
 
MIDIByte getEventCode () const
 
bool isMeta () const
 
MIDIByte getMetaEventCode () const
 
std::string getMetaMessage () const
 
void setMetaMessage (const std::string &meta)
 

Private Member Functions

MIDIEventoperator= (const MIDIEvent)
 

Private Attributes

unsigned long m_deltaTime
 
unsigned long m_duration
 
MIDIByte m_eventCode
 
MIDIByte m_data1
 
MIDIByte m_data2
 
MIDIByte m_metaEventCode
 
std::string m_metaMessage
 

Friends

bool operator< (const MIDIEvent &a, const MIDIEvent &b)
 

Detailed Description

Definition at line 117 of file MIDIEvent.h.

Constructor & Destructor Documentation

◆ MIDIEvent() [1/3]

MIDIEvent::MIDIEvent ( unsigned long  deltaTime,
MIDIByte  eventCode,
MIDIByte  data1 = 0,
MIDIByte  data2 = 0 
)
inline

Definition at line 120 of file MIDIEvent.h.

◆ MIDIEvent() [2/3]

MIDIEvent::MIDIEvent ( unsigned long  deltaTime,
MIDIByte  eventCode,
MIDIByte  metaEventCode,
const std::string &  metaMessage 
)
inline

Definition at line 132 of file MIDIEvent.h.

◆ MIDIEvent() [3/3]

MIDIEvent::MIDIEvent ( unsigned long  deltaTime,
MIDIByte  eventCode,
const std::string &  sysEx 
)
inline

Definition at line 145 of file MIDIEvent.h.

◆ ~MIDIEvent()

MIDIEvent::~MIDIEvent ( )
inline

Definition at line 157 of file MIDIEvent.h.

Member Function Documentation

◆ setTime()

void MIDIEvent::setTime ( const unsigned long &  time)
inline

Definition at line 159 of file MIDIEvent.h.

References m_deltaTime.

◆ setDuration()

void MIDIEvent::setDuration ( const unsigned long &  duration)
inline

Definition at line 160 of file MIDIEvent.h.

References m_duration.

◆ addTime()

unsigned long MIDIEvent::addTime ( const unsigned long &  time)
inline

Definition at line 161 of file MIDIEvent.h.

References m_deltaTime.

◆ getMessageType()

MIDIByte MIDIEvent::getMessageType ( ) const
inline

Definition at line 166 of file MIDIEvent.h.

References m_eventCode, and MIDIConstants::MIDI_MESSAGE_TYPE_MASK.

◆ getChannelNumber()

MIDIByte MIDIEvent::getChannelNumber ( ) const
inline

Definition at line 169 of file MIDIEvent.h.

References m_eventCode, and MIDIConstants::MIDI_CHANNEL_NUM_MASK.

Referenced by MIDIFileReader::parseTrack().

◆ getTime()

unsigned long MIDIEvent::getTime ( ) const
inline

Definition at line 172 of file MIDIEvent.h.

References m_deltaTime.

Referenced by MIDIEventCmp::operator()().

◆ getDuration()

unsigned long MIDIEvent::getDuration ( ) const
inline

Definition at line 173 of file MIDIEvent.h.

References m_duration.

◆ getPitch()

MIDIByte MIDIEvent::getPitch ( ) const
inline

Definition at line 175 of file MIDIEvent.h.

References m_data1.

◆ getVelocity()

MIDIByte MIDIEvent::getVelocity ( ) const
inline

Definition at line 176 of file MIDIEvent.h.

References m_data2.

◆ getData1()

MIDIByte MIDIEvent::getData1 ( ) const
inline

Definition at line 177 of file MIDIEvent.h.

References m_data1.

◆ getData2()

MIDIByte MIDIEvent::getData2 ( ) const
inline

Definition at line 178 of file MIDIEvent.h.

References m_data2.

◆ getEventCode()

MIDIByte MIDIEvent::getEventCode ( ) const
inline

Definition at line 179 of file MIDIEvent.h.

References m_eventCode.

◆ isMeta()

bool MIDIEvent::isMeta ( ) const
inline

Definition at line 181 of file MIDIEvent.h.

References m_eventCode, and MIDIConstants::MIDI_FILE_META_EVENT.

◆ getMetaEventCode()

MIDIByte MIDIEvent::getMetaEventCode ( ) const
inline

Definition at line 183 of file MIDIEvent.h.

References m_metaEventCode.

◆ getMetaMessage()

std::string MIDIEvent::getMetaMessage ( ) const
inline

Definition at line 184 of file MIDIEvent.h.

References m_metaMessage.

◆ setMetaMessage()

void MIDIEvent::setMetaMessage ( const std::string &  meta)
inline

Definition at line 185 of file MIDIEvent.h.

References m_metaMessage.

◆ operator=()

MIDIEvent& MIDIEvent::operator= ( const  MIDIEvent)
private

Friends And Related Function Documentation

◆ operator<

bool operator< ( const MIDIEvent a,
const MIDIEvent b 
)
friend

Member Data Documentation

◆ m_deltaTime

unsigned long MIDIEvent::m_deltaTime
private

Definition at line 192 of file MIDIEvent.h.

Referenced by addTime(), getTime(), and setTime().

◆ m_duration

unsigned long MIDIEvent::m_duration
private

Definition at line 193 of file MIDIEvent.h.

Referenced by getDuration(), and setDuration().

◆ m_eventCode

MIDIByte MIDIEvent::m_eventCode
private

Definition at line 194 of file MIDIEvent.h.

Referenced by getChannelNumber(), getEventCode(), getMessageType(), and isMeta().

◆ m_data1

MIDIByte MIDIEvent::m_data1
private

Definition at line 195 of file MIDIEvent.h.

Referenced by getData1(), and getPitch().

◆ m_data2

MIDIByte MIDIEvent::m_data2
private

Definition at line 196 of file MIDIEvent.h.

Referenced by getData2(), and getVelocity().

◆ m_metaEventCode

MIDIByte MIDIEvent::m_metaEventCode
private

Definition at line 197 of file MIDIEvent.h.

Referenced by getMetaEventCode().

◆ m_metaMessage

std::string MIDIEvent::m_metaMessage
private

Definition at line 198 of file MIDIEvent.h.

Referenced by getMetaMessage(), and setMetaMessage().


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