I'm trying to read a polyphonic MIDI file (using "seq"), parse it (using "midiparse") and simultaneously write the data to a text file (using "textfile"). There seems to be a mistake in the way I'm using textfile but I cannot figure out what it is. I'm using the first method from a tutorial patch "using-textfile_pt3" that Maelstorm had shared on the forums but it isn't working in my case.

In the attached patch, I read the MIDI file with the first input to the patch "loadMIDIfile" and then (try to) write it to a file while playing it back really fast, using the second bang. It would be great if someone could also suggest a better way of doing this.

I also attached an example MIDI file.

Thanks a lot!