lilypond-user
[Top][All Lists]
Advanced

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

Re: Get current staff size


From: Kevin Barry
Subject: Re: Get current staff size
Date: Fri, 10 Apr 2020 16:35:18 +0100

Hi All,

Thank you for your suggestions. I did try using the StaffSymbol's
staff-height, but that seems to be in staff spaces (with a little
added on for the staff lines), so it's always just a little above 4.

Timothy's suggestions works (I never would have found ly:pt).

As it happens, I found another solution similar to Valentin's using
the output-scale property, which works if there are different values
for staff-size globally and in the local layout.

Thanks all!

Kevin

On Fri, 10 Apr 2020 at 14:38, Timothy Lanfear <address@hidden> wrote:
>
> On 10/04/2020 13:24, Noeck wrote:
> > Am 10.04.20 um 14:12 schrieb Valentin Villenave:
> >>      (* 4 (ly:output-def-lookup
> > This yields 16 for a default staff here. Should the factor be 5?
> >
> > Cheers,
> > Joram
>
> Try this instead, which displays the staff height in mm and pt
>
> \version "2.20.0"
>
> \paper {
>     #(layout-set-staff-size 20.0)
> }
>
> #(begin
>    (newline)
>    (display (ly:output-def-lookup $defaultpaper 'staff-height))
>    (newline)
>    (display (/ (ly:output-def-lookup $defaultpaper 'staff-height) (ly:pt
> 1) ))
>    (newline))
>
> \new Staff { b }
>
> --
> Timothy Lanfear, Bristol, UK.
>
>



reply via email to

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