29 lines
618 B
C++
29 lines
618 B
C++
#include <guitar/FrettedNotes.hpp>
|
|
#include <midiseq/midiout.hpp>
|
|
|
|
bool FrettedNotes::play(MIDIOutputDevice &midiDevice)
|
|
{
|
|
String strNotes;
|
|
if(!midiDevice.hasDevice())return false;
|
|
|
|
// ::OutputDebugString(String(toString()+String("\n")).str());
|
|
for(int index=0;index<size();index++)
|
|
{
|
|
FrettedNote &frettedNote=operator[](index);
|
|
frettedNote.noteOn(midiDevice);
|
|
}
|
|
delay();
|
|
return true;
|
|
}
|
|
|
|
String FrettedNotes::toString(void)const
|
|
{
|
|
String str;
|
|
for(int index=0;index<size();index++)
|
|
{
|
|
str+=((Block<FrettedNote>&)*this).operator[](index).toString();
|
|
if(index<size()-1)str+=",";
|
|
}
|
|
return str;
|
|
}
|