Is there a way to read a midiFile directly into a midiBuffer, and not have to deal with midiSequences? I am assuming that would be more efficient, and I could use the buffer iterator to tie midi events from a file and play them the same way I currently do with a midiSequence.
My concern is that loading to a sequence is very slow. For a 3 minute midi file with 11 tracks, the following code takes about 20 seconds:
[code]for (short i=0; i < midiToPlay->getNumTracks() ; i++)
Logger::outputDebugString(“loading track …” + String(i));
mySequence.addSequence(*midiToPlay->getTrack(i), 0, // time adjust 0, // first allowable time double( lastTime/4 )); // last allowable time }[/code]