lilypond-user
[Top][All Lists]
Advanced

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

Re: Shape the angle of a broken hairpin's first part


From: Urs Liska
Subject: Re: Shape the angle of a broken hairpin's first part
Date: Mon, 17 Sep 2018 11:55:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi Harm,

thanks for this, which gives me a handle to the first part of the hairpin at least.

But my problem is not solved with the 'height property.


Am 17.09.2018 um 11:49 schrieb Thomas Morley:
2018-09-17 8:43 GMT+02:00 Urs Liska <address@hidden>:
I have a broken hairpin whose first part is pretty short. As a consequence
its internal angle looks too wide for my taste (see attached PNG). I would
like to have the two lines wider apart with a narrower angle to more
adequately reflect the overall length of the hairpin, similar to the second
attached image from the corresponding music without line break.

I would only know about the "height" property of a hairpin, but that's not
what I need, and it doesn't help me towards tweaking the first part only ...

I'd be glad about any suggestions or solution.

Thanks
Urs
Hi Urs,

iiuc, you will need to tackle the stencil of the first part. Going
directly for 'height doesn't work for me. Iirc there are some
procedures setting the heights of broken hairpins, without the
possibility to customize it.

But you can set the desired 'height for the selected hairpin-part and
call the default stencil afterwards . Leading to:

{
     \override Hairpin.stencil =
     #(lambda (grob)
       (let* ((orig (ly:grob-original grob))
              (siblings (if (ly:grob? orig)
                            (ly:spanner-broken-into orig) '() )))
         (if (and (pair? siblings) (equal? grob (car siblings)))
             (ly:grob-set-property! grob 'height 5))
         ly:hairpin::print))
     c'1\<
     \break
     s4
     c'2.\!
}
The value 5 is ofcourse only for the show. Adjust as you wish.


See my updated example (only the line with the start of the hairpin is changed):

{
    \override Hairpin.stencil =
    #(lambda (grob)
      (let* ((orig (ly:grob-original grob))
             (siblings (if (ly:grob? orig)
                           (ly:spanner-broken-into orig) '() )))
        (if (and (pair? siblings) (equal? grob (car siblings)))
            (ly:grob-set-property! grob 'height 5))
        ly:hairpin::print))
    c'2.... c'32\>
    \break
    s4
    c'2.\!
}

Here you can see nicely how the angles of the first hairpin are too steep, it looks like the hairpin would be closed shortly after the barline. Is there any way to modify either the angle of that sibling's line or for example the "height" at the point where the hairpin is cut off?

Thanks
Urs




HTH,
   Harm




reply via email to

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