How to Convert MIDI to MP3 With Ubuntu

by Justin H. Pot

In the early '90s, when hard drives were too small for sound recordings, MIDI was how people played music on their computers. MIDI wasn't an actual sound file; it was more like a set of sheet music the computer interpreted. Ubuntu's default media player, Totem, can play MIDI files, but this does not help you if you want to play your old MIDI files on an iPod. Luckily, conversion in Ubuntu is simple.

1

Download the software to begin. Don't worry--this is Ubuntu. It'll be easy and won't cost you anything. Just open the Terminal and type the following: "sudo apt-get install timidity lame." To find the Terminal, click "Applications," then "Accessories," then "Terminal."

2

Convert MIDI files to WAVs. Use the Terminal to browse to the folder where your MIDI files are. If they're on the desktop, for example, type "cd Desktop" and hit enter. If they're in a folder in your home directory called "Music/old/midi," type "cd Music/Old/midi" and hit enter. Once Terminal is steered toward the correct folder, it's time to convert. Converting the files is as easy as typing "timidity -Ow" followed by the names of the files that need conversion. Typing "timidity" tells Terminal to run the conversion program, while the subcommand "-Ow" tells timidity to convert to the WAV format. See the photo with this step for an example. Three MIDI files are being converted: EleanorRigby.mid, ObLaDiObLaDa.mid and YouveGotToHideYourLoveAway.mid. To run this conversion, type "timidity -Ow EleanorRigby.mid ObLaDiObLaDa.mid YouveGotToHideYourLoveAway.mid." You can tell timidity to run as many files as you like in this way. Running timidity can take a while, depending on how many files are being converted.

3

Convert WAV files to MP3s, which is just as easy as Step 2, except that you will use the program "lame" instead of timidity. Type "lame" in the terminal, followed by the name of the WAV file you're converting and the MP3 file you're creating. Following the example, to convert ObLaDiObLaDa.wav, type "lame ObLaDiObLaDa.wav ObLaDiObLaDa.mp3"; then sit back and watch the magic happen. Repeat this process until all files are converted.

Tip

  • When typing long file names at the command line, try hitting the tab key. It will often auto-complete the file name for you.

Warning

  • These directions were written for Ubuntu 9.04, codename Jaunty Jackalope, but should work on past and future releases.

Video of the Day

Brought to you by Techwalla
Brought to you by Techwalla

About the Author

Justin H. Pot is a freelance journalist, writer and blogger based in Boulder, Colo. He's written for local newspapers in the United States and his native Canada, and also blogs for the environmental website Ecohearth.com.

More Articles