[PD] Writing and reading midi files