#ifndef _MUSIC_NOTES_HPP_ #define _MUSIC_NOTES_HPP_ #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _MUSIC_NOTE_HPP_ #include #endif class MIDIOutputDevice; class Notes : public Block { public: enum {DefaultDelay=150}; Notes(); virtual ~Notes(); void off(MIDIOutputDevice &device)const; bool play(MIDIOutputDevice &device,int interNoteDelay=DefaultDelay,bool noteOffAfterPlay=true)const; bool playBack(MIDIOutputDevice &device,bool noteOffAfterPlay=true)const; String toString(void)const; void sort(void); void pause(int msecs=DefaultDelay*2); DWORD size(void)const; void size(DWORD size); bool remove(const Note ¬e); void remove(void); protected: virtual int getDelay()const; private: }; inline Notes::Notes() { } inline Notes::~Notes() { } inline void Notes::pause(int msecs) { ::Sleep(msecs); } inline DWORD Notes::size(void)const { return Block::size(); } inline void Notes::size(DWORD size) { Block::remove(); for(int index=0;index::remove(); } #endif