lilypond-user
[Top][All Lists]
Advanced

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

Re: Convert staff-spaces to mm on the fly?


From: Richard Shann
Subject: Re: Convert staff-spaces to mm on the fly?
Date: Mon, 30 Dec 2024 16:13:36 +0000
User-agent: Evolution 3.46.4-2

On Mon, 2024-12-30 at 15:52 +0000, Timothy Lanfear wrote:
> On 30/12/2024 14:35, Richard Shann wrote:
>  
> > Thank you for this code. Trying it out, I see that there is
> > something
> > here I have not got understood. This MWE should explain all - I was
> > hoping that the text "Interlude" would appear centered between the
> > two
> > systems, but its position still depends on the staff size:
> > 
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > ><
> > 
> > \version "2.24"
> > 
> > staffspaceinmm = #(ly:output-def-lookup $defaultpaper 'staff-space)
> > 
> > #(set-default-paper-size "a4")
> > %#(set-global-staff-size 10)
> > #(set-global-staff-size 18)
> > 
> > \layout { indent = 0 }
> > {
> >  \repeat unfold #40 c'2
> >  \break \mark \markup { \override #`(line-width .  ,(/ 175
> > staffspaceinmm)) 
> >                           \fill-line { " " \lower #10 "Interlude" "
> > " } } 
> >  \repeat unfold #40 c'2
> > }
> > 
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8
> > ><
> > 
> > This centers "Interlude" with the global staff size set to 18 but
> > not
> > 10.
> > 
> > Thanks again
> > 
> > Richard Shann
> > 
> Set the staff size before getting the value of staffspaceinmm
> #(set-global-staff-size 10)
> staffspaceinmm = #(ly:output-def-lookup $defaultpaper 'staff-space)
> 
Pefect! Thank you...
Richard Shann



reply via email to

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