Jump to content


Photo
- - - - -

ORG to MIDI converter


Old topic!
Guest, the last post in this thread is over 60 days old. Posting in this thread will be considered a bump, so please make an attempt to be courteous if you go ahead with it.

If the last post is over 6 months old, it may instead be a better idea to start a new topic. If you aren't sure about what to do, feel free to ask a staff member for help, or try to locate a 'general questions'-type thread if it exists in this (sub-)forum.


  • Please log in to reply
9 replies to this topic

#1 17 June 2012 - 06:34 PM

Bavi_H Offline
Neophyte Member
"Wahoo! Upgrade!"
Join Date: 11 Jul 2009
Location: LocationTexas, USA
Posts: 51
 

Here's the ORG to MIDI converter I've been working on: ORGMID.

ORGMID is a command line program. Call it with the name of an ORG file to read and the name of a MID file to create:

orgmid in.org out.mid


ORGMID doesn't choose melodic MIDI instruments for you. All the melody instruments in the MIDI file are set to an organ sound. You should use a MIDI editing program* to choose appropriate sounding MIDI instruments for each melodic part.

See the orgmid.txt file for more information about the conversion.

_____
* For editing MIDI files, I use Sekaiju. If you download Sekaiju, be aware you have to change the language from Japanese to English. Go to the (S) menu and choose Language, select English and restart. (Or before starting Sekaiju, open Sekaiju.ini and change Language=Japanese to Language=English.)

Edit 2012-08-19: Changed ORGMID link from zip file to public ORGMID page.

Edited by Bavi_H, 19 August 2012 - 06:42 PM.


#2 17 June 2012 - 07:57 PM

Carrotlord Offline
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: 28 Jan 2010
Location: LocationInternet
Posts: 1,374
Age: 20
 

I tried it on GIR's neverdie3.org. Pretty good stuff.

Now, can you do the opposite. As in... MIDI to ORG?

#3 17 June 2012 - 07:58 PM

Noxid Online
a2_a2
"Life begins and ends with Nu."
Join Date: 28 Aug 2009
Location: LocationOu
Posts: 3,864
 

soon we will have a toolchain capable of converting anything through .org

kss-button.png azarashi-button.png mahinbuttongif2.gif balbal-button.png
Userbox-SC16B_Knuckles.png


#4 23 June 2012 - 09:43 PM

Bavi_H Offline
Neophyte Member
"Wahoo! Upgrade!"
Join Date: 11 Jul 2009
Location: LocationTexas, USA
Posts: 51
 

Version 0.81 released: I fixed a bug that caused multiple Note Off events at the beginning of the first melody track in certain cases. (Many unneeded Note Off events caused Media Player mplay32.exe to play the first note with wrong timing.)

#5 19 August 2012 - 06:47 PM

Bavi_H Offline
Neophyte Member
"Wahoo! Upgrade!"
Join Date: 11 Jul 2009
Location: LocationTexas, USA
Posts: 51
 

I made a public page on my website for ORGMID: ORGMID - ORG to MIDI converter.
I posted source code and conversion notes there.

Edit: I'm not pleased with my messy source code (mostly one big main function), but mainly wanted to share the results of my investigations into converting ORG to MIDI. The source code is designed to be plain C, I hope it can complie in other enviroments.

Edited by Bavi_H, 19 August 2012 - 06:52 PM.


#6 19 August 2012 - 07:08 PM

Carrotlord Offline
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: 28 Jan 2010
Location: LocationInternet
Posts: 1,374
Age: 20
 

I'm pretty sure it can be compiled nearly anywhere.

Are you working on that MIDI to ORG converter? Mine doesn't actually work most of the time, so I'd be great if you could make one.

Edited by Carrotlord, 19 August 2012 - 07:11 PM.


#7 19 August 2012 - 10:33 PM

Bavi_H Offline
Neophyte Member
"Wahoo! Upgrade!"
Join Date: 11 Jul 2009
Location: LocationTexas, USA
Posts: 51
 

Are you working on that MIDI to ORG converter?


I'm not working on a MIDI to ORG converter right now. I have only thought a tiny bit about it. Consider these differences between MIDI and ORG formats:

MIDI file: No limit on polyphony stored in the file.
ORG: One-note polyphony per track (8 melody tracks and 8 percussion tracks).

MIDI file: High time resolution, typically hundreds of divisions per beat.
ORG: Low time resolution, typically 3 to 12 divisions per beat.

MIDI file: Can change tempo, time signature, and instruments anywhere in the file.
ORG: Tempo, time signature, and instruments set once for the entire file.


Because of these differences, there's more choices you might need to make when converting a MIDI file to an ORG file. For example, if there are too many simultaneous melody notes to fit into 8 monophonic tracks, you have to choose which ones to keep. And you have to choose an appropriate time resolution for the ORG file that fits the MIDI note durations or minimizes note rounding.

If I started making a command-line MIDI to ORG converter, I'd probably end up writing a lot of instructions about how you'd have to limit certain things in the MIDI file for the conversion to work correctly. Ideally, if a lot of settings and choices are needed, a GUI program might be more friendly, but I'd have to learn some language or framework for making GUI programs.

That's as far as I've thought about a MIDI to ORG converter so far.
_____
P.S. To give you a feel for how long I've been working on my ORG to MIDI converter: I started working on it in July 2009 (around the time my first post) and have been working on it intermittently since then. Looking over my archived source code, it looks like I was mostly done in October 2010, but I wanted to write about the conversion process I used and maybe clean up the source code before releasing it. So I continued occasionally drafting and revising documents about it from time to time. In June, someone on the forum asked for a MIDI version of an ORG, and I used my converter to make a MIDI version then tweaked the instruments. After I did that, it felt kind of mean to say "I've got my own ORG to MIDI converter" but not let anyone else use it. So the next weekend I did a quick check for bugs and posted the executable (above on this thread). Today, I finally posted the (still messy) source code and some documents about the ORG to MIDI conversion processes I used.

#8 21 August 2012 - 06:44 AM

Carrotlord Offline
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: 28 Jan 2010
Location: LocationInternet
Posts: 1,374
Age: 20
 

I'm not working on a MIDI to ORG converter right now. I have only thought a tiny bit about it. Consider these differences between MIDI and ORG formats:

MIDI file: No limit on polyphony stored in the file.
ORG: One-note polyphony per track (8 melody tracks and 8 percussion tracks).

MIDI file: High time resolution, typically hundreds of divisions per beat.
ORG: Low time resolution, typically 3 to 12 divisions per beat.

MIDI file: Can change tempo, time signature, and instruments anywhere in the file.
ORG: Tempo, time signature, and instruments set once for the entire file.


Because of these differences, there's more choices you might need to make when converting a MIDI file to an ORG file. For example, if there are too many simultaneous melody notes to fit into 8 monophonic tracks, you have to choose which ones to keep. And you have to choose an appropriate time resolution for the ORG file that fits the MIDI note durations or minimizes note rounding.


Well that's unfortunate.

If I started making a command-line MIDI to ORG converter, I'd probably end up writing a lot of instructions about how you'd have to limit certain things in the MIDI file for the conversion to work correctly. Ideally, if a lot of settings and choices are needed, a GUI program might be more friendly, but I'd have to learn some language or framework for making GUI programs.


GUIs are easy. Use Java Swing or C++ OpenGL.

P.S. To give you a feel for how long I've been working on my ORG to MIDI converter: I started working on it in July 2009 (around the time my first post) and have been working on it intermittently since then. Looking over my archived source code, it looks like I was mostly done in October 2010, but I wanted to write about the conversion process I used and maybe clean up the source code before releasing it. So I continued occasionally drafting and revising documents about it from time to time. In June, someone on the forum asked for a MIDI version of an ORG, and I used my converter to make a MIDI version then tweaked the instruments. After I did that, it felt kind of mean to say "I've got my own ORG to MIDI converter" but not let anyone else use it. So the next weekend I did a quick check for bugs and posted the executable (above on this thread). Today, I finally posted the (still messy) source code and some documents about the ORG to MIDI conversion processes I used.


Well that's a lot of time. Since I'm curious, I'm gonna look over your source code.

#9 21 August 2012 - 05:10 PM

Lace Offline
Lesbian Seagull
"Life begins and ends with Nu."
Join Date: 04 Jan 2008
Location: LocationHunky Dory
Posts: 3,062
 

You may want to make it truncate everything after the repeat is called.
Posted Image

#10 10 November 2012 - 11:43 PM

Bavi_H Offline
Neophyte Member
"Wahoo! Upgrade!"
Join Date: 11 Jul 2009
Location: LocationTexas, USA
Posts: 51
 

Version 0.82 released: Fixed a bug that was excluding some MIDI Pan and Expression events from being added. Download it at the same place: ORGMID - ORG to MIDI converter.

More information: To reduce unneeded events in the MIDI file, ORGMID only inserts MIDI Pan and Expression events when the ORG Pan and Volume levels are different than the previous ones. Unfortunately, ORGMID version 0.81 was incorrectly comparing ORG Pans and Volumes at the start of notes seperately from ORG Pans and Volumes during notes. ORGMID version 0.82 now correctly compares all ORG Pans and Volumes (both from note starts and during notes) to the previous value.





Old topic!
Guest, the last post in this thread is over 60 days old. Posting in this thread will be considered a bump, so please make an attempt to be courteous if you go ahead with it.

If the last post is over 6 months old, it may instead be a better idea to start a new topic. If you aren't sure about what to do, feel free to ask a staff member for help, or try to locate a 'general questions'-type thread if it exists in this (sub-)forum.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users