\dashedStart with \RemoveEmpyStaves gives an error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

\dashedStart with \RemoveEmpyStaves gives an error

Schneidy
Hi all,
See herewith the structure I'd like to achieve.
Ideally, I'd like the startBar to be dashed.
works great until I add \RemoveEmptyStaves which gives an error.
Any idea?
TIA, cheers,
Pierre

dashed_pps.ly (3K) Download Attachment
dashed_pps.pdf (35K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: \dashedStart with \RemoveEmpyStaves gives an error

Thomas Morley-2
Am Sa., 8. Feb. 2020 um 17:42 Uhr schrieb Pierre Perol-Schneider
<[hidden email]>:
>
> 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 | Threaded
Open this post in threaded view
|

Re: \dashedStart with \RemoveEmpyStaves gives an error

Schneidy
Hi Harm,

Le sam. 8 févr. 2020 à 20:55, Thomas Morley <[hidden email]> a écrit :
[...]
with \daschedStart (note the "c") you will never succeed ;)
[...]

Ouch!... sorry for that ;)

Le sam. 8 févr. 2020 à 20:55, Thomas Morley <[hidden email]> a écrit : 
[...]
Anyway, if no stencil for SystemStartBar is created than relying on
that missing stencil will fail.
We need to check for it.

Well, a big thank you! 'Works perfectly.
Cheers,
Pierre