lilypond-user
[Top][All Lists]
Advanced

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

Re: Flat flared hairpins


From: Andrew Bernard
Subject: Re: Flat flared hairpins
Date: Mon, 19 Nov 2018 21:01:08 +1100

Well I have worked out one way to do this. I use an event function, and return \startTextSpan from the event function. Previously I mistakenly thought you could jist have tweak commands in the event function.

While not the full workup with flat hairpins with left flared ends, right flared ends, or both ends flared, this following MWE outlines my sketch of a solution. The point being it solves my principal query which is how to change the text spanner properties when one starts and stops on a single note.

If those more learned than me would care to comment, that would be great.

%====
\version "2.19.82"

% flat hairpins with flared ends.

startHpin =
#(define-event-function (arg)
   (symbol?)
   #{
     \tweak TextSpanner.staff-padding #3
     \tweak TextSpanner.style #'line
     \tweak TextSpanner.thickness #1.5
     \tweak TextSpanner.bound-details.left.text
     \markup {
       \path #0.15 #'((moveto 0 0)
                      (lineto -1 1)
                      (moveto 0 0)
                      (lineto -1 -1)
                      (closepath))
     }
     \tweak TextSpanner.bound-details.left.padding #2
     \tweak TextSpanner.bound-details.right.padding #2
     \tweak TextSpanner.bound-details.right.text
     \markup {
       \path #0.15 #'((moveto 0 0)
                      (lineto 1 1)
                      (moveto 0 0)
                      (lineto 1 -1)
                      (closepath))
     }
     \startTextSpan
   #}
   )

stopHpin = \stopTextSpan

{
  c''2^\startHpin #'left c''\stopHpin -\startHpin #'left
  c''\stopHpin c'' c''
}
%====

Andrew


reply via email to

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