About two years back, someone asked me if I could write a script in Lua to read MIDI files and convert MIDI CC tracks into SynthesizerV timelines.

I didn't find any existing code that read MIDI files in Lua, so I went searching for C files. Back in Ye Olden Days the programs MIDI2TXT and TXT2MIDI could be used to convert MIDI files to text, which allowed them to be edited, and then converted back again.

However... it didn't handle some of the MIDI events. I think it was that SYSEX could be 0xF0 or 0xF7, but I don't remember exactly.

I ended up writing the script from scratch looking at the MIDI specs. Mind you, this was only the MIDI file reader, as I didn't need to write it back to a MIDI file after loading it. It's less than 350 lines long - really simple code.

So if you want a Lua program that dumps a MIDI file to text, you're welcome to it.


-- David Cuny
My virtual singer development blog

Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?