Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mike800

Converting MIDI to MP3 via a command line tool?

Recommended Posts

I'm looking for a Windows command line tool that converts MIDI to MP3. I've found a tool called "Free MIDI to MP3 Converter" which does a good job, but I prefer a command line tool, since I want this conversion to be a part of a batch script that activates several tools.

Edited by Mike800

Share this post


Link to post

Timidity can only convert to WAV, and from WAV you need another tool to convert it to MP3- too much quality loss, plus, it's pretty clumsy to make Timidity work on Windows.

Share this post


Link to post

I've heard that those MID to MP3 converters have always been inefficient and gave results with very low yield/unsatisfactory results.

Share this post


Link to post

If you're on Linux and have both Fluidsynth and LAME, you can do it all on the command line in one go:

fluidsynth -r 44100 -R 1 -E little -T raw -O s16 -i -l -F - [PATH TO YOUR SOUNDFONT] [PATH TO THE MIDI FILE] | lame [your lame options here] -r --signed -s 44100 - [MP3 FILE TO WRITE]

 

Some of those options probably aren't needed, but that's the basic idea.  Fluidsynth dumps the audio to standard output as a raw PCM stream, which is then piped directly into LAME via standard input.

Share this post


Link to post

@Mike800

 

Lol, I'm sorry, I missed the word "Windows". There should be a way to do that same thing on Windows, but I'm not as familiar with cmd.exe (and even less with PowerShell), so I can't say how. I usually use Bash on Windows :-/

Share this post


Link to post
3 hours ago, Mike800 said:

Timidity can only convert to WAV, and from WAV you need another tool to convert it to MP3- too much quality loss, plus, it's pretty clumsy to make Timidity work on Windows.

Recording to WAV doesn't induce any quality loss. It's a bit tedious, yes, but it's no worse than a program that would encode MP3 directly from synthesizing the MIDI.

Share this post


Link to post
8 hours ago, MrD!zone said:

Yes this is all cool and good But is there a MP3 to MiDi converter that doesn't sound like ass? 

I don't think there's a way to prevent that, at least not now. By converting an MP3 to MIDI you're basically asking a machine to guess what instruments are in an audio file.

Share this post


Link to post

SoX is cross-platform, never used it but it seems to be the only viable result from my Google Search other than the converter you already found.

 

http://sox.sourceforge.net/

 

Beware when downloading stuff from Sourceforge, some software coming from there these days is accompanied by toolbars and bullshit apps that try to sneak in through the installer. Guess SF needed money, anyway I hope this is of some help.

Share this post


Link to post

In my experience, I'd rather pay a little bit of cash than to download a program with adware or other superfluous crap tacked on. Which has happened to me a few times. If it's too good to be true, it probably is. There's people who spend money on lots of different shit. It just depends on whether or not it's worth it to you. Anyway, that's just the first program I found that does what he wants. I'd probably look for a torrent first, but if you wear yourself out looking - here's an option that's guaranteed to do what you want.

 

Go for the GNU program if you can find one.

Share this post


Link to post
5 hours ago, Graf Zahl said:

Why would anyone pay for something that can be found for free with a little bit of effort? It's amazing what some people charge money for.

Because the stuff for free isn't always that easy to find and in my experience you can have trouble locating the tools again if you need them. For example, there was this tool I used for extracting music from a game a while back but forgot to do one of the other files that had some music in it too. Went back to find the tool again (because I did this on a VM) and the download links were dead. I've done forgot what the tool was since this was like last year.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×