[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Flat flared hairpins
From:       Andrew Bernard <andrew.bernard () gmail ! com>
Date:       2018-11-19 10:01:08
Message-ID: CAK5QfnVKDzPrVBHYg+XZ-7Jd5XYacfoP3b=2CfkSyPXSxbnPrg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><div>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.</div><div><br></div><div>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.<br></div><div><br></div><div>If those more learned than me would care to \
comment, that would be great.</div><div><br></div><div>%====</div><div>\version \
&quot;2.19.82&quot;<br><br>% flat hairpins with flared ends.<br><br>startHpin \
=<br>#(define-event-function (arg)<br>   (symbol?)<br>   #{<br>     \tweak \
TextSpanner.staff-padding #3<br>     \tweak TextSpanner.style #&#39;line<br>     \
\tweak TextSpanner.thickness #1.5<br>     \tweak \
TextSpanner.bound-details.left.text<br>     \markup {<br>       \path #0.15 \
#&#39;((moveto 0 0)<br>                      (lineto -1 1)<br>                      \
(moveto 0 0)<br>                      (lineto -1 -1)<br>                      \
(closepath))<br>     }<br>     \tweak TextSpanner.bound-details.left.padding #2<br>   \
\tweak TextSpanner.bound-details.right.padding #2<br>     \tweak \
TextSpanner.bound-details.right.text<br>     \markup {<br>       \path #0.15 \
#&#39;((moveto 0 0)<br>                      (lineto 1 1)<br>                      \
(moveto 0 0)<br>                      (lineto 1 -1)<br>                      \
(closepath))<br>     }<br>     \startTextSpan<br>   #}<br>   )<br><br>stopHpin = \
\stopTextSpan<br><br>{<br>  c&#39;&#39;2^\startHpin #&#39;left c&#39;&#39;\stopHpin \
-\startHpin #&#39;left<br>  c&#39;&#39;\stopHpin c&#39;&#39; \
c&#39;&#39;<br>}<br></div><div>%====<br></div><div><br></div><div>Andrew</div><br></div></div>




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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic