lilypond-devel
[Top][All Lists]
Advanced

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

[PATCH] Re: length of staff lines in score with only spacer notes


From: Reinhold Kainhofer
Subject: [PATCH] Re: length of staff lines in score with only spacer notes
Date: Fri, 6 Nov 2009 14:30:55 +0100
User-agent: KMail/1.12.2 (Linux/2.6.31-14-generic; KDE/4.3.2; i686; ; )

Am Donnerstag, 5. November 2009 23:58:12 schrieben Sie:
> 2009/11/5 Reinhold Kainhofer <address@hidden>:
> > If I have a score containing only an s8 spacer rest, the staff lines will
> > always have the same length, no matter how wide the key/clef/time
> > signatures are. As a consequence, in some cases the staff lines are way
> > too short (leaving to the time signature without staff lines) and in some
> > cases they are too long. Attached is an example.
> > Any idea where the problem is and how it might be fixed?
> 
> I'm not sure why this happens, though it's something to do with
>  SpacingSpanner.

It happens for every score where the music does not not create any grobs. E.g. 
only s8 or \bar "" (notice that the combination 
   s8 \bar "" 
does create an empty bar line grob, since the bar is at a moment > 0). So I 
suppose that the width calculation is only done if the music contains at least 
one real grob after the prefatory key/clef/time signature.

On the other hand, the check for an empty score does not fail in this case...

> As a workaround, you can get the extent of the prefatory items from
> BreakAlignment, then use this to set the width of StaffSymbol:

Ah, thanks, that works really great!

> > The other problem appears with the key signature, when you remove the
> > Clef_engraver (because sometimes you only want to print the original key
> > signature in an incipit of a critical edition): The key signature has no
> > padding on the left, so it starts even a little bit before the staff
> > lines...
> 
> Change the default spacing between LeftEdge and KeySignature:

This extra space is only used if the KeySignature is the first element of a 
staff (i.e. directly after the LeftEdge), right? If so, why shouldn't we 
increase the default value from 0.0 to 0.8?

Patch is up at:
http://codereview.appspot.com/150045

Any objections to applying it?

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org




reply via email to

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