[Top][All Lists]

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

Re: Widening ledger lines by overriding LedgerLineSpanner

From: tisimst
Subject: Re: Widening ledger lines by overriding LedgerLineSpanner
Date: Wed, 28 May 2014 10:20:25 -0700 (PDT)

Paul Morris wrote
> Hi all, I'm trying to widen ledger lines:
> ...
> So I'm able to widen the ledger lines with length-fraction, but I'm
> wondering whether that will affect stem lengths?  And it seems that
> minimum-length-fraction is not working as described?


It appears that what you are seeing is more than just the ledger line's
"length-fraction" and "minimum-length-fraction" that contribute to the
horizontal spacing of the notes. Let's explore...

To answer your first question, if you look into the IR a little more, at
least as I read and understand it, it appears that the the name
"minimum-length-fraction" is simply used in at least two places--ledger
lines and stems. The good news is that they remain in different scopes, so
they won't affect each other. With that in mind, if you do something crazy
like "\override LedgerLineSpanner.length-fraction = #4.0" you'll see that
the two notes on the ends will extend outwards quite far, while the internal
sides of the spanners will stop just before they hit another ledger line. In
other words, they will extend, but only so far as a collision does not occur
(whichever is larger between the two properties):


To answer your second question, I think there is a mis-understanding of what
"minimum-length-fraction" is actually supposed to do. Similar to the
vertical spacing property "minimum-distance",  this forces things to be
spread out if they are too close, but not until then. You probably tried
this, but if you change "minimum-length-fraction" to 0.0, you'll notice you
get the same results as at something like 0.25 if it's right next to another
note on a ledger line. This is the collision engine doing its work. There is
a minimum separation (not sure what controls that, yet) between ledger lines
that is enforced. If we change it to #1.0, then we see the larger
separation, even without collisions:


Now, if we change your example to something crazy like this:

\version "2.18.2" 
\new Staff \with { 
  \override LedgerLineSpanner.length-fraction = #3.0
  \override LedgerLineSpanner.minimum-length-fraction = #1.0
} { 
  c d' e f' 
  g a' b c' 


You'll see that the ledger lines /can/ be longer in some places because the
next notehead is completely out of the way of the long ledger lines, but
they are cut short (like the d') when a collision will occur. When a
collision /will/ occur, the /actual/ ledger line length is divided equally
between the two noteheads in the ledger line area. Like I said before, these
aren't the only things that contribute to the horizontal spacing of
noteheads and ledger lines, but they do contribute to an extent.

Hope that helps,

View this message in context:
Sent from the User mailing list archive at

reply via email to

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