lilypond-user
[Top][All Lists]
Advanced

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

Re: Tablature - Parenthesizing Tied Notes


From: Stefan E. Mueller
Subject: Re: Tablature - Parenthesizing Tied Notes
Date: Fri, 11 Feb 2022 22:31:20 +0100 (CET)

Thanks Jean,

but it looks like I am a little behind with my Debian package-based
Lilypond 2.18.2 installation. So I get some complaints about "Unbound
variable: grob::rhythmic-location" and Lilypond exits in error with return
code 1.

I still need to grok all this scheme/guile mechanics, because so far I did
not dive into the deeper layers of Lilypond yet. Eventually I can get it
to work also with 2.18.2, or manage to update to the latest version.

Again thanks for the help, this is very appreciated.

        Stefan

--
Stefan E. Mueller

stefan.e.mueller@gmx.de

On Wed, 9 Feb 2022, Jean Abou Samra wrote:

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]