Re: More questions on beam properties

2016-07-15 Thread David Nalesnik
On Fri, Jul 15, 2016 at 9:48 AM, Andrew Bernard
 wrote:
> What does the property Beam.positions actually represent? I have seen code
> that treats it as the y position coordinates of the end points of the beam,

If I recall correctly, in the case of Beam, 'positions represents the
Y-coordinate of the vertical midpoint of the "0" beam, the beam which
touches the endpoints of the outermost stems.

Thankfully, in the case of Beam, this info is usable to get
measurements of the beam you see.  In the case of Slur, the positions
numbers are instead used to select the closest "trial curve" out of a
range of pre-calculated possibilities which Lilypond scores for
appropriateness.  Thus, they don't correlate with, say,
control-points.

What on earth is ‘beam::place-broken-parts-individually’ in the
> context of beam start end vertical positioning? Dear me.

When Beams are broken across systems there are several options for
handling the slope and relative alignment of the Beam bits.  I believe
this oddly named callback has its origin in a attempt to support
several distinguishable traditions of dealing with this: an Edition
Peters style, and several others.  You could check the issue tracker
for more info.

>
> [I hate to continually complain about the IR manuals, and I dearly wish I
> was in a position to understand this material enough to rewrite these
> unclear sections, but I apologise, I don’t.]
>

Unfortunately, it is a matter of studying the code yourself, doing
simple experiments, or asking on the lists where you likely be
answered by someone who did just that to get whatever knowledge they
have.  (That includes me.)

David

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


Re: More questions on beam properties

2016-07-15 Thread Paul

Hi Andrew,

On 07/15/2016 10:48 AM, Andrew Bernard wrote:
What does the property Beam.positions actually represent? I have seen 
code that treats it as the y position coordinates of the end points of 
the beam, but I cannot make sense of this. Nor can I make sense of the 
manual page for Beam, which gives, as far as I can see, negative 
information! -


positions (pair of numbers):

beam::place-broken-parts-individually

Pair of staff coordinates (left . right), where both left and right 
are in staff-space units of the current staff. For slurs, this value 
selects which slur candidate to use; if extreme positions are 
requested, the closest one is taken.


How anybody can read that and understand what it says about beams is 
somewhat beyond me. This makes it difficult to program with the 
properties in question.


One factor is that the doc strings for these properties are not specific 
to one grob.  The positions property is (re-)used for many grobs and so 
the doc string is very general and often doesn't speak to their use by 
particular grobs.  The mention of slurs is because of this.


What on earth is ‘beam::place-broken-parts-individually’ in the 
context of beam start end vertical positioning? Dear me.


It's a callback function that is called to calculate the value of that 
property for this grob.  So you have to look at the code in this case to 
learn more.


Maybe that helps explain what's going on with the documentation at least.

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


More questions on beam properties

2016-07-15 Thread Andrew Bernard
What does the property Beam.positions actually represent? I have seen code
that treats it as the y position coordinates of the end points of the beam,
but I cannot make sense of this. Nor can I make sense of the manual page
for Beam, which gives, as far as I can see, negative information! -


positions (pair of numbers):

beam::place-broken-parts-individually

Pair of staff coordinates (left . right), where both left and right are in
staff-space units of the current staff. For slurs, this value selects which
slur candidate to use; if extreme positions are requested, the closest one
is taken.

How anybody can read that and understand what it says about beams is
somewhat beyond me. This makes it difficult to program with the properties
in question. What on earth is ‘beam::place-broken-parts-individually’ in
the context of beam start end vertical positioning? Dear me.

[I hate to continually complain about the IR manuals, and I dearly wish I
was in a position to understand this material enough to rewrite these
unclear sections, but I apologise, I don’t.]

I can post scheme code to clarify my question and show the strange
behaviour of Beam.properties if requested, but I thought I would ask the
qualitative question first, as it is most likely to be just my failure to
grasp what the manual is trying to say.

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