Learning Rosegarden

The Rosegarden Notation Challenge

Copyright © 2008 D. Michael McIntyre

This tutorial was written using Rosegarden 1.7.1.

Musical Flow Control with Rosegarden and LilyPond

Rosegarden is a sequencer merged with score editor in a novel way that has never been done anywhere else. It is actually very difficult to merge a sequencer as capable as Rosegarden with a notation editor as capable as Rosegarden. We have been very successful at accomplishing things that seemed downright crazy on the surface, but we have been unable to come up with a tidy resolution to one large conflict of interest between the sequencer domain and the notation domain.

Namely, how do we handle "flow control" in Rosegarden? How do we make repeats with alternate endings, segnos, codas, and that sort of thing work? We considered many different ideas, but in the end, we never implemented any of them, because they were too mind-bendingly difficult and complicated. In a pure notation editor, this job is easy, because an application like MusE Score or Canorus stores notation events as symbols on a page, and then interprets them into MIDI at playback time. Rosegarden stores metaevents that contain both MIDI-related and notation-related properties, and it is not possible to have one without the other. The disadvantage of the Rosegarden approach becomes especially apparent when dealing with the issue of flow control, but the extra burden this places on the composer is offset by the power Rosegarden offers to produce one composition file that both sounds appealing to the ear and looks good to the eye; particularly with the help of our good friend LilyPond.

In order to deal with flow control (as well as a number of other special cases) I hijacked the Text tool in the notation editor, and added a special new class of text events called "LilyPond Directives."e; These directives are interpreted at export time in order to produce appropriate music notation by way of LilyPond. Unfortunately, in order to hear how a composition will actually sound, it is necessary to maintain two separate copies of the events. One compressed version for printing, and one version that is stretched out on the time axis for proper playback.

This must be accomplished using two voices, so there are two sets of whole notes, and two phrasing slurs. It is easiest to work with the voices on separate tracks initially, so let's create two segments each four bars long on adjacent tracks:

Now Ctrl+A and N to open in a combined notation view:

Now enter the whole notes in each staff:

Finally, select all the whole notes on the top staff...

Then use Ctrl+) or Phrase -> Add Phrasing Slur on the top staff, then the bottom:

With the bottom still selected, use Phrase -> Slur Position -> Slur Below (there is no shortcut for this one) to flip the lower slur down:

Finally, drag the lower segment on top of the upper one, then Ctrl+A and N again to view the segments overlapping on the same staff, and do a File -> Preview with LilyPond to confirm the match:

The "zu 2" Dynamic

The Fidelio example also includes an unusual dynamic. I just doctored the LilyPond export to make it possible to export arbitrary texts like this as a markup, instead of filtering out dynamic types that LilyPond doesn't recognize.