MIDI to ORG conversion tools

Mar 16, 2022 at 9:53 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 18, 2021
Location: Earth, Mars, or somewhere in between...
Posts: 24
Pronouns: Pronouns: Pronouns: Pronouns: Pronouns: Pronouns:
I've recently developed a set of tools to effectively convert MIDI files into ORG files.
Some time ago, I stumbled upon this post made back in 2012 about a tool that was designed to make this conversion. Unfortunately, that tool was quite cumbersome to use, and in the end, did not produce a quality result (you can read that thread and see that my experience was not unique).

Over time, as I became more competent with computers, I decided to try making a converter myself that would actually be useable. This is the result :
MIDI2ORG
ORGCopy
(Prebuilt binaries can be found in the “releases” tab on GitHub)

Both of these programs have an important role to play when converting MIDIs into ORG files.

The first program actually does the conversions, but in order to conserve as much MIDI data as possible, it splits each individual track and channel into its own org file. The primary reason for this is because MIDI channels can have multiple notes playing at one time, so the possibility of missing something important is very large unless this is done.

The second program is a utility to copy tracks between ORG files, so you can pick the most important channel data and copy it all to one final song. You can also combine several tracks into one if there isn't enough space in the ORG to hold each track individually.

I explain more on how this all works in the github repositories.


Attached is a showcase of what this tool can do. I took the Power Rangers' theme (actually the same file mentioned in the original MIDI converter thread) and converted it.
I did not alter anything beyond using the ORGCopy utility to migrate all the tracks into one file, setting loop points, and changing instruments (which are by default, all instrument 0).
Tempo, time signature, and volume are all gathered from the MIDI with no user intervention.


Update:
I've begun development on a GUI application that combines both of these tools into one.
The program is incomplete at the moment, but you can see the in-progress release here.
Currently, only ORGCopy is working right now, but already there are several quality-of-life improvements made over the terminal version, like the ability to perform multiple copy operations at one time.

Update 2:
The first completed version of the application is finished, with both ORGCopy and MIDI2ORG fully implemented and many of the bugs that appeared in the earlier versions removed.
For now, I decided to keep IMGui as the main library for simplicity's sake, but it has been styled to behave more like a traditional windowed application.

I've also added a snazzy app icon. -No, it's not important to the actual function of the application, but it was fun to make.

Check out the release here.
 

Attachments

Last edited:
Mar 17, 2022 at 12:27 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Nov 21, 2021
Location: the Pillars of Creation
Posts: 32
Pronouns: he/him
!!! Wow, Amazing! I didn't even think something like this could exist. Now there's finally a use for my repository of midi files that I've been keeping around for no good reason. This'll definitely help me a ton.
 
Mar 17, 2022 at 4:02 AM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2326
Age: 28
Pronouns: he/him
Hey, nice to see someone finally made a MIDI to ORG converter that actually works! I started making a program like this back in the fall of 2015, but when I got busy with college, it got harder to set aside time for this project, and I eventually lost interest. I made a nice UI for selecting your input file, input format, and desired output format, but didn't get very far into implementing the actual conversion.

Some time ago, I stumbled upon this post made back in 2012 about a tool that was designed to make this conversion. Unfortunately, that tool was quite cumbersome to use, and in the end, did not produce a quality result (you can read that thread and see that my experience was not unique).
Haha, you phrased that a lot more politely than I ever have when talking about that program. Looking back, I'm pretty sure Carrotlord was trolling us with that program, given that he started exhibiting some weird behavior soon after that, and then started going off the deep end and causing some drama that all came to a head in early 2013.

I'm honored that I ended up influencing you to showcase the Mighty Morphin Power Rangers theme. I gave that outputted ORG a listen. If this is indeed work that was done by your converter, then bravo, this is some good work. This ORG probably did a better job with the tempo and volume of the notes than I did manually in my remix. I prefer most of the instrument choices in my remix, although I must say, the "Go go Power Rangers" vocal track does sound better in your version- my remix didn't blend the vocal tracks in very well with the rest of the song, they were too loud and sharp.

Nice that you're making this open source. Just out of convenience, are there plans on posting compiled versions of these programs? It's late and I need to go to bed, but tomorrow I'll have to clone your repo and build and run this myself just to make sure this actually does what it says, and that your example ORG is believable. Forgive me for my lack of trust; as you're well aware, I have a history of being lied to about the efficacy of MIDI to ORG converters.


Also, on a remotely related note, nice to see you around again, Dr_Glaucous! I was wondering what you've been up to since you released that first demo of Plotbomb and then disappeared for a while. Are you still planning on working on that mod, or have you accomplished what you intended to accomplish by making the content in that demo? It's up to you whether you want to answer that question here, or somewhere more relevant like your mod's thread. Just thought I'd ask here since this is the first post you've made since creating the showcase thread for Plotbomb, and you haven't responded to any of the feedback you got in that thread.
 
Mar 18, 2022 at 4:14 AM
Tommy Thunder
Discord Group Admin
Org Discord Moderator
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 24, 2011
Location: New Westminster, BC
Posts: 1368
Age: 28
Pronouns: ㅤ
Gotta say, this is a wonderful program. I think many of us have been waiting for a proper MIDI2ORG for a long time, and this really delivers. I have only tried one MIDI so far, and I tried to make it a relatively simple one that I had lying around: Splash Hill 1. This took less than an hour to make, and probably about 20 minutes of that was just figuring out the program and doing the conversion, which is to say that making this org was very efficient.

There were a few instances of some wackiness in the program, like how the original conversion had expanded the org to a crazy amount trying to compensate for some of the notes, but both programs come readily equipped to deal with these scenarios. It made what could have been a limiting and frustrating conversion rather straightforward. The TrackMASH is a handy feature, and the ORGCopy program in general is a great way to split up the functionality of the conversion so you can choose which elements of a potentially large and complex MIDI you want to incorporate.

Really, this is a wonderful gift you have delivered to us. It accelerates the most tedious part of the Org-making process, the MIDI transcription, and I think in most cases will allow us to get straight to the track management, instrument selection, and mixing. Thanks!
 
Mar 18, 2022 at 11:46 AM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1104
Age: 27
Pronouns: none

it works! and it works very well, i might add. this is fantastic, and i decided to try it out yesterday, the org above is the result. not much fine-tuning from me, just merging and changing instruments, yet it's still working great. amazing program, thank you so much!
 
Mar 18, 2022 at 3:12 PM
Junior Member
"Fresh from the Bakery"
Join Date: Nov 12, 2016
Location: Earth
Posts: 12
This is definitely a game changer compared to hand transcribing midis, and I'm loving a lot of the extra features with ORGCopy that allow for track merging.
I decided to test it out on something that I've already done by hand to see what differs.
This one's the direct conversion (with instrument changes & merging):

And this the hand transcription I did last month on the same song:
 
Mar 18, 2022 at 10:53 PM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2326
Age: 28
Pronouns: he/him
So I just gave these tools a spin, and I can confirm that they indeed work. Fabulous job, Dr_Glaucous, this is something that people have been wanting for a long time. I didn't invest the time into compiling the tracks into a fully-fledged ORG like the users who posted above me, I only took a look at the outputted ORGs just to verify that this program indeed does what you say it does. This is very satisfying.

What you did here was very smart. The tricky part of this conversion process is that MIDI files usually contain more tracks than ORGs can fit, and writing an algorithm to figure out which ones to include and how to make it sound good in an ORG just wouldn't be practical, unless you're looking for an excuse to undertake an arduous machine learning project. So instead of trying to figure this out, your program just exports all of the data, and leaves it in the musician's hands to sift through and decide what tracks are the most important to include in the final ORG, and how to mix it all together. And of course you gave us provision on streamlining this merging process.

If I may make a few suggestions, here are some things that I think could be improved:
  • When exporting all of the tracks, perhaps you could export them all as different waves in the instrument setup. This would help with differentiating the instrument tracks after combining them.
  • Having the program read the instruments and try to guess what wave-XX in the ORG to use would be very hard, but it seems like having the program do some guesswork on what instruments to use in the drum tracks would be feasible since that's not as complex.
Overall, good work, I'm glad that something like this finally came around.


@andwhyisit, I propose that these two tools be added to the music tools section of the tribute site, and that Carrotlord's tool either be removed or moved to the defunct tools section.
 
Last edited:
Mar 19, 2022 at 7:57 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6224
Age: 39
Pronouns: he/him
@Dr_Glaucous: I uploaded both tools directly onto the site instead of linking to them so that I could bundle the exe and readme together. Hopefully that isn't an issue.
 
Mar 20, 2022 at 9:51 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 18, 2021
Location: Earth, Mars, or somewhere in between...
Posts: 24
Pronouns: Pronouns: Pronouns: Pronouns: Pronouns: Pronouns:
Thank you all for your kind feedback. I'm glad to have made something that is worthwhile to this community.

Also, it's been updated:
The folks over in the Organya discord were very quick to give this tool a torture-test of sorts and found several MIDIs that produced strange or unpredicted results.
Consequently, I updated the tool to better handle these inconsistencies.
As usual, more specifics can be found in the readme file and on the Github releases page

Here are a few more ORGs I've converted myself with the tool:

(The Entertainer)


(Mad Rat Dead: Cottage House)


Oh, yes, and @andwhyisit, that is perfectly fine.
 
Last edited:
Aug 2, 2022 at 4:56 AM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 18, 2021
Location: Earth, Mars, or somewhere in between...
Posts: 24
Pronouns: Pronouns: Pronouns: Pronouns: Pronouns: Pronouns:
I know this thread is a little bit older, but I've come with an update.

I've begun development on a GUI version of these programs that should make them easier and quicker to use.

Introducing: ORGTools, built with the Dear IMGui library


Currently, only ORGCopy has been re-implemented in the GUI, but even now, it makes the copy process much easier than with the terminal prompt.


Tool.PNG


[/ISPOILER]
 
Aug 2, 2022 at 10:35 PM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2326
Age: 28
Pronouns: he/him
While Dear IMGui is a decent GUI library for inside of games where the resolution is going to be pre-determined, it doesn't translate well to usage for a desktop application. The text and widgets end up being really small on my 4K monitor. Why not use a library like WxWidgets? That will show up much better.

What's your long-term vision for how you'll have the two tools usable in the one application? Are you thinking about having them be tabbed in the future?
 
Aug 3, 2022 at 1:11 AM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 18, 2021
Location: Earth, Mars, or somewhere in between...
Posts: 24
Pronouns: Pronouns: Pronouns: Pronouns: Pronouns: Pronouns:
Believe it or not, I DID consider using WxWidgets (in fact, you can still see remnants of it in the github repository), but I had issues getting the development environment set up and getting MSVC, cmake, and WxWidgets to all play nicely together. I am aware this is probably a lack of knowledge on my part, but in the end, I favored getting a working prototype going over wasting hours banging my head against my desk, but I do prefer its more native feel. I may go back to it now that I have a rough idea in my mind on how this is going to go.
(Also, there is a method to adjust IMGui's global scale, and since it runs on top of something like SDL or glfw, it would be easy to automatically adjust that based on screen resolution)

As for the final shared layout, I was either considering tabbed menus or split-screen (and toying with the idea of multi-instancing, but I doubt anyone will need multiple instances of either tool running at once).
 
Last edited:
Aug 3, 2022 at 3:53 AM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2326
Age: 28
Pronouns: he/him
Yeah, I don't blame you, getting WxWidgets to build with CMake and whatever IDE you're using can be a pain. I'll be interested to see this project as it matures.
 
Aug 7, 2022 at 2:26 AM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 18, 2021
Location: Earth, Mars, or somewhere in between...
Posts: 24
Pronouns: Pronouns: Pronouns: Pronouns: Pronouns: Pronouns:
Here's another update:
I've created the first fully completed version of this application.
Obligatory link to the release page

I've re-arranged some things and (of course) added the MIDI2ORG tool to the program.
It still uses ImGUI, but in response to the screen resolution issue, it will now scale itself to fit the native GUI scale.

Tool.PNG
 
Sep 12, 2022 at 2:36 PM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6224
Age: 39
Pronouns: he/him
I can't seem to open ORGTools 1.0.0, it just silently fails. I'm on Windows 10, with OpenGL version 4.6. Am I missing something?
 
Sep 18, 2022 at 5:32 AM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Jun 18, 2021
Location: Earth, Mars, or somewhere in between...
Posts: 24
Pronouns: Pronouns: Pronouns: Pronouns: Pronouns: Pronouns:
I can't seem to open ORGTools 1.0.0, it just silently fails. I'm on Windows 10, with OpenGL version 4.6. Am I missing something?

Sorry for the late reply, I was busy all week and haven't had the time to troubleshoot the program. Since the framework for ORGTools is largely based on the DoConfig program released in tangent with CSE2, anywhere that has problems loading, this will also have the same problems. Of all my Windows based machines, only one had a launch issue, and that was because the graphics card had OpenGL problems (a direct result of me using VNC and RDP to talk to it). All of my non-server machines worked just fine with ORGTools.

I do recall having DoConfig crash problems on some of my Linux machines...

I've given the program a quick update. It will not solve the problem, but it should generate a crash log now if anything goes awry. Please post the log if/when the program crashes again. If its not a driver issue, I have no idea what it could be.

Direct download from github: version 1.0.0a
 
Sep 18, 2022 at 12:45 PM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6224
Age: 39
Pronouns: he/him
I've given the program a quick update. It will not solve the problem, but it should generate a crash log now if anything goes awry. Please post the log if/when the program crashes again. If its not a driver issue, I have no idea what it could be.

Direct download from github: version 1.0.0a
There is no crash log, it is just like the program never ran at all.

That said... I just discovered something. I tried launching the program via the command prompt and it worked! Same for launching it via a bat file. Launching ORGTools1.0.0a.exe directly (enter key, or double-click, or right-click > open, or right-click > run as administrator) still silently fails though. It's strange.
 
Sep 20, 2022 at 12:45 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 802
Age: 26
Pronouns: 菓子
There is no crash log, it is just like the program never ran at all.

That said... I just discovered something. I tried launching the program via the command prompt and it worked! Same for launching it via a bat file. Launching ORGTools1.0.0a.exe directly (enter key, or double-click, or right-click > open, or right-click > run as administrator) still silently fails though. It's strange.
It might be Windows 10 Defender not liking the tool, I've seen this happen with other things too.
Usually running through cmd or a bat file works yeah but I believe this issue only shows up if you try to run it normally from any folder in C: so putting it on another drive should work as well.

That doesn't mean the tool is unsafe though; I've seen this happen even with Unity games, it's almost as if they removed the popup if you try to run unknown executables.
 
Back
Top