Hi, On Fri, Apr 21, 2017 at 1:07 AM, <u...@openlilylib.org> wrote: > 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.
Besides Nathan's code below, you might be able to use the "Ferneyhough" hairpins. Can you provide an usage example of these partial hairpins? How would they behave over line breaks? >> >> 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. > Yes, this would work Instead of using a markup, why not use ly:line-interface::line (available from 2.19.27)? This gets thickness from the grob--and any other line attributes you want, so you can create dashed hairpins, whatever. There's no need adjust thickness in this case. HTH, David _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user