5

I have a question if the following possible in lilypond. The lines above the bar. I have not found how I can do that.

enter image description here

1 Answers1

4

Yes and no. It can be faked, but not really done the easy way:

fingerLineStart =
#(define-music-function (n) (number?)
   #{
     -\tweak TextSpanner.bound-details.left.text \markup\fontsize #-5 #(number->string n)
     -\tweak TextSpanner.font-encoding #'fetaText
     -\tweak TextSpanner.font-features #'("cv47" "ss01")
     -\tweak TextSpanner.style #'line
     -\startTextSpan
   #})

\relative {
  e''16-4 
  cis\fingerLineStart 2
  g
  << 
    { e
      e' cis g e
      e' cis g e\stopTextSpan
    } 
    \new Voice {
      % Lilypond does not allow two concurrent TextSpanners in one Voice, so create a new Voice?
      s\fingerLineStart 1
      s4 s8. s16\stopTextSpan
    }
  >>
  e'-0 g e cis
}

Edit: Here’s a version that matches the original a bit better in terms of spacing:

fingerLineStart =
#(define-music-function (n) (number?)
   #{
     -\tweak TextSpanner.bound-details.left.text \markup\fontsize #-5 #(number->string n)
     -\tweak TextSpanner.bound-details.left.stencil-align-dir-y #-0.3
     -\tweak TextSpanner.font-encoding #'fetaText
     -\tweak TextSpanner.font-features #'("cv47" "ss01")
     -\tweak TextSpanner.style #'line
     -\tweak TextSpanner.vertical-skylines #grob::unpure-vertical-skylines-from-stencil
     -\startTextSpan
   #})

\relative {
  e''16-4 
  cis\fingerLineStart 2
  g
  << 
    { e
      e' cis g e
      e' cis g e\stopTextSpan
    } 
    \new Voice {
      % Lilypond does not allow two concurrent TextSpanners in one Voice, so create a new Voice?
      s\fingerLineStart 1
      s4 s8. s16\stopTextSpan
    }
  >>
  e'-0 g e cis
}
Lazy
  • 12,346
  • 1
  • 9
  • 31