Re: Widening ledger lines by overriding LedgerLineSpanner

2014-05-29 Thread Paul Morris
Paul Morris wrote
 I'll add a snippet to the LSR showing how to do this since there doesn't
 seem to be one there now.  

Here it is:

http://lsr.di.unimi.it/LSR/Item?id=917

Cheers,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Widening-ledger-lines-by-overriding-LedgerLineSpanner-tp162842p162876.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Widening ledger lines by overriding LedgerLineSpanner

2014-05-28 Thread tisimst
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?

Paul,

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):

http://lilypond.1069038.n5.nabble.com/file/n162850/ledgerlinecraziness1.png 

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:

http://lilypond.1069038.n5.nabble.com/file/n162850/ledgerlinecraziness2.png 

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' 
}

http://lilypond.1069038.n5.nabble.com/file/n162850/ledgerlinecraziness3.png 

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,
Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Widening-ledger-lines-by-overriding-LedgerLineSpanner-tp162842p162850.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Widening ledger lines by overriding LedgerLineSpanner

2014-05-28 Thread Paul Morris
tisimst wrote
 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...

Hi Abraham,

Thanks so much!  Your images are especially helpful for understanding what's
going on.  


tisimst wrote
 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. 

That's good to know, and makes sense.  I think you meant length-fraction
here?  I see it now under stem-interface: 
http://lilypond.org/doc/v2.18/Documentation/internals/stem_002dinterface  
I should have looked there before.


tisimst wrote
 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):

Ok, I see how it works.  So overriding LedgerLineSpanner.length-fraction is
the way to widen ledger lines.  I'll add a snippet to the LSR showing how to
do this since there doesn't seem to be one there now.  Might be worth
including this in the docs somewhere too.  Then there would be no need to
dig into the internals reference to figure this out.


tisimst wrote
 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:

Hmmm, indeed I was confused by the name minimum-length-fraction and its
description minimum length of ledger line as fraction of note head size. 
Now I think I see how it works.  There's more going on than that, and as
your third image shows it can get somewhat complex... 

It seems that if minimum-length-fraction is larger than length-fraction then
it doesn't affect the length of ledger lines, but only the spacing between
them and other things.  If it is smaller than length-fraction then it does
work as a minimum length for the ledger line in cases where there are
collisions between ledger lines and anything that is not a ledger line.  (?)

Thanks again for your help figuring this out and for explaining it so well!

-Paul




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Widening-ledger-lines-by-overriding-LedgerLineSpanner-tp162842p162853.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Widening ledger lines by overriding LedgerLineSpanner

2014-05-28 Thread Paul Morris
Paul Morris wrote
 It seems that if minimum-length-fraction is larger than length-fraction
 then it doesn't affect the length of ledger lines, but only the spacing
 between them and other things.  If it is smaller than length-fraction then
 it does work as a minimum length for the ledger line in cases where there
 are collisions between ledger lines and anything that is not a ledger
 line.  (?)

It occurs to me that minimum-length-fraction is probably never supposed to
be larger than length-fraction.  That would mean that the way it increases
the spacing between the notes when it is larger is just an unintended
result.

It seems that length-fraction basically works like a maximum length, and by
default ledger lines will extend as far as they can towards this max length
given the space available.  Then minimum-length-fraction is the minimum
length for when there are collisions, and it can push notes further apart
if needed to achieve that minimum length in those cases.

-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Widening-ledger-lines-by-overriding-LedgerLineSpanner-tp162842p162859.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Widening ledger lines by overriding LedgerLineSpanner

2014-05-27 Thread Paul Morris
Hi all, I'm trying to widen ledger lines:

\version 2.18.2
\new Staff \with {

  % This widens ledger lines:
  % \override LedgerLineSpanner.length-fraction = #0.4

  % This should too but it doesn't. Instead it increases 
  % horizontal spacing between notes. (?)
  \override LedgerLineSpanner.minimum-length-fraction = #1

} {
  c d e f
  g a b c'
}

According to the docs[1], LedgerLineSpanner.minimum-length-fraction is the
Minimum length of ledger line as fraction of note head size. 

[1] http://lilypond.org/doc/v2.18/Documentation/internals/ledgerlinespanner

They also say that LedgerLineSpanner.length-fraction is a Multiplier for
lengths. Used for determining ledger lines and stem lengths.  But does it
really affect stem lengths?  I could see no indication that it does either
in the docs for Stem[2] or when experimenting with the snippet above.  

[2] http://lilypond.org/doc/v2.18/Documentation/internals/stem

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?

Does anyone happen to know anything more about these properties?  Any
insights appreciated.

Thanks,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Widening-ledger-lines-by-overriding-LedgerLineSpanner-tp162842.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user