lilypond-user
[Top][All Lists]
Advanced

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

Re: \dashedStart with \RemoveEmpyStaves gives an error


From: Thomas Morley
Subject: Re: \dashedStart with \RemoveEmpyStaves gives an error
Date: Sat, 8 Feb 2020 20:55:36 +0100

Am Sa., 8. Feb. 2020 um 17:42 Uhr schrieb Pierre Perol-Schneider
<address@hidden>:
>
> Hi all,
> See herewith the structure I'd like to achieve.
> Ideally, I'd like the startBar to be dashed.
> This coding: 
> http://lilypond.1069038.n5.nabble.com/dashed-initial-barline-with-SystemStartBar-td51231.html
> works great until I add \RemoveEmptyStaves which gives an error.
> Any idea?
> TIA, cheers,
> Pierre

Hi Pierre,

with \daschedStart (note the "c") you will never succeed ;)
Anyway, if no stencil for SystemStartBar is created than relying on
that missing stencil will fail.
We need to check for it.

Likely:

dashedStart = \override Score.SystemStartBar.stencil =
#(lambda (grob)
  (let* ((stencil (ly:system-start-delimiter::print grob)))
    (if (ly:stencil? stencil)
        (let* ((stencil-y-extent
                 (ly:stencil-extent stencil Y))
               (line-thickness
                 (ly:staff-symbol-line-thickness grob))
               (new-stencil-extent
                 (interval-widen stencil-y-extent (* -0.5 line-thickness)))
               (thickness (ly:grob-property grob 'thickness))
               (grob-thickness
                 (* line-thickness thickness)))
          (make-dashed-system-start-bar grob new-stencil-extent grob-thickness))
        '())))

Cheers,
  Harm



reply via email to

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