Indicating position and barring

This example demonstrates how to include guitar position and barring indications using a barré line.

\relative {
  \clef "treble_8"
  b,16 d g b e
  \once \override TextSpanner.bound-details.left.text =
    \markup {"XII" \hspace #0.4 }
  \once \override TextSpanner.bound-details.right.text =
    \markup \draw-line #'(0 . -.5)
  \once \override TextSpanner.bound-details.right.padding = -0.65
  \once \override TextSpanner.dash-fraction = 0.4
  \once \override TextSpanner.dash-period = 1.3
  g16\startTextSpan
  b16 e g e b g\stopTextSpan
  e16 b g d
}

[image of music]

A more sophisticated solution can be found in LSR snippet 952.

See also

Notation Reference: Text spanners.

Snippets: Fretted strings, Expressive marks.


LilyPond Notation Reference v2.25.22 (development-branch).