Vertical spacing of numeric time signature

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

Vertical spacing of numeric time signature

mskala
Is there any simple way to modify the vertical spacing between numerator
and denominator in a numeric time signature?

--
Matthew Skala
[hidden email]                 People before tribes.
https://ansuz.sooke.bc.ca/

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Vertical spacing of numeric time signature

Malte Meyn-3


Am 09.05.19 um 16:53 schrieb [hidden email]:
> Is there any simple way to modify the vertical spacing between numerator
> and denominator in a numeric time signature?
>

Not really simple. But it can be done by redefining the stencil:

\version "2.21.0"

#(define (fraction-with-gap gap)
    (lambda (grob)
      (let* ((frac (ly:grob-property grob 'fraction))
             (num (car frac))
             (den (cdr frac))
             (fontsize (magnification->font-size (/ (- 4 gap) 4)))
             (baseline-skip (+ 2 (/ gap 2)))
             (m (markup
                 #:vcenter
                 #:fontsize fontsize
                 #:override `(baseline-skip . ,baseline-skip)
                  #:center-column (#:number (number->string num)
                                    #:number (number->string den)))))
        (grob-interpret-markup grob m))))

{
   % The number 0.5 can be changed. It’s the size of the gap in
staff-spaces.
   \override Staff.TimeSignature.stencil = #(fraction-with-gap 0.5)
   \time 3/4
   s2.
   \time 5/4
   s4*5
}

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Vertical spacing of numeric time signature

mskala
On Thu, 9 May 2019, Malte Meyn wrote:
> Am 09.05.19 um 16:53 schrieb [hidden email]:
> > Is there any simple way to modify the vertical spacing between numerator
> > and denominator in a numeric time signature?
> >
>
> Not really simple. But it can be done by redefining the stencil:

Thanks!

--
Matthew Skala
[hidden email]                 People before tribes.
https://ansuz.sooke.bc.ca/

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user