lilypond-user
[Top][All Lists]
Advanced

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

Re: Tweaking Hairpin shape


From: David Nalesnik
Subject: Re: Tweaking Hairpin shape
Date: Sun, 11 Feb 2018 19:24:39 -0600

Hi Stefano,

On Sun, Feb 11, 2018 at 3:44 PM, Stefano Troncaro
<address@hidden> wrote:
> I managed to fix it. The problem was not with the calculation of the angle,
> it was with the translation of the angle to the offset that the function
> applies to the vertical placement of the end-points of the hairpins. It is
> correct now.
>
> I also got rid of the rotation of the stencil for the case where the
> straight end-points are not needed, the coordinates of the end-points for
> the different cases are all calculated now.
>
> As far as I can tell this is done. Finally!
>
> I got the alists working now. I can't reproduce the problems I had earlier,
> and the error message was weird and I don't remember it. But I guess that's
> not important anymore.
>
> I'm not sure I understood the following:
>>
>> But the spanner is cloned for each broken segment, so you aren't
>> actually comparing
>> with the initial bit.  Each new segment is simply drawn with a stencil
>> reflecting its
>> position within the whole.
>
>
> By reading the code that creates the hairpin stencils I got the idea that
> after line breaks are calculated, hairpins get broken into smaller hairpins
> that are related to each other. And when drawing the stencils, if these
> relationships are found, then they are drawn differently (they can start and
> end in 1/3rd or 2/3rds of the height depending on the situation). If what
> I'm saying is redundant with what you are saying, as I think it is, then I
> probably did a poor job of explaining myself in my last message.

When lines are broken the original Hairpin is copied to create a
Hairpin for each line.  The stencil function is applied separately to
each of these new Hairpin grobs.  It draws them with various openings
(or closings) based on the position of the spanner bounds it finds for
each: mid-line, start of line, end of line.  The spanner bound will
be, for example, a NonMusicalPaperColumn at a line break; the function
ly:item-break-dir applied to that bounding grob returns -1, 0, or
1--directions which have always left me confused.  The print function
simply looks at the bounds (and whether we have a crescendo or
decrescendo) to determine the shape, not at whether part of the
hairpin is the first piece, a middle piece, or the ending piece.

All this is super interesting, of course, but has no bearing on the
subject and I should have read what you wrote more carefully!

> English is
> not my native language and I struggle to be clear and concise with technical
> topics such as these. I apologize for the difficulties in communication that
> surely arise because of this.
>

No, your English is fine!  As I say, it's my reading comprehension
that leaves something to be desired :)

>
> I can now very comfortably get the hairpins I wanted, and I learned a lot of
> useful things in the process. I know I said it many times already but I'm
> truly grateful for your help! I never would have been able to reach a
> satisfying solution without it.
>

My pleasure!

David



reply via email to

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