midi2csv yourFile | sed 's/some regex with note_on 0/result with note_off/' | csv2midi.exe resultfile