Hi Gianmaria,

On Fri, Sep 15, 2017 at 7:16 AM, Gianmaria Lari <gianmarial...@gmail.com> wrote:
> Harp scores sometimes specify a bracket below or above the notes to indicate
> how to place your hand. In the attachment you can see an example.
>
> I have found online this code that works pretty well:
> [https://music.stackexchange.com/questions/48731/lilypond-finger-placement-brackets]
>
> \version "2.19.52"
> variable = {
>  \once \override TextSpanner.style = #'line
>  \once \override TextSpanner.to-barline = ##f
>  \once \override TextSpanner.bound-details =
>   #`(
>    (left
>     (text . ,#{ \markup { \draw-line #'( 0 . -.5) } #})
>     (Y . 0)
>     (padding . 0.25)
>     (attach-dir . -3)
>    )
>    (right
>     (text . ,#{ \markup { \draw-line #'( 0 . -.5) } #})
>     (Y . 0)
>     (padding . 0.25)
>     (attach-dir . 3)
>     )
>    )
> }
>
> \relative c' {
>  \key c \major
>  \time 3/4
>  \partial 4
>  \override Fingering.staff-padding = #'()
>  \variable
>  \once \override TextSpanner.rotation = #'(4 1.9 0)
>  a'8_3\startTextSpan b_2 \variable \once \override TextSpanner.rotation =
> #'(-4.5 -4.5 0)
>  c4-1\stopTextSpan\startTextSpan b-2 a_3 \variable \once \override
> TextSpanner.rotation = #'(3 -0.2 0)
>  g_4\stopTextSpan\startTextSpan a_3 b-2 \variable \once \override
> TextSpanner.rotation = #'(-7 -2.5 0)
>  c-1\stopTextSpan\startTextSpan g_2 f_3
>  e2_4\stopTextSpan
> }
>
> ... but it's very not very friendly to use. Does exist anything better?
> Thank you, g.
>

I don't know if anything better exists, but I'm sure this could be
automated to some degree.  The spanner is aware of the note columns it
passes over, and this information could be used to calculate the Y
subproperty of the spanner's left and right bounds.  I couldn't say if
you'd still need to tweak the results with the rotation property,
however!

Best,

David

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

Reply via email to