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 22:18:34 +0200

On Nov 11, 2014, at 10:07 PM, Werner LEMBERG <address@hidden> wrote:
> 
> 
>> 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…
> 
> What's the problem?  `paper-defaults-init.ly' sets up the default
> value, 20pt.  Admittedly, the comment is irritating, and I wonder why
> it is there…
> 

I’m guessing it’s because all the other values in the vile (mm, in, pt) are
in variables whereas the 20.0 is not in a variable but rather hardcoded
as an argument to the function.

>> 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.
> 
> Yes, this *is* hard-coded, by definition.
> 
>> 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.
> 
> You are not suggesting to change that, do you?  That way madness
> lies...

A cm will always be a cm, but the staff space as defined here will change if 
its tabs vs traditional staff notation.
It’s just a bit misleading.

I’m not opposed to having this, but perhaps it’d be worth to change the name to 
\five-line-staff-space?

Cheers,
MS


reply via email to

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