lilypond-user
[Top][All Lists]
Advanced

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

Re: Where is \staff-space defined?


From: Mike Solomon
Subject: Re: Where is \staff-space defined?
Date: Tue, 11 Nov 2014 15:43:44 +0200

> On Nov 11, 2014, at 2:55 PM, Werner LEMBERG <address@hidden> wrote:
> 
> 
>>> I looked up the source code, but I couldn't find the definition of
>>> `\staff-space'...
>> 
>> I’m not sure what ‘\staff-space’ is. I know the meaning of
>> ‘staff-space’ (without the slash), though.  Is that what you meant?
> 
> No, I mean `\staff-space', e.g.
> 
>  line-width = 50\staff-space
> 
> as documented in section `Distances and measurements'.
> 
> Note that I can similarly say
> 
>  line-width = 10\staff-height
> 
> so I suspect it's the code in function `set-paper-dimension-variables'
> together with 'layout-set-absolute-staff-size-in-module' (both in file
> `paper.scm') that defines the commands and its values.
> 
> 
>    Werner

Interesting - never knew this existed.
It seems suspicious.  What happens is that in paper-defaults-init.ly, there is 
a line:

  %% ugh. hard coded?
  #(layout-set-absolute-staff-size (* 20.0 pt))

The comment says it all :-) Not that I am not guilty of hardcoding…no stones 
are thrown…

Jump to paper.scm, where we have:

layout-set-absolute-staff-size

that calls:

layout-set-absolute-staff-size-in-module

which sets staff-space as the staff height / 4.

So beyond the hard coding of 20.0, there is a further layer of (uncommented) 
hard-coditude that assumes we have 4 spaces in the staff.

Cheers,
MS


reply via email to

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