Mass Midi to OMD Converting Tool (Python)

A place for cool projects

Mass Midi to OMD Converting Tool (Python)

Postby theepic321 » Fri Jan 15, 2021 3:04 pm

As I was collecting midi files to play on my interrupter I wanted to have an organized midi directory which would have a mirror omd file directory which I could easily copy over to my SD card for use in the interrupter. The problem I had was every time I added a new midi file or wanted to make changes to the file structure in the midi directory I would then have to make the same changes to the omd file directory so they would still be mirrored. After doing this manually for a little bit I decided to pull the stereotypical programmer automating something that takes 2 minutes.

As a result I created a Python script which is able to use the omdconvert.exe utility to convert a bunch of .midi files without you needing to do anything other than run the script! The script can be found on my GitHub under the MIT license (go nuts if you want to make changes or use it for whatever): https://github.com/dylancrockett/omd-convertall

I have also provided a zip file with the basic file structure needed for the program including the convertall.py file. I did not include the omdconvert executable since you should already have that (or you can get it from the OneTesla site if you don't). So all you will need to do is drop the omdconvert.exe utility into the directory at the same level as the convertall.py script and populate the midi folder with midi files (supports only one subdirectory deep search for .midi files, more information on GitHub). I have also provided two midi files in the midi directory of the zip folder so you can drop in omdconvert.exe and test the utility before moving in all your precious midi files.

Zip Folder:
midi-omd-convertall.zip
Zipped converter & directory structure with 2 example midi files.
(4.08 KiB) Downloaded 1096 times


You will need Python to run this script! I have tested it with Python 3.7, 3.8, and 3.9 but cant make any promises about older versions.

tldr;
Python script for converting all your midi files to omd files in one go, code available on GitHub or in attached zip folder with directory structure ready to go. Add omdconvert.exe at the same level as the .py file and midi files to midi directory and run the convertall.py script and watch the magic happen!
theepic321
Tipsy Toggle Switch
 
Posts: 3
Joined: Sun Jan 10, 2021 4:21 pm

Return to Other Projects

Who is online

Users browsing this forum: No registered users and 25 guests


cron