String number extender lines: Difference between revisions
Appearance
No edit summary |
m New category Tags: Mobile edit Mobile web edit |
||
| Line 31: | Line 31: | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Scheme]] | [[Category:Scheme]] | ||
[[Category:Included in the official documentation]][[Category:Snippet]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Revision as of 23:21, 21 November 2025
Make an extender line for string number indications, showing that a series of notes is supposed to be played all on the same string.
\version "2.24"
stringNumberSpanner =
#(define-music-function (StringNumber) (string?)
#{
\override TextSpanner.style = #'solid
\override TextSpanner.font-size = #-5
\override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER
\override TextSpanner.bound-details.left.text =
\markup { \circle \number $StringNumber }
#})
\relative c {
\clef "treble_8"
\stringNumberSpanner "5"
\textSpannerDown
a8\startTextSpan
b c d e f\stopTextSpan
\stringNumberSpanner "4"
g\startTextSpan a
bes4 a g2\stopTextSpan
}