Batch editing midi files

I bought the ‘Niko’ set of piano midi files ( Niko’s MIDI Pack (New) – Piano For Producers ), and have found about 35 in the 1000+ useful. [Actually, there are not 1000 since it consists of sets in each key]

Anyhow, I found a problem in that Live shows the name of the midi file not from the filename, but from the title in the file itself. Niko then added his name in front of each tile title (instead of in the copyright field… d’oh) and with the other leading blurb that meant that none of the key information showed in the Live clip (the name field is restricted in how wide it can be).

I thus set out to edit the file information and thought it might be useful for any newbies to have note of one easy way of doing this {there are several ways …].

I used two DOS programs, csvmidi.exe and midicsv.exe. You can download them from Github at https://github.com/robbie-cao/midicsv/blob/master/README.
There is also documentation at MIDICSV: Convert MIDI File to and from CSV but I think all you need to know is here.

The key is in the DOS command files.

{1} Set up a command file ‘midi2csv.bat’ with notepad containing

(for %%f in (*.mid) do (
midicsv.exe %%~nf.mid %%~nf.csv )) 2>report.txt

{2} Set up a second file ‘csv2midi.bat’ containing

(for %%f in (*.csv) do (
csvmidi.exe %%~nf.csv %%~nf.mid )) 2>report.txt

{3} Set up a clean folder called ‘csv stage’ and copy the midi files to be bulk edited into there. Copy also midicsv,exe and midi2csv.bat.

{4} Now double click on midi2csv.bat and a DOS window will pop up and then close. Any errors will be shown in report.txt

{5} You can now bulk edit the csv files… Probably the most flexible and best way to do this is with TextConverter from https://www.sttmedia.com/

{5} You can now transform the csv back into mid. Set up a clean directory called ‘midi stage’ and copy just the csv files frim the folder created in {4}

{6} Copy in csv2midi.bat and csvmidi.exe to the folder and execute the batch file. All done !

NOTES : Don’t forget DOS doesn’t like spaces, so you have to pre-edit them from the file name. along with any other non-DOS characters. You can do this trivially with Flexible Renamer, which if you don’t have it I suggest downloading it from Flexible Renamer

Whilst I’m on the topic of my ‘go to’ utilities, my most used are

UltraSearch ( Free File Search Tool UltraSearch | JAM Software ) which reads the Windows MFT rather than the ‘normal’ way and its lightening fast at finding files.

The other must have set you probably know, but if not check https://www.nirsoft.net/

50 or so completely free (and install free) utilities you will find useful and indeed, have been “get out of jail” cards for me several times.

2 Likes

Hi @yorkeman ,

I’ve had similar issues with MIDI title vs. filename from a free chord pack.
Considered following your steps, but then I decided to create a script that generates the chords just like I needed them:

In case it’s helpful to you, too: GitHub - Fannon/midi-chord-pack: Generate MIDI Chords and provide a MIDI Chord Pack.

(If you have any suggestions or need customizations, I could also easily produce “variants” with different chord selections and namings).

Best,
Simon

1 Like

Btw. I’ve not tried three DAWs (more I don’t have) and they all handle the MIDI filename vs. MIDI track title differently.

  • Bitwig appears to only display the Filename in the imported clip.
  • Ableton Live appears to only display the MIDI title in the imported clip. It does not fall back to file name, therefore without MIDI title the clip would be named like “track”.
  • Reaper displays first the MIDI title and then the Filename.

No idea how other DAWs handle it. I’ve now provided a variant without MIDI title, just in case.

You were lucky! :grinning:
I found it a waste of money :rage:
Scaler is way better in any sense, compared to any “precotto” dish