lilypond-user
[Top][All Lists]
Advanced

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

Re: Tweaking end-of-line time signature?


From: Neil Puttock
Subject: Re: Tweaking end-of-line time signature?
Date: Wed, 27 May 2009 00:28:46 +0100

2009/5/26 Trevor Bača <address@hidden>:

> A. Does anyone have a way of implementing adjustEOLMeterBarlineExtraOffset
> without recourse to extra-offset?

I don't think it's possible given the way break-aligned grobs are positioned.

> B. Does anyone have a semantic way of saying "align the last barline at the
> dead end of the compass of the staff ... with the time signature trailing
> afterwards in the whitespace beyond the staff"?

You can switch the ordering of the barline and time signature using
'break-align-orders, which means you'll only need to move the time
signature using 'extra-offset; by changing the callback to use
'X-extent instead of 'after-line-breaking, the time signature can be
positioned automatically at the edge of the barline:

adjustEOLMeterBarlineExtraOffset =
#(define-music-function (parser location) ()
   #{
     \once \override Score.BreakAlignment #'break-align-orders =
       #(make-vector 3 '(left-edge
                         ambitus
                         breathing-sign
                         clef
                         time-signature
                         staff-bar
                         key-cancellation
                         key-signature
                         custos))

     \once \override Score.TimeSignature #'X-extent =
       #(lambda (grob)
          (if (= (ly:item-break-dir grob) LEFT)
              (begin
                (ly:grob-set-property! grob 'extra-offset '(1 . 0))
                #f)
              (ly:stencil-extent (ly:time-signature::print grob) X)))
    #})

Regards,
Neil




reply via email to

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