Bindebogen mit Text
Zur Navigation springen
Zur Suche springen
Bindebogen mit Text
annotatedSlur =
#(define-music-function (padding text) ((number? 1) markup?)
#{
\once \override Slur.after-line-breaking =
#(lambda (grob)
(let*
((stencil (ly:slur::print grob))
(dir (ly:grob-property grob 'direction))
(markup-stencil (grob-interpret-markup grob text))
(shift (- (interval-center (ly:stencil-extent stencil X))
(interval-center (ly:stencil-extent markup-stencil X))))
(new-stencil
(ly:stencil-combine-at-edge
stencil
Y dir
(ly:stencil-translate-axis markup-stencil shift X)
padding)))
(ly:grob-set-property! grob 'stencil new-stencil)))
#})
}
Anwendung
\score {
\new Staff
\new Voice
{
{
\annotatedSlur \markup \fontsize #-2 "padding default"
c''4-( c'' c'' c'' )
}
{
\annotatedSlur #0.5 \markup \fontsize #-2 "padding #0.5"
g'4-( g' g' g' )
}
{
\annotatedSlur #-7.5 \markup \fontsize #-2 "padding #-7.5"
g'4-( g' g' g' )
}
}
}