Re: Springs and rods

2020-07-23 Thread David Wright
On Thu 23 Jul 2020 at 19:15:25 (+1000), Andrew Bernard wrote:
> There are some things in lilypond that I just think are not explained
> anywhere. What is this springs-and-rods business? For Hairpins, I read
> this?
> 
> minimum-length (dimension, in staff space):
> 2.0
> 
> Try to make a spanner at least this long, normally in the horizontal
> direction. This requires an appropriate callback for the
> springs-and-rods property. If added to a Tie, this sets the minimum
> distance between noteheads.
> 
> And:
> springs-and-rods (boolean):
> ly:spanner::set-spacing-rods
> 
> Dummy variable for triggering spacing routines.
> 
> 
> With all due respect to our fantastic developers, I find this
> unintelligible and less than helpful. What is springs-and-rods
> supposed to be set to: ly:spanner::set-spacing-rods, or ##t, or ##f
> and when, and why? What exactly is meant by 'dummy' in this context?
> I use that word to mean a temporary placeholder, but there are many
> usages. WHat is 'an appropriate callback'? No example is provided.
> 
> If I had any idea at all about this I would write a small section in
> the NR on it and submit it, but I am stumped. if this _is_ in the NR,
> please let me know.

No references as this is just coming out of my head.

I've always assumed that the concept of springs and rods is analogous
to TeX's glue and little boxes, respectively. Knuth IIRC makes the
analogy of the compositor's stick, with boxes instead of metal type.
When the next word would overfill the line, tne interword spacing is
increased to justify the line. (I don't remember whether the extra
space is filled with stretched glue, or with glued leading.)

With test, you have the complications of kerning, and of changes in
font (like italics/upright). With music, the complications are greater:
if you increase the spacing between notes, you've got to tell the
hairpins to lengthen and decrease their apical angle. Presumably,
that's the callback for springs, resisting and reacting to stretching.

The rods are presumably what prevents notes getting so close that LP
can't draw a tie between them. Unlike, say, lyrics, which are allowed
to squeeze lyric-hyphens out of existence. In TeX, boxes can kern,
but are otherwise incompressible.

Cheers,
David.



Re: Springs and rods

2020-07-23 Thread Phil Holmes
- Original Message - 
From: "Andrew Bernard" 

To: "lilypond-user Mailinglist" 
Sent: Thursday, July 23, 2020 10:15 AM
Subject: Springs and rods



There are some things in lilypond that I just think are not explained
anywhere. What is this springs-and-rods business? For Hairpins, I read
this?

minimum-length (dimension, in staff space):
2.0

Try to make a spanner at least this long, normally in the horizontal
direction. This requires an appropriate callback for the
springs-and-rods property. If added to a Tie, this sets the minimum
distance between noteheads.

And:
springs-and-rods (boolean):
ly:spanner::set-spacing-rods

Dummy variable for triggering spacing routines.


With all due respect to our fantastic developers, I find this
unintelligible and less than helpful. What is springs-and-rods
supposed to be set to: ly:spanner::set-spacing-rods, or ##t, or ##f
and when, and why? What exactly is meant by 'dummy' in this context?
I use that word to mean a temporary placeholder, but there are many
usages. WHat is 'an appropriate callback'? No example is provided.

If I had any idea at all about this I would write a small section in
the NR on it and submit it, but I am stumped. if this _is_ in the NR,
please let me know.


There is some documentation here:

http://lilypond.org/doc/v2.20/Documentation/notation/spanners

Is this what you need?

--
Phil Holmes



Re: Springs and rods

2020-07-23 Thread Urs Liska
Hi Andrew,

thanks for raising this question I have always been too afraid to ask
;-)

Urs

Am Donnerstag, den 23.07.2020, 19:15 +1000 schrieb Andrew Bernard:
> There are some things in lilypond that I just think are not explained
> anywhere. What is this springs-and-rods business? For Hairpins, I
> read
> this?
> 
> minimum-length (dimension, in staff space):
> 2.0
> 
> Try to make a spanner at least this long, normally in the horizontal
> direction. This requires an appropriate callback for the
> springs-and-rods property. If added to a Tie, this sets the minimum
> distance between noteheads.
> 
> And:
> springs-and-rods (boolean):
> ly:spanner::set-spacing-rods
> 
> Dummy variable for triggering spacing routines.
> 
> 
> With all due respect to our fantastic developers, I find this
> unintelligible and less than helpful. What is springs-and-rods
> supposed to be set to: ly:spanner::set-spacing-rods, or ##t, or ##f
> and when, and why? What exactly is meant by 'dummy' in this context?
> I use that word to mean a temporary placeholder, but there are many
> usages. WHat is 'an appropriate callback'? No example is provided.
> 
> If I had any idea at all about this I would write a small section in
> the NR on it and submit it, but I am stumped. if this _is_ in the NR,
> please let me know.
> 
> 
> Andrew
> 




Springs and rods

2020-07-23 Thread Andrew Bernard
There are some things in lilypond that I just think are not explained
anywhere. What is this springs-and-rods business? For Hairpins, I read
this?

minimum-length (dimension, in staff space):
2.0

Try to make a spanner at least this long, normally in the horizontal
direction. This requires an appropriate callback for the
springs-and-rods property. If added to a Tie, this sets the minimum
distance between noteheads.

And:
springs-and-rods (boolean):
ly:spanner::set-spacing-rods

Dummy variable for triggering spacing routines.


With all due respect to our fantastic developers, I find this
unintelligible and less than helpful. What is springs-and-rods
supposed to be set to: ly:spanner::set-spacing-rods, or ##t, or ##f
and when, and why? What exactly is meant by 'dummy' in this context?
I use that word to mean a temporary placeholder, but there are many
usages. WHat is 'an appropriate callback'? No example is provided.

If I had any idea at all about this I would write a small section in
the NR on it and submit it, but I am stumped. if this _is_ in the NR,
please let me know.


Andrew



Re: Springs and rods

2019-01-18 Thread Trevor




Andrew Bernard wrote 18/01/2019 04:33:12
Subject: Springs and rods


Yet another annoying question about documentation from me.

After figuring out how to make a glissando longer, and discovering this 
in the NR under the spanner interface:


minimum-length (dimension, in staff space)
Try to make a spanner at least this long, normally in the horizontal 
direction. This requires an appropriate callback for the 
springs-and-rods property. If added to a Tie, this sets the minimum 
distance between noteheads.


I can only ask and I think reasonably where is this mystical 
springs-and-rods mechanism explained? Why does one need to do this:


  \override Glissando #'minimum-length = #4
  \override Glissando #'springs-and-rods = 
#ly:spanner::set-spacing-rods
This is acknowledged to be sub-optimal. AIUI, it stems from the multiple 
uses
of the 'minimum-length property. It is used in several interfaces, 
including

lyric-hyphen, multi-measure-rest, etc, as well as spanner. Some of these
require the additional override to work correctly; others don't. The 
solution
would be to separate out the two types of use of the 'minimum-length 
property
into two separate properties, one incorporating set-spacing-rods, but 
the
difficulties involved in doing that seem severe as it's at least 6 years 
since this
was discussed as an issue. I don't understand what the  complexities are 
- maybe

one of the devs could explain further. But in the expectation this would
eventually be fixed (and so the need for documentation  obviated) it has 
never

been documented properly.

Trevor


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


Springs and rods

2019-01-17 Thread Andrew Bernard
Yet another annoying question about documentation from me.

After figuring out how to make a glissando longer, and discovering this in
the NR under the spanner interface:

minimum-length (dimension, in staff space)
Try to make a spanner at least this long, normally in the horizontal
direction. This requires an appropriate callback for the springs-and-rods
property. If added to a Tie, this sets the minimum distance between
noteheads.

I can only ask and I think reasonably where is this mystical
springs-and-rods mechanism explained? Why does one need to do this:

  \override Glissando #'minimum-length = #4
  \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods

How is one meant to know what an 'appropriate callback is'? What other
callback would one use? And what for?

I have to honestly say that if I could ever understand the lilypond
internals I would readily volunteer to rewrite these sections in the NR,
which occur far too often I am afraid. I've been using lilypond heavily for
years, and sections like this simply make me feel dumb. Perhaps I missed
something fundamental along the learning curve.

None of this criticism is aimed at any person. I am well aware this sort of
manual is reference and not tutorial. There used to be a series of computer
publications called [X]: The Missing Manual. I feel we need the missing
manual for lilypond. I don't know enough to write it.

All help most appreciated.

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