lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \defineBarLine confusion


From: Hans Aikema
Subject: Re: \defineBarLine confusion
Date: Mon, 18 Apr 2022 09:10:04 +0200



On 18 Apr 2022, at 06:56, Mark Probert <mark@archsys.net> wrote:


Hi.

I am confused as to why the following doesn't work as expected. I am
thinking the closing repeat, within the alternative 1, should have
"ears" yet it doesn't. Have I not understood the \defineBarLine
correctly? Or is there something else here?

(I do note if I put a \break at the end of alternative 1 then the
bar-with-ears appears, but I don't want that all the time.)

Any help appreciated.

.. mark.

---

\version "2.22"

\defineBarLine ".|:" #'("" "[|:" "")
\defineBarLine ":|." #'(":|]" "" "")

melody = \relative c'' {
 \clef treble
 \bar ".|:"
 \repeat volta 2 {
   a4 b c d~ |
 }
 \alternative {
   { d2 r2 | }
   { d2.\repeatTie r4 \bar "|." }
 }
}

\score {
 \new Staff      \melody
}


Assuming that you want all reapeats with ears see https://lilypond.org/doc/v2.22/Documentation/snippets/repeats

The proper way would be overriding the default barlines for repeats in the Score context (and you typically would want to include the double repeat just in case you have to volta repeats back-to-back):

\layout {
  \context {
    \Score
    %% Changing the defaults from engraver-init.ly
    startRepeatType = #"[|:"
    endRepeatType = #":|]"
    doubleRepeatType = #":|][|:"
  }
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]