[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom Barline
From: |
Paul Hodges |
Subject: |
Re: Custom Barline |
Date: |
Sun, 22 Aug 2021 17:50:25 +0100 |
User-agent: |
eM_Client/8.2.1473.0 |
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" <thomasmorley65@gmail.com>
wrote:
>Am So., 22. Aug. 2021 um 13:42 Uhr schrieb Paul Hodges <pwh@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
- Stems for rests under quaver beam, Paul Hodges, 2021/08/22
- Re: Stems for rests under quaver beam, Kevin Barry, 2021/08/22
- Re: Stems for rests under quaver beam, Thomas Morley, 2021/08/22
- Re: Stems for rests under quaver beam, N. Andrew Walsh, 2021/08/22
- Custom Barline, Paul Hodges, 2021/08/22
- Re: Custom Barline, ole, 2021/08/22
- Re: Custom Barline, Valentin Petzel, 2021/08/22
- Re: Custom Barline, Thomas Morley, 2021/08/22
- Re: Custom Barline,
Paul Hodges <=
- Re: Custom Barline, ole, 2021/08/22
- Re: Custom Barline, Paul Hodges, 2021/08/22