Harm, I've been thinking about this, and perhaps you have an idea of how
the following can be achieved.

A consequence of explicitly stating the degree in which the stencil has to
be rotated is that if anything changes the spacing of that system it's very
likely that the degree of rotation will have to be manually tweaked. I was
thinking on how to achieve an "automatic" solution. I imagine that this
could be done by establishing two points of reference. In this example any
two points running along the Beam would serve, although the ending points
of two of the Stems would work just as well.

But all this assumes that every object has a distinct name/ID/whatever,
like a pointer to it which allows to recover information on it, or at least
that one can be given. Do you know if this is possible?

Another approach could be to override the before-line-breaking or
after-line-breaking property of the reference Stems with a function that
stores the coordinates with a specific name, that can later be recovered by
the function that rotates the Hairpin stencil. This sounds simpler than the
first idea, although I don't know if Lilypond's internal sequencing allows
for this to work properly.

I would love to hear your ideas on this.

Thanks again for being so helpful,

2018-02-04 17:21 GMT-03:00 Thomas Morley <thomasmorle...@gmail.com>:

> 2018-02-04 21:02 GMT+01:00 Kieren MacMillan <kieren_macmil...@sympatico.ca
> >:
> > Hi Harm,
> >
> >> See below.
> >
> > Once again, a wonderful solution/contribution.
> >
> >> 'rotation comes too late, use a stencil-override with ly:stencil-rotate
> instead.
> >
> > Is there any reason 'rotation can't come sooner for all grobs, so that
> skylines and spacing Do The Right Thing™?
> Well, I don't know.
> Also, I'm not sure, whether there are use cases out there for the
> current behaviour of 'rotation.
> And the NR states:
> "There are only a few situations where the rotation of layout objects is
> useful"
> http://lilypond.org/doc/v2.19/Documentation/notation/rotating-objects
> Cheers,
>   Harm
lilypond-user mailing list

Reply via email to