working build again, midi_writer.cpp is still crap if file writing is
enabled