lilypond-user
[Top][All Lists]
Advanced

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

Re: Special handling for .|:-|| barline type?


From: Thomas Morley
Subject: Re: Special handling for .|:-|| barline type?
Date: Fri, 1 May 2015 01:04:05 +0200

2015-05-01 0:16 GMT+02:00 Steven Weber <address@hidden>:
> I’m monkeying around with how barlines are displayed, and I’ve run across a
> problem with repeats at breaks (double bar on the previous line, start
> repeat sign on the start of the next line).  Whenever I attempt to override
> the stencil in any way, I lose the || bar at the end of the line (it gets
> replaced with another .|: bar).
>
>
>
> Minimal example attached – any suggestions on what I need to do to maintain
> the .|:--|| behavior?  Is this a case where I’d have to use
> before/after-line-breaking?
>
>
>
> Thanks!
>
>
>
> --Steven

It's the engraver causing the problem, more precisely the
stencil-setting. Not sure why, though.

You can do:

\version "2.18.2"
\language "english"


bar-highlight-engraver =
#(lambda (context)
  `((acknowledgers
     (bar-line-interface
         . ,(lambda (engraver grob source-engraver)
             (ly:grob-set-property! grob 'before-line-breaking
                (lambda (g)
                   (ly:grob-set-property! g 'stencil
                     (ly:stencil-in-color
                       (ly:bar-line::print g)
                       1 0 0 )))))))))


\layout {
  \context {
    \Staff
    \consists #bar-highlight-engraver
  }
}

\new Staff {
  \clef bass
  \time 4/4
  \key c \major

  \repeat unfold 5 { a,4 b, c d | }
  \bar ":|.|:"
  %\bar ".|:-||"
  \break
  \repeat volta 2 {
    \repeat unfold 5 { d c b, a, | }
  }
}

Cheers,
  Harm



reply via email to

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