lilypond-user
[Top][All Lists]
Advanced

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

Re: Hairpin endings


From: Nathan Ho
Subject: Re: Hairpin endings
Date: Thu, 20 Apr 2017 22:41:33 -0700
User-agent: Roundcube Webmail/1.1.2

On 2017-04-20 20:42, Andrew Bernard wrote:
I posted a while ago with a query about hairpins, to which no
response.

Would there be any way to have hairpins that don't start, or end in
the other direction, with the lines converging to the same point? I
have need from time to time of hairpins where the end points are still
separated, rather than coming to a termination together. Sure this can
be done with a whiteout box, but that is always fiddly and the
position tends to move when the score is repaginated etc etc. In the
same way as the 'height' property allows you to specify the separation
at the open end, it would be useful to have some property for this
sort of thing at the pointy end. Yes, definitely not Common Era
engraving practice, but this keeps coming up in the New Complexity
scores I work with.

hi andrew,

check it out:

#(define ((open-hairpin left-open right-open) grob)
   (let* ((stencil (ly:hairpin::print grob))
          (X-ext (ly:stencil-extent stencil X))
          (Y-ext (ly:stencil-extent stencil Y))
          (width (interval-length X-ext))
          (height (interval-length Y-ext)))
     (ly:stencil-translate
       (grob-interpret-markup grob
         (markup
           (#:path 0.1
             (list (list 'moveto 0 (* height (- 0.5 (* 0.5 left-open))))
(list 'lineto width (* height (- 0.5 (* 0.5 right-open))))
                   (list 'moveto 0 (* height (+ 0.5 (* 0.5 left-open))))
(list 'lineto width (* height (+ 0.5 (* 0.5 right-open))))))))
       (cons 0 (interval-start Y-ext)))))

{
  c'1\> c'1 c'1\!
  \once \override Hairpin.stencil = #(open-hairpin 1.0 0.5)
  c'1\> c'1 c'1\!
  \once \override Hairpin.stencil = #(open-hairpin 0.5 0.0)
  c'1\> c'1 c'1\!
}

respects height, but not thickness. anyone know how to convert a thickness value into staff spaces?


nathan



reply via email to

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