Preamble: I read music to only a very basic level. As a small project to combine my (amateur) singing hobby with my (also amateur) interest in coding, I am trying to use Lilypond to reproduce as closely as possible the existing score of one of the songs we are currently learning, namely an arrangement of "Let the river run" (pdf available here). Another reason for using Lilypond is that I'm familiar with TeX and its derivatives so this approach appeals to me.

Through this project I hope to learn about musical theory and notation in a gentle and unstructured fashion. Obviously, if the goal were to learn as much as possible in as short a time as possible I would take a course, but that is not the aim.

I have hit a problem whereby staves are being hidden during the staggered start. For the first bar only the basses are singing, joined at the end of the second by the altos, then tenors in bar 3 and finally sopranos in bar 4. In the original score you can see that there are what I think are semibreve rests that "placemark" in the soprano score.

Original Original score

My attempt My score

P.235 of the notation manual states "A staff is considered empty when it contains only multi-measure rests, rests, skips, or a combination of these elements." I suppose by this benchmark the soprano staff is empty and is not being displayed? I note Keep_alive_together_engraver but that doesn't seem to do what I want.

\version "2.24.1"
\header {
  title = "A Test"
  composer = "A Composer"

SopranoMusic = \relative {
    \key fis \minor
    r1 |
    r1 fis'4
SopranoLyrics = \lyricmode {   }
AltoMusic = \relative { 
    \key fis \minor
    r1 |
    r1. fis'4
AltoLyrics = \lyricmode {  Oh | }

TenorMusic = \relative { a4 a a a }
TenorLyrics = \lyricmode { Te -- nor ly -- rics }
BassMusic = \relative {
    \clef "bass"
    \key fis \minor
    \time 4/4
    g16 g g g g16 r16 g16 g g16 g g8 r4 |
    g16 g g g g16 r16 g16 g g16 g g8 r4 |

BassLyrics = \lyricmode {
    Let16 the riv16-er run16 let16 the riv16-er16 run8 |
    Let16 the riv16-er run16 let16 the riv16-er16 run8
\include "satb.ly"


  1. How can I keep the soprano part displayed when it contains only rests?

  2. Out of interest, is there a way to use "4/4" instead of the "big C" as the time signature?

  3. Is there a straightforward want to shorten the stem of notes? I can see that in the original score the stems for the bass part extend down two notes whereas in my score they go down to the bottom of the stave.

  4. Why is the natural symbol appearing before the first note of the bass part, and can I suppress it?

I'm also grappling with lyric alignment but that may be better dealt with separately. Some of the problems I face are likely caused by my lack of understanding of musical notation as well as my lack of familiarity with Lilypond, so any suggestions or pointers on either would be much appreciated!

  • 2
    Aren't the notes in the original supposed to be A's in the bass part, and an E to start the alto part? You have them as G's and F#'s respectively. Was that intentional? May 20, 2023 at 12:34
  • 3
    This question seems to focus on showing staves. The other three assorted questions should be asked separately so they can be focused on(e.g., searched for in the future), no matter how small. May 20, 2023 at 15:31

2 Answers 2


You are including satb.ly which resides in [lilypond-installation/ly/satb.ly]. Here you’ve got the lines

\layout {
  \context {
    \override VerticalAxisGroup.remove-empty = ##t
    \override VerticalAxisGroup.remove-first = ##t

which tells Lilypond to remove all empty Staves (including the first one). If you do not want this behaviour you could make a copy of that file and remove these lines. If you do not want to do so you can still override this change by doing

\override Staff.VerticalAxisGroup.remove-empty = ##f
\override Staff.VerticalAxisGroup.remove-first = ##f

at the begin of the voice definitions in question, e.g.

SopranoMusic = \relative {
    \override Staff.VerticalAxisGroup.remove-empty = ##f
    \override Staff.VerticalAxisGroup.remove-first = ##f
    \key fis \minor
    R1 |

For more information on that mechanism read this part of the manual:


  • Ah, that's it; easier than I thought. I was trying to put those overrides is another layout block (which obviously doesn't make much sense). May 20, 2023 at 23:39
  • 1
    satb.ly supports setting a Layout variable to override the layout, so you could also just write Layout = \layout { } once at the top level (anywhere before the \include). That overrides anything else that might be in satb.ly's default layout, but currently there is nothing else there.
    – benrg
    May 21, 2023 at 2:39
  1. a) Full measure rests (of any value) should be typed in with capital R's. This make them centred in the bar. (So change all r1's to R1's)
    b) Where you have r1. fis'4 in the alto part, the rest is actually suppose to be a dotted mimim and not a dotted semibreve (notice how in the original, it sits on the barline below, rather than hanging from the bar line above), so change that to: r2. fis'4, or perhaps r2 r4 fis'4.
    c) You're missing the key signature (and a few rests) in the tenor part. Also, the notes are not right.

  2. I'm not sure what you mean by this point, the soprano part is displaying, (please clarify what you mean here).*

  3. To display the time signatures as "4/4" instead of "C", use the command \numericTimeSignature at the start of any one of the music blocks (say, after the key signature).

  4. Stems inside the staff "should be" this long (3½ stave spaces); they start an octave away from where they end. Yes you can override this (with \override Stem.details.beamed-lengths = #'(2)), but I wouldn't.

  5. The natural symbol is there because you have g's where the key signature is expecting g#'s, so change g16 g g g ... in the bass staff to gis16 gis gis gis ..., (or gis16 16 16 16 ... which is simpler to type.)
    EDIT: as pointed out in a comment, they are actually supposed to be a's not g's or g#'s, so a16 16 16 16 ....

  6. If you're lyrics are supposed to line up with the music you shouldn't have to specify the value of each word/syllable. To type in hyphenated words use -- between syllable, i.e. Let the riv -- er run let the riv -- er run |.


* Okay, so I've put in all these fixes, and you're right the empty staves for the soprano part etc. aren't being displayed. This is because the file satb.ly is hiding them for you. I don't use the provided templates (I make my own) and I don't really know how to override them (I tried a few things, but they didn't work). Since that is your main question in this post, if you want to keep using that template, you might have to wait for another answer.

  • Thank, very useful pointers May 21, 2023 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.