lilypond-devel
[Top][All Lists]
Advanced

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

Re: Strange loop executed only once!


From: Keith OHara
Subject: Re: Strange loop executed only once!
Date: Wed, 02 May 2012 19:18:55 -0700
User-agent: Opera Mail/11.62 (Win32)

On Wed, 02 May 2012 17:12:33 -0700, Łukasz Czerwiński <address@hidden> wrote:

On 22 April 2012 13:28, Han-Wen Nienhuys <address@hidden> wrote:

this also looks a little suspect:

         Real total_head_length = previous_extents[d].length ()
                                  + current_extents[d].length ();

As for Keith's code:
{ \time 4/1
 \override Score.SpacingSpanner #'packed-spacing = ##t
c'1 a <b'' c'''> <g''' a'''> }

I can see no too much spacing between b'' and c''', and g''' and a'''

The notes within the chords are spaced normally, but the chords are too-far 
separated from each other.  It is only a tiny problem.  No-one reported 
noticing the problem in output, only in the code.

Was that bug already filed or should I do it?   

It is so closely related to
http://code.google.com/p/lilypond/issues/detail?id=2493
that I'll just add a note there.


Anyway, I don't understand: "The cause seems to be the decision
to scale the ledger from the notecolumn width,

I should have set "to scale the rod...".  The function set_rods() at
<http://codereview.appspot.com/6109046/diff/6001/lily/ledger-line-spanner.cc#newcode39>
is passed two columns and asked to figure out the space needed for ledgers.

Now I see that the extents passed to set_rods() include /only/ notes that go on 
ledgers, so finally I see how HanWen's original suggestion should work.

And where to find what's min_length_fraction for?

It is a local variable holding the last parameter to set_rods() so you have to look at how 
set_rods() is called, and figure out how that last parameter is determined.   It comes from 
some property of a Ledger_line_spanner called "minimum-length-fraction" that might be 
talked about <http://lilypond.org/doc/v2.14/Documentation/internals/ledgerlinespanner>


Take a look at:
{ \time 4/1
\override Score.SpacingSpanner #'packed-spacing = ##t
c '1 b a <b' e''> c '1 b a <b' c''> }

Shouldn't b'/c'' be to the right of the note a,

Packed spacing means space tight as possible, so I do not worry that the chords 
overlap.  The overlap is not confusing when there are stems.




reply via email to

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