MackDaddy
MackDaddy

Reputation: 601

LilyPond missing repeat bar end line

New to LilyPond and trying to use it to transcribe some bagpipe music. In this score there are two sets of repeats, however it is not adding the repeat bar end to the first, only the second. Even if I try to force it with \bar ":|." it is just ignored.

\score {
  \header {
  }

  {
    \clef "treble"
    \time 3/4
    \hideKeySignature

    \repeat volta 2 { 
      \bar ".|:"
      \grg a8. b16 \dblc c4 \grg e
      \grg a8. b16 \dblc c4~ c4
      \dblb b8 \grG a \dblb b4~ b4
      \grg c16. b32 \grg a16. b32 \dblc c4~ c4
      \break
      \grg a8. b16 \dblc c4 \grg e
      \grg a8. b16 \dblc c4~ c4
      \dblb b8 \grG a \dblb b4 \thrwd d4
      \dblc c8. b16 \grg a4~ a4
      %% No bar end repeat line here?
    }
    \break
    \repeat volta 2 {
      \bar ".|:"
      \thrwd d8. e16 \grg f4 A
      \grf g8 f \dble e4~ e4
      \thrwd d8 c \dblb b4~ b4
      \grg c16. b32 \grg a16. b32 \dblc c4~ c4
      \break
      \thrwd d8. e16 \grg f4 A
      \grf g8 f \dble e4~ e4
      \thrwd d8 c \dblb b4 \thrwd d4
      \dblc c8. b16 \grg a4~ a4
    }
  }
}

This code produces this. Where I would like repeat bar end marking to go after the second line.

Upvotes: 1

Views: 210

Answers (2)

Elements In Space
Elements In Space

Reputation: 318

The reason that you aren't getting the repeat barline at the end of the first section, is that you are forcing the barline to be: \bar ".|:".

LilyPond is using this as the barline definition for not only the start of the second section, but also for the end of the first section; LilyPond considers this to be a single barline event (as you'd expect if there wasn't at a line break here).

If you really want to force the repeat barline definition in the middle of the piece (between the repeated sections), you should use the compound barline: \bar ":|.|:".


However, in this case it much easier if you don't force the barline at all; remove this line and the \repeat volta commands will get the barlines right without it.

Upvotes: 1

ksnortum
ksnortum

Reputation: 3057

This seems to work. It has something to do with forcing the bar lines.

\version "2.20.0"
\include "bagpipe.ly"

\score {
  \header {
  }

  {
    \clef "treble"
    \time 3/4
    \hideKeySignature

    \repeat volta 2 { 
      \bar ".|:"
      \grg a8. b16 \dblc c4 \grg e
      \grg a8. b16 \dblc c4~ c4
      \dblb b8 \grG a \dblb b4~ b4
      \grg c16. b32 \grg a16. b32 \dblc c4~ c4
      \break
      \grg a8. b16 \dblc c4 \grg e
      \grg a8. b16 \dblc c4~ c4
      \dblb b8 \grG a \dblb b4 \thrwd d4
      \dblc c8. b16 \grg a4~ a4
      %% No bar end repeat line here?
    }
    \break
    \repeat volta 2 {
      %\bar ".|:"
      \thrwd d8. e16 \grg f4 A
      \grf g8 f \dble e4~ e4
      \thrwd d8 c \dblb b4~ b4
      \grg c16. b32 \grg a16. b32 \dblc c4~ c4
      \break
      \thrwd d8. e16 \grg f4 A
      \grf g8 f \dble e4~ e4
      \thrwd d8 c \dblb b4 \thrwd d4
      \dblc c8. b16 \grg a4~ a4
    }
  }
}

Notice that I included the "bagpipe.ly" file and I have a version number. Be sure to post complete working examples in the future.

Upvotes: 0

Related Questions