Once again - spot on! I will try to learn from such examples so that I don't need to leech like this in the future...
Thanks, Paul On 22/08/2021 17:16:48, "Thomas Morley" <thomasmorle...@gmail.com> wrote: >Am So., 22. Aug. 2021 um 13:42 Uhr schrieb Paul Hodges <p...@cassland.org>: >> >> Encouraged by the fantastic responses to my first problem, I now offer my >> other issue. >> >> The composer uses a special barline to mark the phrase pattern of a piece. >> The form of this barline is like this: >> (MS) https://cassland.org/images/PhraseBarMS.jpg >> (Printed elsewhere) https://cassland.org/images/PhraseBarSet.jpg >> >> In this case I can't even think where to start... >> >> Thanks, >> Paul > >How about: > >%% Define a new bar-line drawing-procedure >#(define (make-thick-phrase-bar-line grob extent) > "Draw a smaller thick bar line." > (let* ((line-thickness (layout-line-thickness grob)) > (thick-thickness (* (ly:grob-property grob 'thick-thickness 1) > line-thickness)) > (inner-extent > (interval-widen extent (- (ly:staff-symbol-staff-space grob)))) > (final-extent-thick > (bar-line::widen-bar-extent-on-span grob inner-extent))) > > (bar-line::draw-filled-box > (cons 0 thick-thickness) > final-extent-thick > thick-thickness > final-extent-thick > grob))) > >%% Assign "p" to the new bar-line drawing-procedure >#(add-bar-glyph-print-procedure "p" make-thick-phrase-bar-line) > >%% Define a ready to use new BarLine >#(define-bar-line "p|" "p|" #f " |") > >\layout { > \context { > \Score > %% Actually not really needed: > \override BarNumber.break-visibility = ##(#t #t #t) > \override BarNumber.self-alignment-X = 0 > } > \context { > \Staff > %% Needed: > %% If "p|"-BarLine is used, set 'kern to zero. > \override BarLine.before-line-breaking = > #(lambda (grob) > (if (equal? (ly:grob-property grob 'glyph) "p|") > (ly:grob-set-property! grob 'kern 0))) > } >} > >\new StaffGroup > << > \new Staff { b1 \mark \default \bar "p|" b \break \bar "p|" b } > \new Staff { b1 b b } > >> > > > >HTH, > Harm