moves midi template code to midi file