I'm a midi fan, but since I have a soundcard without the ability to load soundfonts in the memory, I looked constantly for a solution, which will make possible to listen midi. And I found timidity.
| So, the ability to listen midi files means at the same time the ability to edit midi files, and that's exactly what I'm pressing for. I've tried to play midi with timidity, and the result exceeded all my expectations. But the first difficulty for me was - not all sounds was on the right place or was missing at all. So first what I needed was a good midi map and soundfonts. First I've searched SuSE root tree and found some things under /usr/share/sounds/sf2, but their quality was not sufficiently even for purposes of listening and they was incomplete. Than I've found some really good soundfonts there (ftp://ftp.lysator.liu.se/pub/awe32), they have much fewer "gaps" and can be already used, but I don't know if they are completely GPL friendly. Finally, when I found two solutions - the timidity rpm from Arklinux and freepats (SuSE recommended), that containing all complete midi maps and all the soundfonts needed, I've understood how great fits the timidity for midi playing. And now I'll tell you, how to make a software midi synthesizer with timidity.
First, install the timidity with yast, apt or whatever you use. The SuSE version of timidity comes with enabled daemon support. If you want a simple solution, download for example ftp://ftp.lysator.liu.se/pub/awe32/soundfonts/2MBGMGS.SF2 this, save it anywhere and edit your /etc/share/timidity/timidity.cfg. Comment all uncommented lines and add a single line at and:
If you think it's enough for you with what concerns soundfonts, you don't need to do the following stuff with freepats and can through to the daemon making.
Two other solutions are similar to each other. I'll explain this on freepats example. First get http://freepats.opensrc.org/freepats-20060219.zip (this version is the latest for the moment this article is written in). Delete all the files in the /usr/share/timidity folder (or backup them, if you want) and extract contents of the freepats archive there. Create the /usr/share/timidity/timidity.cfg with the following content:
Check if file /etc/timidity.cfg exists and if no, create one with the single line in it
or symlink to the /usr/share/timidity/timidity.cfg
Now you already can play midi, try it and enjoy yourself
user@host:~> timidity filename.midi
In case with Arklinux timidity rpm you could extract (do not install the rpm!) soundfonts and timidity.cfg and do with them the same as with freepats.
So, next we will do from timidity a midi soft synthesizer avaliable for other apps. You can see how it works with the command
user@host:~> timidity -iA
TiMidity starting in ALSA server mode
Opening sequencer port: 128:0128:1128:2128:3
After this you can see in each midi application this ports and are able to use them. Now we may want to autostart timidity in daemon mode on the system start. For this we will create /etc/sysconfig/timidity with the line that contains timidity start options.
You might want to use oss instead of alsa for output:
Read timidity help for more usefull startup options.
Now create /etc/init.d/timidity and make it executable. The content of it is:
If you see no error messages, you can start to hear your favourite midis with Kmid or write you music with Rosegarden. If an error occurs, play around with timidity start options. For example for me was only alsa output worked, oss not at all. You may also try some other soundfonts for better sound. So good luck and much fun