Jump to content

What is the best way to convert MIDI's to files like .mp3 or .wav


Recommended Posts

Huh, til backquotes are obsolete.

 

Also, I now batch convert things to WAV with my midi123 synth I wrote. Just `midi123 -s soundfont.sf2 *.[mM][iI][dD]` and it renders everything in parallel without excessive memory usage. I converted the entire ROTT soundtrack in 13 seconds this way on my machine, heh.

Share this post


Link to post
12 hours ago, TimeOfDeath666 said:

Is it possible to use writewave with the Microsoft GS Wavetable Synth? Outside of doom, I literally can't find any way of converting midi to audio using the gs wavetable synth, besides recording the midi playback myself in real time.

I pulled my hair out trying to find this for over a year, some time ago.

 

The only soundfont that is actually accurate to the Windows one is here: https://musical-artifacts.com/artifacts/724/RLNDGM.SF2_for_SoundFont-Midi-Player-Android.zip

 

Use VirtualMIDISynth to convert it: https://coolsoft.altervista.org/en/virtualmidisynth

 

There's a ton of soundfonts out there claiming to be the "real" default Windows MIDI sound, but all of them were converted with varying degrees of success. This is the lone soundfont I've found that's truly accurate.

Share this post


Link to post
On 5/6/2022 at 9:02 PM, Graf Zahl said:

You can use GZDoom for this, it has a console command "writewave" that can convert a MIDI to WAV.

 

 

I wish I knew this a couple years ago. Wonderful tool, thanks!

Share this post


Link to post
On 6/20/2022 at 12:09 AM, Doomkid said:

I pulled my hair out trying to find this for over a year, some time ago.

 

The only soundfont that is actually accurate to the Windows one is here: https://musical-artifacts.com/artifacts/724/RLNDGM.SF2_for_SoundFont-Midi-Player-Android.zip

 

Use VirtualMIDISynth to convert it: https://coolsoft.altervista.org/en/virtualmidisynth

 

There's a ton of soundfonts out there claiming to be the "real" default Windows MIDI sound, but all of them were converted with varying degrees of success. This is the lone soundfont I've found that's truly accurate.

 

Thanks for the recommendation. I tested it out and noticed a couple minor inaccuracies. I guess it just isn't possible to convert to audio with the gs wavetable synth or make an exact replica soundfont, or else it would have been done by now.

Share this post


Link to post
11 hours ago, TimeOfDeath666 said:

Thanks for the recommendation. I tested it out and noticed a couple minor inaccuracies. I guess it just isn't possible to convert to audio with the gs wavetable synth or make an exact replica soundfont, or else it would have been done by now.

 

Would you mind telling me what instruments (or just what in general) sounded wrong with them? I have a collection of, say, 100ish MIDIs I've heard so many times, and I couldn't tell any difference in the sound with all but one: E1M3 of Doom. The "Halo Pad" instrument is meant to fade in with each note, but it just hits with full volume instantly in the soundfont.

 

That's the one I've noticed, but I'm really curious to hear what else is wrong. I think gm.dls (the "soundfont" that actually comes with windows, GS wavetable) must have some controllers or effects that simply get ignored/tossed out completely when converted to SF2 even by the best software, which sucks ass.

Share this post


Link to post

The midi I tested only used the electric grand piano and I noticed differences at 0:07.75 during the tremolo picking part with 'let ring', and at 0:14.63 the volume of the first two chords compared to the arpeggio third chord. After listening, I compared the waveforms and they also looked different.

 

sl2-01-microsoft-gs-wavetable-synth.mp3

sl2-01-RLNDGM.SF2.mp3

sl2-01.jpg

Share this post


Link to post

That settles it, there's definitely some stuff being ignored by every person's attempt to convert gm/dls to a soundfont. (If you can believe it - this is still by far the closest one I've found. The others were so obviously different I didn't even need side by side comparisons)

Share this post


Link to post
  • 8 months later...

Not sure if anyone still wants to convert midis from GZDoom, but if you do, here is the way (all credit to Dragonfly):

 

- Drag and drop MIDI onto GZDoom.exe

- Once in GZDoom, open the console.

- In the console, type the following, replacing "MIDI_Name" with the file name of your MIDI:

writewave MIDI_Name MIDI_Name_Export.wav * * fluidsynth *

 

So you need to type d_runnin if you want to export track from first map. Names of tracks can be found on doomwiki.org.

Share this post


Link to post
  • 6 months later...
On 3/11/2023 at 1:56 PM, Screamapillar said:

Not sure if anyone still wants to convert midis from GZDoom, but if you do, here is the way (all credit to Dragonfly):

 

- Drag and drop MIDI onto GZDoom.exe

- Once in GZDoom, open the console.

- In the console, type the following, replacing "MIDI_Name" with the file name of your MIDI:

writewave MIDI_Name MIDI_Name_Export.wav * * fluidsynth *

 

So you need to type d_runnin if you want to export track from first map. Names of tracks can be found on doomwiki.org.

 

 

I am testing this right now. I was trying to write a batch file to process the midis to waves for all 32 maps of a map pack. But it's not possible from a bat file as it doesn't process the commands in the console once inside of GZDoom. I did find another way however!

 

I found the full instructions for the writewave command within the GZDoom console:

"Usage: writewave <midi> <filename> [subsong] [sample rate] [synth] [soundfont]

 - use '*' as song name to dump the currently playing song

 - use 0 for subsong and sample rate to play the default"

 

After more testing, I discovered it's generating 44khz 32bit waves, not the typical CD quality 16bit waves which I've always seen. Winamp can't play these but WMP can and for example Goldwave music editor can. So that's no problem, they can be converted to MP3 or such later anyway. As far as I can tell, you can ignore the additional parameters in the command and simply just use it like this:

"writewave D_RUNNIN map01.wav" or "writewave D_STALKS map02.wav" and so forth. Unless you want to change sample rate or synth types. For me I was using fluidsynth inside GZDoom and it looks like it's using the type you have it set to.

 

Now to extract all of the tracks at once, the best method I found was making a .cfg file. I created a music.cfg and put these lines inside:

 

writewave D_RUNNIN map01.wav

writewave D_STALKS map02.wav
writewave D_COUNTD map03.wav
writewave D_BETWEE map04.wav
writewave D_DOOM map05.wav
writewave D_THE_DA map06.wav
writewave D_SHAWN map07.wav
writewave D_DDTBLU map08.wav
writewave D_IN_CIT map09.wav
writewave D_DEAD map10.wav
writewave D_STLKS2 map11.wav
writewave D_THEDA2 map12.wav
writewave D_DOOM2 map13.wav
writewave D_DDTBL2 map14.wav
writewave D_RUNNI2 map15.wav
writewave D_DEAD2 map16.wav
writewave D_STLKS3 map17.wav
writewave D_ROMERO map18.wav
writewave D_SHAWN2 map19.wav
writewave D_MESSAG map20.wav
writewave D_COUNT2 map21.wav
writewave D_DDTBL3 map22.wav
writewave D_AMPIE map23.wav
writewave D_THEDA3 map24.wav
writewave D_ADRIAN map25.wav
writewave D_MESSG2 map26.wav
writewave D_ROMER2 map27.wav
writewave D_TENSE map28.wav
writewave D_SHAWN3 map29.wav
writewave D_OPENIN map30.wav
writewave D_EVIL map31.wav
writewave D_ULTIMA map32.wav
writewave D_DM2TTL title.wav
writewave D_DM2INT intermis.wav
writewave D_READ_M textscrn.wav

 

This will extract all songs from a doom2 based wad.

Once you're in GZDoom and in the console, type "exec music.cfg" and it'll freeze up GZDoom for a good 2 or 3 minutes as it writes all tracks to wave. It took about 4 gigs for Eviternity for me, for example. Now it's just a matter of converting these to a usable music format like MP3. I did note on Eviternity it said "D_OPENIN is not a MIDI based file" and failed to convert that one. Which means their map 30 track is something other than MIDI. Not sure what to do in cases like this!

But for the most part I've finally found my way to convert soundtracks directly to high quality file outputs. I hope this post might help others!

 

 

Edited by Sirius104x

Share this post


Link to post
3 hours ago, Sirius104x said:

I did note on Eviternity it said "D_OPENIN is not a MIDI based file" and failed to convert that one. Which means their map 30 track is something other than MIDI. Not sure what to do in cases like this!

Eviternity MAP30 uses an Ogg Vorbis track, so you can just extract the lump from the WAD directly (i.e. with SLADE) and give it a .ogg extension. Tristan Clark also posted the track on YouTube with a link in the description to download an MP3 which is probably higher bitrate than what's in the WAD.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...