lilypond-user
[Top][All Lists]
Advanced

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

Re: Hairpin endings


From: ul
Subject: Re: Hairpin endings
Date: Fri, 21 Apr 2017 08:07:03 +0200
User-agent: Roundcube Webmail/1.2.0

Am 2017-04-21 07:41, schrieb Nathan Ho:
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?

If I'm not mistaken this actually is a missing piece of information in LilyPond. The thickness is interpreted as relative to the staffline thickness, and there's no general property for it.
It should be possible to use something like (untested)

(hairpin-thickness (* (ly:staff-symbol-line-thickness grob) (ly:grob-property grob 'thickness)))

in the let-block and use hairpin-thickness in the markup generation.

HTH
Urs



nathan

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

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