Take the 2-minute tour ×
Music: Practice & Theory Stack Exchange is a question and answer site for musicians, students, and enthusiasts. It's 100% free, no registration required.

Using Lilypond, I'm engraving some music that consists of two parts that are repeated. The first repeated phrase contains an alternate ending. By default, Lilypond renders the MWE below:

\version "2.16.2"

\score {
\new Staff \relative c'' {
    \repeat volta 2 {
        a1 | a
    }
    \alternative{
        { b }
        { a }
    }

    \break

    \repeat volta 2 {
        c1 | c | c | c
    }
}
\layout {}
}

like this:

MWE rendered with Lilypond

This looks alright, except that I would like the second ending to have a double bar line ("||") after it. However, tweaking the MWE above in such a way that one would expect that to happen (\bar "||"\break\bar "|:") results in the same output. Removing the second bar and only putting the double bar before (or after) the break (eg. \bar "||"\break) results in:

Rendering of the tweaked MWE illustrating the problem

Lilypond doesn't seem to understand that it actually makes sense to have both bars (since I've manually inserted a break between the two measures).

Is there a way to force the bar engraver to output both bars?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Just after posting, I found the answer to my own question in the Lilypond Documentation. For version 2.16 (which I'm using):

In addition, you can specify "||:", which is equivalent to "|:" except at line breaks, where it gives a double bar line at the end of the line and a start repeat at the beginning of the next line.

so one would write:

\break\bar "||:"

For version 2.17 (unstable / development) it is currently:

In addition, you can specify ".|:-||", which is equivalent to ".|:" except at line breaks, where it gives a double bar line at the end of the line and a start repeat at the beginning of the next line.

eg:

\break\bar ".|:-||"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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