Before starting, the main pre-requesite is that your alsa drivers are working with your sound card. If you can't currently play an mp3 or record using a mic and the built in sound recorder then you should probably correct these base issues before going any further or you will be wasting a lot of your time. Also note that these instructions are for a system that has no dedicated midi hardware connected to it. If you have a working piece of midi hardware then you will probably not want to deal with fluid/qsynth.
One of the first things I had to do was disable pulseaudio which until recently I was blissfully ignorant of. This is because I only have one sound card built into my laptop and it seems pulseaudio doesn't share well. It also seems that pulseaudio was automatically installed somehow by default. The quick fix is to create a file named client.conf in the .pulse subdirectory of your home directory if it doesn't already exist (mine didn't) and to add a single line in it. I used vi to create/edit it like this ...
$ cd
$ vi .pulse/client.conf
In this file I added the following line ...
autospawn = no
To make sure your edit worked do this ...
$ cd
$ cat .pulse/client.conf
Which should produce the following output ...
autospawn = no
Then reboot your system. The changes will not take effect until you reboot your system (though some have mentioned you only need to log out then back in again for the changes to take effect).
BTW - Once I did this my desktop volume control didn't work anymore but it was necessary to get my system working. Like I said, the pay-off is such that I don't even care.
Next I used the synaptic package manager to install (a) jackd, (b) fluidsynth and (c) rosegarden (its under system ---> administration). Note that jack came with jack control (a GUI for Jack), and fluidsynth came with qsynth by default when I selected them using Synaptic.
Unfortunately, even if you have everything working by this point you will still not get any sound. This is because you will now need to prepare a soft font for your software synthesizer (fluid/qsynth). The final step is to download sfark from http://www.melodymachine.com/sfark.htm and then the annoying part is it can't just be untarred in one step you actually have to do this ...
$ gunzip sfarkxtc_lx86.tar.gz
$ tar xvf sfarkxtc_lx86.tar
Otherwise it won't work. Anyway, now that you have the sound font conversion utility you can download the Fluid R3 soundfont. It is available from the HammerSound Soundfont Library (http://www.hammersound.net/) (direct link (http://www.hammersound.net/cgi-bin/soundlink.pl?action=view_category&category=Collections&ListStart=15&ListLength=15)). Omce downloaded, use the sfark utility to decompress it (it actually took like 3 minutes on my laptop) like this ...
$ ./sfarkxtc FluidR3\ GM.sfAr
And it should produce a file with a .SF2 extension (note - i had to run it as sudo for some reason). Once you have your .SF2 file we are ready to go.
The exact sequence of steps necessary to get the Rosegarden studio up is as follows ...
(1) run Jack Control (it should be under applications ---> sound). If it is not running press 'Start' to start it,
(2) run qsynth (it should be under applications ---> other).
(3) on the qsynth panel near the lower left click 'Setup' then select the soundfonts tab. Press 'Open' and point to the .SF2 file we created.
(4) finally, start Rosegarden (applications ---> sound).
If you don't bring everything up in this exact order it usually doesn't work. Also, for some reason Rosegarden launches in a separate pane.
In Rosegarden you will want to click the Studio option, then 'manage midi devices'. Here you should see the qsynth device. It will say something like 'Synth input port (xxxx:x) write'. This is the device you must select for your tracks to play out the midi software synthesizer. If you point to a track and hold down the mouse button and select 'audio device 1' you should also be able to record audio using a standard mic. You can mix and match digital and audio tracks with ease. I have had no problem so far with 2 audio tracks and 4 digital tracks. I set Jack to 48000, 1024 with real-time 32 bit and it sounds just fine.
Note that the main reason for Jack used to be audio support but Rosegarden requires Jack these days and if it is not running Rosegarden will spawn it in some sort of default mode which I couldn't get working. I had to get Jack working properly for Rosegarden to come up. That was very important. This is why I started this entry describing how to disable pulseaudio; because I couldn't get Jack to work with pulseaudio. Good luck.