Simplified something in midifiles.py.