2

I am currently working on a Christmas setlist for bagpipes. The second ending doesn't seem to count the note from the previous measure and as a result, it shifts the high a eight note to the next measure, which adjusts ever measure after that. Is there a way to adjust my code so the high a is part of the second ending and the next note starts a new measure? Here is my current version:

\version "2.18.2"
\include "bagpipe.ly"

\header {

  title = "O Christmas Tree"
  composer = "German Carol"
  }

\score {
  { 
    \time 3/4
    \hideKeySignature
    \tempo "Adante moderato" 4 = 72

    { 
      \repeat volta 2 {
      \partial 4 a4
      \thrwd d8. \grg d16 \grc d4 e4
      \grg f8. \gre f16 \grg f4. \gre f8
      \grg e8 f8 \dblg g4 c4|
      \grg e4|}
          \alternative {
            {\thrwd d4|} % First ending
            {\thrwd d4. A8|} % Second ending
          }
      \grg A8 f8 b4. A8
      \grg A8 g8 \grA g4. \grf g8
      \grA g8 e8 \dblA A4. g8
      \grA g8 f8 \gre f4 a4
      \thrwd d8. \grg d16 \grc d4 e4
      \grg f8. \gre f16 \grg f4. \gre f8
      \grg e8 f8 \dblg g4 c4
      \grg e4 \thrwd d2 \bar "|."
    } 
  }
  \layout {indent =  0.0\cm}
} % end score
1

The solution can be found hidden in the documentation on this page in a section beginning "When alternate endings are added..."

In short, we have to tell LilyPond to change some measure lengths. For the first ending, we have to specify \set Timing.measureLength = #(ly:make-moment 2/4); then we return to \set Timing.measureLength = #(ly:make-moment 3/4) for the second ending.

Thus in order to compile this:

enter image description here

...you would use the following code. Note that I cleaned it up a bit, and decided to include the initial e4 of the repeat as a part of the volta.

\version "2.18.2"
\include "bagpipe.ly"

\header {
  title = "O Christmas Tree"
  composer = "German Carol"
  }

\score {
  { 
    \time 3/4
    \hideKeySignature
    \tempo "Andante moderato" 4 = 72

    { 
      \repeat volta 2 {
      \partial 4 a4
      \thrwd d8. \grg d16 \grc d4 e4
      \grg f8. \gre f16 \grg f4. \gre f8
      \grg e8 f8 \dblg g4 c4 | }
      %\grg e4|} % I removed this to include this E in the volta itself
          \alternative {
            { 
              \set Timing.measureLength = #(ly:make-moment 2/4)
              \grg e4 \thrwd d4 | } % First ending
            { 
              \set Timing.measureLength = #(ly:make-moment 3/4)
              \grg e4 \thrwd d4. A8 | } % Second ending
          }
      \grg A8 f8 b4. A8
      \grg A8 g8 \grA g4. \grf g8
      \grA g8 e8 \dblA A4. g8
      \grA g8 f8 \gre f4 a4
      \thrwd d8. \grg d16 \grc d4 e4
      \grg f8. \gre f16 \grg f4. \gre f8
      \grg e8 f8 \dblg g4 c4
      \grg e4 \thrwd d2 \bar "|."
    } 
  }
  \layout {
    indent =  0.0\cm
  }
}
% end score

If you really liked not having the initial e4 in the volta, you can change it to:

\version "2.18.2"
\include "bagpipe.ly"

\header {
  title = "O Christmas Tree"
  composer = "German Carol"
  }

\score {
  { 
    \time 3/4
    \hideKeySignature
    \tempo "Andante moderato" 4 = 72

    { 
      \repeat volta 2 {
      \partial 4 a4
      \thrwd d8. \grg d16 \grc d4 e4
      \grg f8. \gre f16 \grg f4. \gre f8
      \grg e8 f8 \dblg g4 c4 |
      \grg e4 }
          \alternative {
            { 
              \set Timing.measureLength = #(ly:make-moment 1/4)
              \thrwd d4 | } % First ending
            { 
              \set Timing.measureLength = #(ly:make-moment 2/4)
              \thrwd d4. A8 | } % Second ending
          }
      \set Timing.measureLength = #(ly:make-moment 3/4)
      \grg A8 f8 b4. A8
      \grg A8 g8 \grA g4. \grf g8
      \grA g8 e8 \dblA A4. g8
      \grA g8 f8 \gre f4 a4
      \thrwd d8. \grg d16 \grc d4 e4
      \grg f8. \gre f16 \grg f4. \gre f8
      \grg e8 f8 \dblg g4 c4
      \grg e4 \thrwd d2 \bar "|."
    } 
  }
  \layout {
    indent =  0.0\cm
  }
}
% end score

Which compiles:

enter image description here

But you'll notice that that changes the measure numbering; this is one of the reasons I think it's easier to include the e4 in the volta.

1
  • You should notallow the second version, because it's unexpected and difficult to read that the First Repeat is only part of the measure. The first ending is allowed to "include" the opening A to complete, although even there I as a musician would far prefer that there be a "start repeat" marking after the first partial measure, and then stick an A into the first repeat to fill that measure as well. – Carl Witthoft Nov 14 '19 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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