[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Jazz chords layout question
From: |
Thomas Morley |
Subject: |
Re: Jazz chords layout question |
Date: |
Sun, 14 Jul 2019 11:48:33 +0200 |
Hi Jacques,
Am So., 14. Juli 2019 um 01:30 Uhr schrieb Jacques Menu <address@hidden>:
>
> Hello Robin,
>
> Thanks, the result is already better, with the seconda volta at the right
> place after adjusting the parameter of \pseudoIndent.
>
> Didn’t find a way to hide the empty part of the staff to the left of it,
> stopStaff/startStaff didn’t help.
Basically Robin's code gives LeftEdge a stencil with x- and y-extent.
It's an (otherwise) empty-stencil, which should white-out the StaffSymbol.
Though, the y-extent is hardcoded to (cons -3 3). Which is does not
match StaffSymbol's y-extent here.
To watch the stencil you could add \showLeftEdge (as defined below) to
the call of 'pseudoIndent'
showLeftEdge =
\once \override Score.LeftEdge.after-line-breaking =
#(lambda (grob)
(ly:grob-set-property! grob 'stencil
(box-stencil
(ly:grob-property grob 'stencil)
0.2 0)))
Probably the most simple sollution is to have the y-extent as an
optional argument in 'pseudoIndent', making for:
% cheap alternative to \new Score; fragile wrt. Y positioning
pseudoIndent =
#(define-music-function (parser location y-ext indent) ((pair? '(-3 .
3)) number?)
#{
% \once \override Score.BarNumber.X-offset = #(- indent 2)
\once \override Score.LeftEdge.X-extent = #(cons 0 indent)
\once \override Score.LeftEdge.Y-offset = 0
\once \override Score.LeftEdge.stencil =
#(lambda (grob) (stencil-whiteout-box
(ly:make-stencil empty-stencil (cons 0 indent) y-ext)))
#})
Doing \pseudoIndent #'(-7 . 0) #55 works for me.
Though, as Robin already stated, the y-positioning _will_ stay
fragile, and may change with changing layout.
You likely will need to readjust #'(-7 . 0) frequently.
Cheers,
Harm