How To: Ubuntu MIDI Playback with Audacious

22 01 2008

One of the things I kind of missed from Linux is general MIDI playback. Currently there’s only a few options. Use a software synth such as Timidity or try and fool around for a long time to get your hardware to play MIDI. There is some hope though, a new plugin in the gstreamer-bad package upstream will allow any gstreamer based player play MIDI through Timidity. But if you have a sound card that can play MIDI why not use it? A software synth is very CPU intensive, using the hardware seems optimal. There’s also another way. Audacious has a MIDI plugin that can do both hardware and software synth, so everyone ends up happy.

So how do you do this?

Software Synth, AMIDI Plugin with FluidSynth Backend

This is good for computers that do not have a sound card capable of MIDI playback.

First install Audacious and extras

sudo apt-get install audacious audacious-plugins audacious-plugins-extra

Now open Audacious and right click anywhere on Audacious to bring up the menu. Go to Preference. Click on the Plugins tab and highlight the AMIDI-Plug plugin. Then click Preferences and select the FluidSynth backend. Now select the FluidSynth Backend tab to configure it. You’re going to need to find a general MIDI soundfont. There’s plenty available out there. Now you need to add the location of the soundfont (.SF2) to the SoundFont settings. Now click OK. You should now be able to play back MIDIs :)

Hardware Synth, AMIDI Plugin with ALSA Backend

This is a little more tricky and you need to have a sound card that is capable of MIDI playback. Any card that uses the emu10k1 driver (e.g. Sound Blaster Audigy 2 and 4) should work since they are capable of loading soundfont wave tables into the sound card.
First let’s install the necessary item

sudo apt-get install audacious audacious-plugins audacious-plugins-extra awesfx

Now open Audacious and right click anywhere on it to bring up the menu. Go to Preferences and select the Plugins tab. Highlight the AMIDI-Plug plugin and click on Preferences. Highlight the ALSA Backend. You can configure extra options for the ALSA backend by clicking on the ALSA Backend tab, but the defaults should be fine. Click OK and close the Preferences dialog. Now you’re going to need a SoundFont. If you have a Sound Blaster Audigy check the installation CD. There should be some soundfonts on there. Copy them to your hard drive somewhere. Now open a terminal and cd to the directory where you put them

cd /path/to/soundfont/

Now load it into the sound card with asfxload

asfxload soundfont.SF2

Now you can close the terminal and go back to Audacious. You should now be able to play MIDI files off the hardware. The only slight inconvenience to this is that when you reboot you will have to reload the soundfont before playing MIDIs.

I’ve made a screencast of both ways to do this if you need to see it visually ;)

Just be warned the first half came out really loud for some reason, so you might want to turn your volume down a bit. :lol:

About these ads



20 responses

22 01 2008
Dr Small

I’ll have to try this out, because I have missed the usage of MIDI’s for about a year now :( :P

22 01 2008

Strangely I’ve never used MIDI before. I guess I won’t be needing to miss it

22 01 2008

Midi’s! yay, I see media fire too… :-D

31 01 2008

You’re going to need to find a general MIDI soundfont. There’s plenty available out there.

Well I don’t doubt it linuxtechie, but can I find one beneath all the spam google throws up when I try?? honestly these soundfont sites are the spam kings!! You’d think I’d searched for ‘Paris humping Britney’ or something (Thanks for the article though)

Can anyone post a link to somewhere I can get one of these soundfont things? Pwetty please??

31 01 2008

Lol :lol: Ok, here seems to be a pretty popular one Fluid 3
There’s also a bunch of other General soundfonts here

If you do end up using the Fluid 3 one, it’s a bit different since it comes as an archived soundfont (.sfArk) So in that case you’ll need to download this tool
Extract it and place the binary in the same directory as the FluidR3 GM.sfArk file. Open a terminal and cd to that directory and chmod +x the binary. Then run it ./sfarkxtc FluidR3\ GM.sfArk and it will decompress it.
Hope that helps :)

29 02 2008
gstreamer-plugins-bad Now Offers MIDI plugin « Linuxtechie’s Blog

[...] my previous How To with Audacious.  But now Ubuntu should be able to play MIDIs by default through any gstreamer based player with [...]

21 08 2008

thank you very much for this howto. I was looking for this very long time, now I made me happy :-)

6 09 2008
Mark Preston

I posted the below at Ubuntu Forums, too.

About once a year since Breezy Badger, I’ve tried to get MIDI to do nothing more than playback in/on Ubuntu. It ain’t happenin’.

This year (2008), I find some guy (Linuxtechie) who says he’s got it working and I get all excited to try it. (I can’t seem to learn from my previous mistakes here) …

So, from Linuxtechie’s ‘blog:

How To: Ubuntu MIDI Playback with Audacious

I get a warm fuzzy feeling and the next thing you know, my terminal is open and I’m trying his “thing”. Boy oh! Boy — it sure looks good. Not a lot of instructions, etc. So I’m busy getting Audacious in the plug-ins/extras when I have to stop, mid-stream, and get a Sound Font (I’m not a musician, I only want MIDI playback), whatever that is. So, reading further someone has set a link to Fluid3. I download and un-archive that file. I don’t know where the contents of the archive are supposed to go, but for my own ease sake, I make a directory called: soundfont. In it goes and then, I discover it’s got it’s own compressed file format.

That takes me to another page: sfArk SoundFont Compression
[B][/B] and while this page is kind enough to offer a method to uncompress the soundfont file, the author gives no model or example of the command line structure to do so. Why? I download the (again) compressed file. It’s all of 35 kilo bytes, so is another compressed file really necessary? Then I try to extract it into my soundfont directory. I look in the directory and Lo! and Behold!, the extracted directory has the padlock icon symbol on it. Why? I’m not a computer techie, so I have to find the chown code to make it useful. Again, why has this happened. Nothing is simple as it should be. MIDI is the only place in all of Linux where Microsoft is better. (That does point out how bad MS is, but that’s another story).

I try again, and the program to extract the soundfont has been extracted from the compressed directory with the padlock symbol on it. The name of this is:


and the file properties show it as an “executable”. Does that mean .exe, as in Microsoft? I can’t tell. So I highlight the icon and right-click. It offers to open under Wine. I decline that. I’m sure I downloaded the Linux version of this.

More confoundingly, the file name for the Fluid soundfont has a blank space (a touch of the space bar) in the file name. I don’t recall how you do that in Linux either. Worse, the explanation of how to use the decompression tools reads:

Installing and removing
Simply copy the contents of the distribution archive to the folder of your choice (typically the “applications” folder). In addition you may want set sfArkXT to be the “Open with application” used by Finder to open sfArk files. There are some minor complications here.. see “sfArk File Extensions” below. To remove the program, simply delete it.

Basic Use
Select a sfArk file to decompress using “File, Open” from the main menu. Then press “start” to decompress the file. The uncompressed SoundFont plus notes and license files (if included) will be created in the same directory as the source sfArk file. Note that decompression may take several minutes if the file is large and sfArk’s “maximum compression” mode was used to create the file. For sfArk’s “standard” compression mode, decompression will normally run at around 1 megabyte per second (depending on the speed of your Mac of course).

Once again, I’m back where I started.

So, if you are probably the nicest person on the face of God’s Green Earth, and have read all the way to here, and still want to help me. Go ahead. I’ll try anything. I got into MIDI in Microsoft through VanBasco’s MIDI player. Why it’s not been ported into Linux I’ll never understand. And it won’t run under Wine. I’ve tried for over 3 years with that. Soooooo, if you have time and lots of patience, and you can understand how to get MIDI to work with the above method, kindly let me know how to do that, too.

For what it’s worth, I’m adding this:

mark@Lexington-19:~/soundfont$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SI7012 [SiS SI7012], device 0: Intel ICH [SiS SI7012]
Subdevices: 1/1
Subdevice #0: subdevice #0

Does the foregoing mean I have hardware MIDI synthesis?

Thanks for your time.
Thanks, community.

25 09 2008

Mark Preston’s post summarizes my feelings toward Linux.

In other words, it’s easier for me to not want to play midi files in Linux than try and make it work. Maybe in another 2 years something so basic will be available in my package manager and will work when I double click on it. Maybe in 2 years the Linux mindset will change from “command line arguments and dependencies!” to “it just works!”

3 10 2008


Willi, how do did you learn to walk as a baby? Or are you,grown up, still lying in the bed?

Did you try to read any linux book, before you start writing 500-words-story on “how hard that is and why I am so unhappy”?

Did you visit local book store or, or even any torrent site, if you are so low for money and get any info about linux?

I don’t like helping lazy people, but you were starting to get annoying and I figure you ride the short bus… So now you can run along and play in traffic.

1. If you are using ubuntu, do: sudo apt-get install fluid-soundfont-gm.
You should find the SF2 file in /usr/share/sounds/sf2.
Or get this file:;ID=699;SoundFont_Location_Selected=Download%20USA;
And this file:

Decompress both with Fileroller, Xarchiver, Peazip or anything you want to some folder.
After this rightclick on “sfarkxtc” file, properties, Allow Execution.
Or better open console in that folder and do:
chmod o+x sfarkxtc

./sfarkxtc “FluidR3 GM.sfArk”

You only need “FluidR3 GM.SF2″

Sorry, sfarkxtc is a console application, no need to blame Linux programmers(you didnt pay a buck) for not providing GUI frontend. Or for Linux having nice console(you hate so much).You can blame the author though. Do it, it would sure help him!
Or download this SBLive 8MB sound font

and place it in some folder.

2. Go to audacious main menu and select “modules”. Turn off timidity. Select “AMIDI Plug”. Select “Configure”.

3. Choose “FluidSynth” at Backend selection.

4. Go to “FluidSynth backend” section. Click “Plus” icon. Go to the folder with SF2 file and select this file. Click Apply and restart Audacious.

(that was me being nice…. but now it’s time to be honest)


How does it feel to be a total douche bag? You’re the worst kinda of person, you said you look but you really didn’t look that hard, you want other people to do the work for you… Don’t worry, you will never be a hacker, so go pick up a new hobby for next 2 years until linux for your majesty comes off. and fuck off.

But enjoy the solution!

10 10 2008

Thankyou, thankyou very much…. :)))))

it work hahaha.

@ Reaper thank for the tip how to find the soundfont

11 10 2008

The first way didnt work…the second…

No Emux synth hwdep device is found
:( I will to wait or look for another way…


22 01 2009

It didn’t work for me at first using soft synth.
Then I read Reaper’s comment – the key is to turn off the TiMidity Audio Plugin then restart Audacious.

12 03 2009

Yay!!! Linux plays MIDI better than Windows ever can! Though I wish that since MIDI is an open format, Ubuntu and other distros should include it and its apps by default, so that newbies can play MIDI easier. (Though most newbies have 2 complaints, They can’t connect to the net and they can’t play mp3s.)

27 04 2009

MC PRTK: “Linux plays MIDI better than Windows ever can!”

That’s a totally bogus statement. In the old days MIDI playback quality was dependent on the sound card you were using. For example, my Creative Sound Blaster AWE 64 Gold (1996) on Windows 95 sounded fantastic because it was also using soundfonts, something most other cards did not support at the time.

Fast forward to today, most computers are fast enough to mix midi tracks in real time without the need for fancy hardware. By default, Windows will play MIDI files using a soundfont included with DirectX. It’s not fantastic, but easily beats FM synthesis. To use a larger soundfont you can use XMPlay and the available Midi plug-in, both available at the same location.

19 08 2010

Nice! Easy peasy lemon squeezy.

Thanks for the tip, much simpler solution than anything else I’ve seen!

2 01 2011
2010 in review « Linuxtechie's Blog

[...] How To: Ubuntu MIDI Playback with Audacious January 2008 16 comments 5 [...]

4 03 2012

Where does one configure the ALSA backend or the Fluidsynth backend?

20 09 2012

Reaper, you’re a real FUCKING JERK!! Everyone was a newbie at one time or another, including you. Not everyone’s a genius hacker, also including you. I did a Google search, and this where it took me. You Nut Wad. With your fucking attitude it’s no wonder new Linux users don’t like to ask for help. Asshole.

4 04 2013

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 25 other followers

%d bloggers like this: