Le 06/02/2022 à 22:55, Stefan E. Mueller a écrit :
Ties over a line break are parenthesized by default in tablature - I was
wondering if one could also have parenthesized tablature notes for ties
over a bar line.
Thanks for any help.
Stefan
The default logic is in Tie.after-line-breaking, by default
tie::handle-tab-note-head in TabStaff. When the span-start
property of TabNoteHead is #t, it remains parenthesized
even if it would normally be hidden (this is used by default
when the tab note head starts a slur or glissando). You can
override the default logic to set it also in the case where
the tie spans a bar line.
\version "2.22.1"
#(use-modules (ice-9 match))
#(define (tie::tab-note-head-parenthesized-after-bar-line grob)
(match-let* ((left (ly:spanner-bound grob LEFT))
(right (ly:spanner-bound grob RIGHT))
((left-bar-number . _) (grob::rhythmic-location left))
((right-bar-number . _) (grob::rhythmic-location right)))
(if (and (grob::has-interface right 'tab-note-head-interface)
(not (eqv? left-bar-number right-bar-number)))
(ly:grob-set-property! right 'span-start #t))
(tie::handle-tab-note-head grob)))
\layout {
\context {
\TabStaff
\override Tie.after-line-breaking =
#tie::tab-note-head-parenthesized-after-bar-line
}
}
\new TabStaff {
c'2~ 2~ 2~ 2~ \break 2~ 2
}
Best,
Jean