00001 #ifndef __CMidiEventList__ 00002 #define __CMidiEventList__ 00003 00004 // =========================================================================== 00005 00006 #include "CMidiEvent.hpp" 00007 using Exponent::Midi::CMidiEvent; 00008 using Exponent::Basics::CCountedObject; 00009 00010 // =========================================================================== 00011 00012 namespace Exponent 00013 { 00014 namespace Midi 00015 { 00046 class CMidiEventList : public CCountedObject 00047 { 00049 EXPONENT_CLASS_DECLARATION; 00052 // =========================================================================== 00053 00054 public: 00055 00056 // =========================================================================== 00057 00058 const static long CMIDI_EVENT_LIST_MAX_EVENTS = 128; 00060 // =========================================================================== 00061 00065 CMidiEventList(); 00066 00070 virtual ~CMidiEventList(); 00071 00072 // =========================================================================== 00073 00079 const CMidiEvent *getEventAtIndex(const long index) const; 00080 00085 long getTimeDeltaDifference() const; 00086 00087 // =========================================================================== 00088 00093 void setMidiChannel(const long midiChannel) { m_midiChannel = midiChannel; } 00094 00099 long getMidiChannel() const { return m_midiChannel; } 00100 00105 long getNumberOfEvents() { return m_numberOfEvents; } 00106 00107 // =========================================================================== 00108 00113 const CMidiEvent *getNextEvent() const; 00114 00118 void moveToNextEvent(); 00119 00124 bool moreEvents() const; 00125 00129 void clearEvents(); 00130 00131 // =========================================================================== 00132 00138 virtual void getObjectDescription(char *string, const long size) const; 00139 00140 // =========================================================================== 00141 00142 protected: 00143 00144 // =========================================================================== 00145 00146 CMidiEvent m_list[CMIDI_EVENT_LIST_MAX_EVENTS]; 00147 long m_midiChannel; 00148 long m_numberOfEvents; 00149 long m_currentEvent; 00151 }; 00152 } 00153 } 00154 #endif // End of CMidiEventList.hpp