Library for playing MIDI files from the Arduino

WARNING:

void MIDIFile::setMicrosecondPerQuarterNote(uint32_t m)
// This is the value given in the META message setting tempo
{
	uint32_t	x;

	_microsecondDelta = m / _ticksPerQuarterNote;

	// work out the tempo from the delta by reversing the calcs in calcMicrosecondsDelta
	// m is alreay per quarter note
	_tempo = (60 * 1000000L) / m;
}

x not used

BUG:

bool MIDIFile::isEOF(void)
{
	bool eof = true;

	for (int i=0; i<_trackCount; i++)
		eof &= _track[i].getEndOfTrack();	// all must be true for eof to be true

	return(eof);
}

is syntactically wrong as you should use the boolean && not the bitwise & (it just works because all trues seem to be 1)

and it can be faster

bool MIDIFile::isEOF(void)
{
	for (int i=0; i<_trackCount; i++)
	{
		if (! _track[i].getEndOfTrack() ) return false;  // breaks at first false
	}
	return true;
}

Generic:
many loops use int i; you could check if uint8_t is enough ?