#include #include #include #include #include bool Notes::remove(const Note ¬e) { int count=0; for(int index=0;index::remove(index); index=-1; count++; continue; } } return count?true:false; } void Notes::sort(void) { QuickSort sorter; sorter.sortItems(*this); } void Notes::off(MIDIOutputDevice &device)const { for(int index=0;index&)*this).operator[](index).noteOff(device); } } bool Notes::play(MIDIOutputDevice &device,int interNoteDelay,bool noteOffAfterPlay)const { if(!device.hasDevice())return false; for(int index=0;index&)*this).operator[](index).noteOn(device); ::Sleep(interNoteDelay); if(noteOffAfterPlay)((Block&)*this).operator[](index).noteOff(device); } return true; } bool Notes::playBack(MIDIOutputDevice &device,bool noteOffAfterPlay)const { if(!device.hasDevice())return false; for(int index=size()-1;index>=0;index--) { ((Block&)*this).operator[](index).noteOn(device); ::Sleep(getDelay()/1); if(noteOffAfterPlay)((Block&)*this).operator[](index).noteOff(device); } return true; } String Notes::toString(void)const { String str; for(int index=0;index