lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tablature - Parenthesizing Tied Notes


From: Jean Abou Samra
Subject: Re: Tablature - Parenthesizing Tied Notes
Date: Wed, 9 Feb 2022 19:14:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]