[PD] recording and writing a MIDI File