lilypond-devel
[Top][All Lists]
Advanced

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

Re: Remove special case in staff-spacing (issue4188051)


From: Janek Warchoł
Subject: Re: Remove special case in staff-spacing (issue4188051)
Date: Sat, 30 Jul 2011 17:18:41 +0200

2011/7/29  <address@hidden>:
> On 2011/07/29 04:31:00, Janek Warchol wrote:
>>
>> Could you add some comments for rookies like me (the
>> more, the better)?
>
> Some explanatory comments.  (English takes a lot more space than C.)

Thanks!  I now understand it a lot better!
I'd suggest adding them to the code itself.

> http://codereview.appspot.com/4188051/diff/17001/lily/spacing-spanner.cc#newcode526
> lily/spacing-spanner.cc:526: Real full_measure_extra_space =
> robust_scm2double (l->get_property ("full-measure-extra-space"), 1.0);
>
> I moved the addition of this space (before a single note-column when it
> is alone in a measure) earlier because ...
>
> http://codereview.appspot.com/4188051/diff/17001/lily/spacing-spanner.cc#newcode539
> lily/spacing-spanner.cc:539: spring = merge_springs (springs);
>
> ..when merge_springs() [in spring.cc] combines the desired spacing from
> all voices/staves in the system, it lengthens the relaxed-spring
> distance of the combined spring enough to give 0.3 space clearance.
>
> The old code first ensured that accidentals were at least 0.3-space away
> from the barline, and then added the full-measure-extra-space on top of
> that.

I'm not sure if you achieved what you meant.  From what i see, the
same amount of full-measure-extra-space is still added regardless of
whether there is an accidental before the note or not.
Perhaps an example will make it clear.  See attached:
- "fullmeasire current" shows how Lily behaves now: there is a fixed
amount of space after barline (regardless of any accidentals), and a
fixed amount of space is added when a note is alone in the measure
- "new" shows how it works with your patch: if there is an accidental
before a note, the space after barline is smaller, but notes that are
alone in a measure are still moved right by a fixed amount of space
regardless of any accidentals,
- "supposed" is how i think you meant it to behave: first notes in a
measure (doesn't matter if they are alone in the measure or not) that
have accidentals are moved right (relative to where an unaccidentaled
note would be) only the amount needed to assure clearance between
accidental and barline).  Am i right?

thanks,
Janek

Attachment: fullmeasire.ly
Description: Text Data

Attachment: fullmeasire current.pdf
Description: Adobe PDF document

Attachment: fullmeasire new.pdf
Description: Adobe PDF document

Attachment: fullmeasire supposed.pdf
Description: Adobe PDF document


reply via email to

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