tags:

views:

68

answers:

2

I need to generate MP3 files from MIDI files in batch. Is there a library that can do that? Preferably open source and written in .NET

+1  A: 

Your biggest struggle is converting from midi to a waveform of any format. Eg midi doesn't specify what a piano sounds like, so every midi player will sound different.

Chris
A: 

You can convert midis to mp3s using a batch file and vlc.

As it states in the VLC wiki to play midis in Windows you need version 1.1.0 as well as a sound font. This version is currently in testing so can be downloaded from http://download.videolan.org/pub/videolan/testing/

Once you have set up midi support according to the wiki and tested it(by playing a midi). You can set up your batch file.

The command I used to convert a single midi to mp3 is

C:\Users\Public\Music>"C:\Program Files\VideoLAN\VLC\vlc" -I dummy -vvv "australia.mid" --sout=#transcode{acodec="mp3",ab="512","channels=2"}:standard{access="file",mux="raw",dst="australia.mp3"} vlc://quit

The above command keeps both files in the same folder. I have adapted this command from the information found on the VLC wiki- How_to_Batch_Encode

mikek3332002