Introduction
This HOWTO is work in progress. Ideally I'd like a set of commands that work universally for everyone with a soundcard that has a hardware synthesizer and works with ALSA or OSS. So far I have only been able to try this on two machines but have had success with both. I would like to hear if anyone else has any success or problems with these commands but please ensure you know your card works with ALSA or OSS and has a hardware synthesizer if your card does not have both please seek help elsewhere on the forums.
Setting up the Midi
Open up a Terminal (alt+f2 then gnome-terminal) and enter the following commands:
Code:
sudo modprobe snd_seq_midi
sudo modprobe snd_emux_synth
sudo modprobe snd_emu10k1_synth
sudo apt-get install awesfx;asfxload
"asfxload soundfont.sf2" for ALSA or "sfxload soundfont.sf2" for OSS
NOTE: Where soundfont.sf2 is the soundfont file you wish to use, many sound fonts can be found at http://www.hammersound.net. I use Fluid - Release 3 [68.5MB] but this is down to preferance, you may like the sound of other sound founts better. One thing to look out for when choosing is to ensure your sound font is organized according to the GM (General Midi) standard for instruments. Sound fonts will normally mention GM in their description or title if they are.
Adding the modules to statup automatically
If this works for you, you will want to have these modules load at startup. Add the following to the bottom of /etc/modules (NOTE: This file will need root permissions so use sudo nano /etc/modules or sudo gedit /etc/modules):
Code:
snd_seq_midi
snd_emux_synth
snd_emu10k1_synth
Currently Tested With
If you have tried the above commands and they worked for you please give feedback and post the make and model of your card so that when others come to search for their card and enabling midi they should come across this post, Thanks.
- Sound Blaster Audigy 2 ZX
- Sound Blaster Audigy 2 Platinum
- Sound Blaster Live!
Extra Help
If you have downloaded an sfArk SoundFont
If your soundfont is in sfArk format (which is a compressed losless format for soundfont files), you will need to decompress (extract) it before use. This can be done with a simple utility found which can be found at: http://melodymachine.com/sfark.htm. This program is very simple to use and instructions on it's use can be found within the programs download. If your file extracts as anything other than a soundfont (*.sf2) i.e. *.exe you will not be able to use it so simply try another soundfont file.
Playing Midi with pMidi
This next step is optional, if you already have a player capable of playing Midi files use that instead, since I had no player capable of playing midi to test the Midi support I downloaded a simple command line midi player for ALSA, pmidi.
Code:
sudo apt-get install pmidi
pmidi -l
pmidi -p x : x midifile.mid
NOTE: pmidi -l gives you a list of possible out put ports, I used the port "Emu10k1 Port 0" but you may need to use another. You then use these ports with the -p option. e.g. pmidi -p 65:0 midifile.mid where midifile.mid is the name of your midifile.