Write patterns to Midi file - SMPTE error