Simplified some code in MidiFile.play().