PDA

View Full Version : Converting MIDI to some mod format



masonwheeler
08-11-2007, 04:12 PM
After various MIDI playback snafus have given me one headache too many, I'm about ready to give up on the format. Is there any way to convert old MIDI files to MOD (or S3M, IT, etc) format? I've found two programs so far that claim to be able to, but they both have problems.
Mid2XM just plain doesn't work. I follow the instructions in the helpfile and end up with errors, not XM files.
PTMID actually creates working MOD files, but the conversion leaves much to be desired. (Here's a before-and-after I created (http://turbu-rpg.com/downloads/ctend.zip) of a fairly complex song, to test it.) Does anyone know of a program--or a library in C, C++ or Pascal--that can reliably convert MIDI songs to a modular format?

Mason

Legolas
08-11-2007, 04:17 PM
IIRC MODPlug Tracker can convert midi to mod format

masonwheeler
08-11-2007, 04:20 PM
I'm a bit leery of MPT. Last time I tried doing something like that (admittedly several years and probably several versions ago) it was a long, overly complicated process requiring tons of trial-and-error that usually produced bad results. But I'll check it out. Maybe it's improved since then.

EDIT: Just tried it, and it has gotten much better, but there are still a few issues. Try opening the MIDI file in the sample zip and you'll see. The piano gets turned into some sort of maraca, and a lot of notes that are supposed to be held get cut off very quickly instead.

Mason

Legolas
08-11-2007, 04:48 PM
Yes, you will need to edit the converted mod, but it should only be matter of replacing some instruments

masonwheeler
08-11-2007, 04:50 PM
2 things.
1) Replacing instruments isn't that big an issue, but the improper note cutoffs is.
2) If at all possible, I'd like a way to automate this, so it has to work right the first time.

Mason

noeska
08-11-2007, 06:59 PM
You may try soundclub: http://www.bluemoon.ee/history/scwin/index.html. The dos version can load midi.

Besides why convert to .mod at max .mod files support 8 tracks.

E.g. take a look at: http://www.roland.com/products/en/VSC-MP1/index.html


i forgot: http://www.polyhedric.com/software/mn/

masonwheeler
08-11-2007, 07:06 PM
It doesn't necessarily have to be MOD format. Any module-type music will do. IT or S3M for example.

Mason

BeRo
05-12-2007, 10:04 AM
My own BeRoTracker has a near perfect MIDI import. You can convert MIDIs to MOD/S3M/XM/IT/BRT with it.

masonwheeler
05-12-2007, 12:14 PM
I just looked it up, and its conversion is very impressive. I was *very* pleasantly surprised, especially as I'd taken my test case (the one song that's managed to break ModPlug Tracker's conversion feature so far) off my server, so you had nothing to compare it against except your own faith in your product.

Only one problem. I can't find the promised export feature. I go to "save as," and the only option I can find is your proprietary .brt format, which my music player unfortunately doesn't understand. How do I save this converted MIDI to a more established mod format like IT or XM?

EDIT: I found a song that will break it. (http://turbu-rpg.com/downloads/Peace1.mid) The second instrument--not sure what it's called; the echo-y one that's not a piano--never fades out, leading to horrible dissonances. (I checked it in MPT too, and it broke it also, for a different reason. Things fade out too quickly.) :P

Mason

BeRo
05-12-2007, 01:25 PM
http://bero.0ok.de/pgdbrt/0/brt1.png
http://bero.0ok.de/pgdbrt/0/brt2.png

I hope these screenshot helps you :)

And in peace1.mid there are the note off events ordered wrongly, and because the piano instrument has a sustain loop, it fades never outk because the note off events are ordered in the original MIDI file in a incorrect way. Make sure that the note off events are correct ordered :-) ) P.S. Try disable "Full MOD convert" in the MIDI convert dialog, then converts BRT it to a module with MIDI events to the MIDIMAPPER out device.

masonwheeler
05-12-2007, 01:59 PM
Yeah, that makes it sound right. Only problem is, if I open something without the full MOD convert, then save it as an IT or XM file, other players don't understand it. Winamp plays both, but no sound comes out. ModPlug Tracker won't open the IT files; it opens XMs, but lists them with instruments but no samples. :(

As for the "notes in the wrong place" thing, I won't argue details of MIDI file formats with you, because it's something I know next to nothing about. All I know is, the song as it is plays just fine in Winamp and Windows Media Player. Maybe there's more than one valid way to place a note-off event? I've heard there's more than one MIDI format...

Mason

BeRo
05-12-2007, 02:06 PM
Yeah, that makes it sound right. Only problem is, if I open something without the full MOD convert, then save it as an IT or XM file, other players don't understand it. Winamp plays both, but no sound comes out. ModPlug Tracker won't open the IT files; it opens XMs, but lists them with instruments but no samples. :(

But the Original Impulse Tracker for DOS understand und can process the MIDI events :-) Short MPT and WinAmp have no "complete" IT Format support, but BRT has it incl. the MIDI features from the IT file format.


As for the "notes in the wrong place" thing, I won't argue details of MIDI file formats with you, because it's something I know next to nothing about. All I know is, the song as it is plays just fine in Winamp and Windows Media Player. Maybe there's more than one valid way to place a note-off event? I've heard there's more than one MIDI format...

Yes, because MIDI Soundfont (SF1/SF2/DLS) instruments can have a special sustain loop type, which can have a automatic maximum sustain hold time, but which does not exist in MOD/SM/XM/IT/BRT. These A(H)DSR envelopes with the special sustain behaviour are not easy to convert into tracker-style freedrawn envelopes. That is a bit complex to explain, but I've tried it now. :-)

P.S. BeRoTracker is completely written in object pascal incl. Sound Player Engine

masonwheeler
06-12-2007, 01:12 AM
OK, that makes sense.

Mason