How to Get Rosegarden Sound Working on Fedora Core 7 (FC7)

There are some great Rosegarden tutorials on the Internet and even some specifically dedicated to making sound using Rosegarden, e.g. this sourceforge tutorial. However, it took me quite some time to discover how to do it easily, on FC7, so here are some short easy notes that are up to date as of mid-FC7, but do not require the user to understand all the complexities of Rosegarden, ALSA, Jack etc.

Of course, the simplest way of getting sound out of Rosegarden is just to export your composition to a MIDI file, then to use timidity++ (or another suitable MIDI synthesiser) to play it. This guide uses a relatively simple arrangement of just three programs, like this:-
Picture of how ALSA, Rosegarden and Jackd relate

I am assuming:
  1. That you're using Fedora Core 7 (FC7) with SELinux disabled.
  2. That you have an Internet connection so that you can use yum.
  3. That you are using KDE, since Rosegarden is a KDE application.
  4. That you do not have a sound card that supports MIDI directly.
1. Get the packages using yum
su -
yum install qsynth jack qjackctl lilypond rosegarden4 perl-XML-Twig
2. Edit the /etc/security/limits.conf file
The installation of jack will put this stuff at the bottom of your /etc/security/limits.conf file, meaning that only users in the jackuser group can use Jack.
## Automatically appended by jack-audio-connection-kit
@jackuser - rtprio 20
@jackuser - memlock 4194304
However, most users will want anyone to be able to use jack, so edit the file to look like this instead:
## Automatically appended by jack-audio-connection-kit
#@jackuser - rtprio 20
#@jackuser - memlock 4194304
*       -       rtprio 20
*       -       memlock 4194304
After this, you *must* reboot your system for the security-related real-time sound changes to take affect.

3. Get some sound fonts and install them in Qsynth
The tutorial that I referred to above suggests getting some sound fonts from here.

Unzip them and load them into Qsynth like this:
Qsynth setup menu to load sound fonts

4. Match settings in Jack and Qsynth
Here are some settings for qjackctl and qsynth that seem to work for me using an AMD 64 3500 (64 bit) on FC7 with a kernel-2.6.23.8-34.fc7 kernel. The important thing is to make qsynth and jack compatible with each other, or you will get no sound. Start qjackctl and qsynth from the KDE menus in that order.

qjackctl setup with command: artsshell -q terminate
Note the command 'artsshell -q terminate' in the qjackctl setup window above. This is useful because it kills the KDE sound daemon that would otherwise prevent jackd from talking directly to ALSA (in other words you would get no sound, and perhaps an error message.)
Also, and this is important, make sure that the 'Start JACK audio server on application startup' box is ticked under the Misc tab in the qjackctl setup.

qjackctl setup with Force=16bit and SampleRate=48000 entries
The entries 'Force 16bit' and SampleRate=48000 particularly need to match in qjackctl and qsynth. Others may require some experimentation to get your sound sounding good. The entry, Interface=hw:0, will often make the difference between sound and nosound.

qsynth setup with MIDI input enabled
Remember to enable MIDI input in qsynth. That's what it's for :).

qsynth setup with auto-connect Jack selected
The entry 'Auto-connect Jack Outputs' will enable you to start jack, Rosegarden and qsynth such that all the connections via jackd get made automatically. This saves a lot of hassle.

5. Check that the Rosegarden settings are sensible
Rosegarden setup using jackd transport
Tell Rosegarden to use the Jack transport.

Rosegarden setup not starting jackd automatically
No need to tell Rosegarden to start jack, as we will see in a minute. N.B. that the Jack Command is not needed if this guide is followed fully.

6. Test your Rosegarden, Jack and Qsynth Set-ups
From the KDE menus, start in this order: qjackctl, qsynth and rosegarden. There should be no error messages. The jackd transport should start automatically. Load a file into Rosegarden and hit the play button. The MIDI output from Rosegarden will immediately become sound! :) If not, turn on the log files in qjackctl and qsynth and start debugging or googling. If you get xruns in the jack log file and horrid sound quality, you either need to fiddle with the jack and qsynth setups, or you need a faster processor :(

7. Make Rosegarden, Qsynth and Jack start and stop together with a single click
Of course, if you start all three programs from the KDE menus, you have to do it in the right order. Then you have to kill them all individually too, which is a bit of a pain. Here is a script that can be run from a KDE icon easily. It starts and stops all three programs nicely:
#!/bin/sh
# V1.0 DWL 22/12/2007
qjackctl &
sleep 2         # Wait for qjackctl to start jackd
qsynth &
rosegarden --nofork
#
# Kill qjackctl, jackd and qsynth when rosegarden exits.
ps -ef | grep qsynth | grep -v start | awk '{print "kill -15 " $2}' | sh
ps -ef | grep jack   |                 awk '{print "kill -15 " $2}' | sh
exit;

Remember to chmod 755 the script and to reference it from a KDE icon so that you can start Rosegarden and its friends together.

Please send any improvements to this guide to dwlegg a t gmail d o t com.


Back to Main Menu Examples of Rosegarden files and MIDI files on this site: Father of Mercies Immortal Honours Our God, Our Help in Ages Past

Valid HTML 4.0 Transitional