[nSLUG] Audio playback in Rosegarden on ubuntu lucid

Ryan Neily ryan at webpipe.ca
Wed Sep 7 11:06:49 ADT 2011

Hello All,

Most of the time I lurk :^) However, the recounting of my adventure
getting Rosegarden to perform on my linux powered netbook is something I
think might be of interest here on the list. So on a dark and stormy
night... I would use Linux to make multimedia on my computer. My
filmmaking workflow includes Cinelerra, Kino, ffmpeg, Audacity and
Blender,... oh and Open Office for scriptwriting. Two of my films,
Danger Dead End & le violon d'ingres, have been to film festivals.

A windfall of the right size enabled me to buy an EeePC netbook just
because.  My distro of choice to put on it was Ubuntu. After awhile I
switched from the regular Ubuntu cycle to the LTS (long term support)
upgrade route continuing to use the Generic kernel.

To date I have depended on others for my film scores. Now my ambition is
to tackle sound-scape composition myself on a digital audio workstation
or DAW as it is known by it's acronym. My investigations revealed
Rosegarden to have such desirable features as the use natively of
classic music notation and a spectrogram display, woohoo :^) Serious
motivation here. 

To install and run Rosegarden requires jackd. 
I installed and got jackd running with the assistance of readily found

These sound applications all tie in together. Consequently the order of
startup is important; jackd first, and in this case, Rosegarden
following in a client server relationship. Rosegarden worked fine except
it would not play back the sound. Definitely an obstacle to happiness. 

No play back seems to be a common stumbling block to the use of
Rosegarden. The documentation on how to deal with it is quite sparse as
well. Shouldn't Rosegarden play back sound right out of the box? That
being said, this is what has worked on my EeePC netbook using ubuntu

Fire up Synaptic and install a realtime kernel. Rosegarden requires a
default 1000HZ setting instead of the now default 250HZ to be fast
enough to process a midi file. The pre-emptive RT kernel is set to the
required 1000HZ.

My present LTS set up:

Ubuntu 10.04 (lucid)
kernel 2.6.31-11-rt (#154-Ubuntu SMP PREEMPT RT Wed Jun 9 12:28:53 UTC

Rosegarden does not itself play the music but needs a synthesizer to do
so. The docs recommended QSynth which is a frontend for fluidsynth.
Timidity was also suggested. The conversion feature, midi to wav etc.
tipped my choice to Timidity. Like Jackd, Timidity was also easily
installed using readily available documentation. Once Jackd, Timidity
and Rosegarden are all installed test each application just to make sure
they pass the run test.   

http://www.linuxquestions.org/questions/linux-software-2/quick-rosegarden-jack-timidity-howto-437834/ there was a script found using the search keys jackd timidity rosegarden. The script provided, with a few adjustments, the basis for a playback enabled Rosegarden.

sleep 3
timidity -iA -B2,8 -Oj&
sleep 3

Note that the parameters for Timidity in the script are significant.

Following is the script with changes appropriate to my system etc. 



/usr/bin/killall rosegarden
/usr/bin/killall timidity
/usr/bin/killall jackd
/usr/bin/killall qjackctl.bin

 /usr/bin/qjackctl --start & 
if [ $? = 0 ]
/bin/sleep 5
/usr/bin/timidity -iA -B2,8 -Oj &
/bin/sleep 3
/usr/bin/rosegarden --nosplash 2>/dev/null &
 echo "failed"

exit $fail

The above script starts by killing off all the apps in the chain so as
to have a clean slate. Jackd has to be finished firing up and listening
when Timidity starts for example. The parameters need to be set. -iA
( Input alsa ) -B2,8 (2 channels 8 bit) -Oj (output jackd). With the
supporting applications running it is time to open Rosegarden. 

My satisfaction level is high getting Rosegarden operating. To use all
the features of rosegarden is to use Rosegarden in concert or chain with
other applications. This means getting a handle on how jackd connects
everyone and channels the treasure where it is most harmonious. Making
my way through a jackd HOWTO just went on my todo list :^)

Ryan A Neily

More information about the nSLUG mailing list