[Top][All Lists]

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

Re: Extending the width of a glissando

From: Lukas-Fabian Moser
Subject: Re: Extending the width of a glissando
Date: Mon, 20 Sep 2021 22:02:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Question to the experts: Am I right in thinking that the documentation is misleading here?

That is also my understanding. The rotation property works on a stencil
using its own extents, performing the equivalent of ly:stencil-rotate,
not ly:stencil-rotate-absolute. After that, LilyPond places the stencil
using the newly created extents. The placement on the staff can depend
or not on these extents, e.g. that of a Clef won't but that of a Hairpin

The term “reference point” is a bit ambiguous. LilyPond places every
object relative to its parents, displacing it by X-offset and Y-offset.
If you are writing an [XY]-offset callback, you might think of the
reference point as being the point where the object would be placed
if its X-offset and Y-offset were 0. On top of that, the object is
drawn using a stencil, which carries its own extents. If you are writing
a stencil callback, you can think of the reference point as being
the point where a point stencil (having extents '(0 . 0) and '(0 . 0))
would be placed, i.e. taking X-offset and Y-offset into account
this time. It is the latter notion that applies here.

Yes, exactly. But the one thing the term "reference point" should never mean is "just the object's center".

So if the rotation is done with respect to the object's center (and in scaled coordinates such that the object's extents are from -1 to 1) - and this is what happens, as can be seen in the attached file where blue crosses mark the centers of objects, red crosses their respective '(0 . 0) point -, then to describe this as

and the x and y coordinates of the point relative to the object’s reference point about which the rotation is to be performed
is simply wrong in my opinion.

If you agree, I'll try and prepare a MR to change the documentation.

Maybe one might consider if it would be nice to have both behaviours: .rotation with respect to the object's center (current behaviour), but also with respect to the the stencil's '(0 . 0). Of course, one can achieve the latter with a bit of scheme code, but maybe a grob property of the form

\override Hairpin.rotation-system = #'absolute % offset (0,0) is the stencil's reference point, offset units are in staff spaces \override Hairpin.rotation-system = #'relative % offset (0,0) is the object's center, offset units are such that the object's edges are at +- 1.

might be useful?


Description: Text Data

reply via email to

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