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
Now load it into the sound card with asfxload
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. 😆