Am Mi., 13. Nov. 2024 um 18:03 Uhr schrieb Peter X <peterandu...@gmail.com>:

> Could you kindly confirm if I should wait a bit longer for the 2.25.22 
> release, or if there is another way to access it? Additionally, if my 
> understanding is incorrect, please let me know how best to proceed.

Well, developing new features is usually best with the bleeding edge
of lilypond's source code, i.e. with a selfcompiled version from
latest master.
Nevertheless, the code posted so far works with 2.24. already,
probably even earlier. ;)
Alas, in my eagerness I forgot to include the actual music. Below, a
complete code, output attached.

Cheers,
  Harm

\version "2.24.3"

Tst_eng =
#(lambda (ctx)
  (let ((tab-note-heads '()))
    (make-engraver
      ((start-translation-timestep this)
        (set! tab-note-heads '()))
      (acknowledgers
        ((tab-note-head-interface this grob source)
         (set! tab-note-heads (cons grob tab-note-heads)))
        ((note-column-interface this grob source)
          (for-each
            (lambda (tab-nhd strg-fret)
              (let ((details (ly:grob-property tab-nhd 'details)))
                (when (assoc-get 'fingering-right details)
                  (ly:grob-set-property! tab-nhd 'stencil
                    (centered-stencil
                      (grob-interpret-markup tab-nhd
                        (case (car strg-fret)
                          ((1) "a")
                          ((2) "m")
                          ((3) "i")
                          (else "p"))))))))
            (reverse tab-note-heads)
            (ly:context-property ctx 'stringFretFingerList)))))))

\include "predefined-guitar-fretboards.ly"

music = {
  \override TabNoteHead.details.fingering-right = ##t
  \repeat unfold 2 { c8 g <c' e'> g }
  f a <c' f'> a
  \repeat unfold 3 { c8 g <c' e'> g }
  g, g <b f'> g
  \override TabNoteHead.details.fingering-right = ##f
  g' f' e' d'
}

<<
  \new ChordNames
    \chordmode { c1 f2 c c1 g1:7 }
  \new FretBoards
    \chordmode { c1 <f_3 a_2 c'_1 f'_1>2 c c1 g1:7 }
  \new TabVoice
    \with { \consists #Tst_eng }
    { \tabFullNotation \music }
>>

Reply via email to