Hi Kira,

Am 10.09.21 um 00:28 schrieb Kira Garvie:
Another question! Sorry for the photo: I’m in a cafe with no internet at the moment. I need to get the alto rests at the end of the bar out of the way of the soprano. The alto is \voiceTwo, the soprano is \voiceOne. What I found online was for multi measure rests of a long duration, these aren’t the whole measure and are very short.

Welcome to LilyPond! :-)

It's a bit hard to tell exactly what happened in your case, since LilyPond should take care of reasonable positioning of the rests automatically. While the solutions given by others (forcing rest positions) should work, they are "hackish" in a sense since they force you hard-code things that should better be left to the layout engine.

I entered some bars of your example in a way that is compilable with 2.16.2:

\version "2.16.2"

\layout {
  \autoBeamOff
}

\new Staff
<<
  \relative bes' {
    \key bes \major
    bes4 bes \oneVoice r8. \voiceOne a16 bes8. c16 |
    d4 d \oneVoice r8. \voiceOne f,16 f8. f16 |
    g4 es' d c |
    bes2. \oneVoice r8.
    \bar "|."
  } \\
  \relative c' {
    cis4 cis s8. r16 r4 |
    f4 f s8. f16 f8. f16 |
    es4 g f es |
    d2. s8.
  }
>>

But note that 2.16.2 is really really really old (released at the beginning of 2013), and while entering the above code, I sorely missed the many simplifications made possible in more current versions: Now we may replace

\oneVoice r8. \voiceOne

by

\once\oneVoice r8.

But what's even better: Now we have the Merge_rests_engraver that allows us to enter each voice using the proper rests!

\version "2.22"

\layout {
  \context {
    \Staff
    \consists Merge_rests_engraver
  }
  \autoBeamOff
}

\new Staff
<<
  \relative bes' {
    \key bes \major
    bes4 bes r8. a16 bes8. c16 |
    d4 d r8. f,16 f8. f16 |
    g4 es' d c |
    bes2. r8.
    \bar "|."
  } \\
  \relative c' {
    cis4 cis r8. r16 r4 |
    f4 f r8. f16 f8. f16 |
    es4 g f es |
    d2. r8.
  }
>>

By the way: I thought a bit about the first bar of my example: I actually would prefer writing cis4 cis r2 in the alto, but I admit that this actually might need some manual improvement of the rest positions in order to be perfectly sight-readable:

\version "2.22"

\layout {
  \context {
    \Staff
    \consists Merge_rests_engraver
  }
  \autoBeamOff
}

\new Staff
<<
  \relative bes' {
    \key bes \major
    bes4 bes \tweak Y-offset 0 r8. a16 bes8. c16 |
    d4 d r8. f,16 f8. f16 |
    g4 es' d c |
    bes2. r8.
    \bar "|."
  } \\
  \relative c' {
    cis4 cis \tweak Y-offset -3.5 r2 |
    f4 f r8. f16 f8. f16 |
    es4 g f es |
    d2. r8.
  }
>>
)

Of course I do not no the reasons the folks at hymnary.org have for insisting on using an antique version of LilyPond. If they need help updating their old scores for use with current versions on LilyPond, I'd be confident they get all the help they need on this mailing list.

Best
Lukas


Reply via email to