5

I'm making a fingering chart for a 5-valve tuba, but having some troubles.

enter image description here

In the top line, I'm using lilypond's built in fingerings:

\relative bes,,{  <bes-0>  <b-123> ... }

I guess this is fine, but I'd like to make it a bit more graphical.

In the second line, I am replacing the NoteHead with a note-head glyph and the postscript. I love that it is close to the NoteHead, but I don't like the extended ledger lines.

\override NoteHead.stencil = #ly:text-interface::print
\override NoteHead.X-offset = 0.6
\relative bes,,{
  \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #open }
  bes
  \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #twofour }
  b
  ...
}

After failing to override LedgerLineSpanner nicely, I realized that manually re-drawing the whole NoteHead was probably not the right answer. Instead, I tried to override fingering:

\override Fingering.parent-alignement-X = 1
\override Fingering.staff-padding = #'()
\override Fingering.direction = #LEFT
\relative bes,,{
  bes\finger \markup \postscript #open
  b\finger \markup \postscript #twofour
  ...
}

But I'm having trouble getting it to be right of the note head. Any suggestions?

Here is the full *.ly:

\version "2.24.1"
\header{
  tagline=##f  
}

open = #"
  0.15 setlinewidth
  2.5  3.9 moveto
  2.0  3.9 0.5 0 361 arc stroke
  2.5  2.8 0.5 0 361 arc stroke
  2.25 1.6 0.5 0 361 arc stroke
  2.0  0.4 0.5 0 361 arc stroke
  newpath 
  0.25 2.5  moveto
  0.0  2.93 lineto
  0.43 3.18 lineto
  0.43 3.18 0.5 30 300 arcn
  closepath stroke
"

one = #"
  0.15 setlinewidth
  2.5  3.9 moveto
  2.0  3.9 0.6 0 361 arc fill
  2.5  2.8 0.5 0 361 arc stroke
  2.25 1.6 0.5 0 361 arc stroke
  2.0  0.4 0.5 0 361 arc stroke
  newpath 
  0.25 2.5  moveto
  0.0  2.93 lineto
  0.43 3.18 lineto
  0.43 3.18 0.5 30 300 arcn
  closepath stroke
"

onetwo = #"
  0.15 setlinewidth
  2.5  3.9 moveto
  2.0  3.9 0.6 0 361 arc fill
  2.5  2.8 0.6 0 361 arc fill
  2.25 1.6 0.5 0 361 arc stroke
  2.0  0.4 0.5 0 361 arc stroke
  newpath 
  0.25 2.5  moveto
  0.0  2.93 lineto
  0.43 3.18 lineto
  0.43 3.18 0.5 30 300 arcn
  closepath stroke
"

two = #"
  0.15 setlinewidth
  2.5  3.9 moveto
  2.0  3.9 0.5 0 361 arc stroke
  2.5  2.8 0.6 0 361 arc fill  
  2.25 1.6 0.5 0 361 arc stroke
  2.0  0.4 0.5 0 361 arc stroke
  newpath 
  0.25 2.5  moveto
  0.0  2.93 lineto
  0.43 3.18 lineto
  0.43 3.18 0.5 30 300 arcn
  closepath stroke
"

twothree = #"
  0.15 setlinewidth
  2.5  3.9 moveto
  2.0  3.9 0.5 0 361 arc stroke
  2.5  2.8 0.6 0 361 arc fill  
  2.25 1.6 0.6 0 361 arc fill
  2.0  0.4 0.5 0 361 arc stroke
  newpath 
  0.25 2.5  moveto
  0.0  2.93 lineto
  0.43 3.18 lineto
  0.43 3.18 0.5 30 300 arcn
  closepath stroke
"

twofour = #"
  0.15 setlinewidth
  2.5  3.9 moveto
  2.0  3.9 0.5 0 361 arc stroke
  2.5  2.8 0.6 0 361 arc fill  
  2.25 1.6 0.5 0 361 arc stroke
  2.0  0.4 0.6 0 361 arc fill  
  newpath 
  0.25 2.5  moveto
  0.0  2.93 lineto
  0.43 3.18 lineto
  0.43 3.18 0.5 30 300 arcn
  closepath stroke
"

four = #"
  0.15 setlinewidth
  2.5  3.9 moveto
  2.0  3.9 0.5 0 361 arc stroke
  2.5  2.8 0.5 0 361 arc stroke
  2.25 1.6 0.5 0 361 arc stroke
  2.0  0.4 0.6 0 361 arc fill  
  newpath 
  0.25 2.5  moveto
  0.0  2.93 lineto
  0.43 3.18 lineto
  0.43 3.18 0.5 30 300 arcn
  closepath stroke
"

\new Staff = "main" {
  \omit Staff.TimeSignature
  \time 13/4
  \clef bass
  \set fingeringOrientations = #'(right)
  \relative bes,,{
    <bes-0>
    <b-123>
    <c-13>
    <des-23>
    <d-12>
    <ees-1>
    <e-2>
    <f-0>
    <ges-23>
    <g-12>
    <aes-1>
    <a-2>
    <bes-0>
  }\break


  \override NoteHead.stencil = #ly:text-interface::print
  \override NoteHead.X-offset = 0.6

  \relative bes,,{
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #open }
    bes
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #twofour }
    b 
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #four }
    c
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #twothree }
    des
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #onetwo }
    d
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #one }
    ees
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #two }
    e
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #open }
    f
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #twothree }
    ges
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #onetwo }
    g
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #one }
    aes
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #two }
    a
    \once \override NoteHead.text = \markup{ \musicglyph "noteheads.s2" \postscript #open }
    bes
  }\break

  \revert NoteHead.stencil
  \revert NoteHead.X-offset


  \override Fingering.parent-alignment-X = 1
  \override Fingering.staff-padding = #'()
  \override Fingering.direction = #RIGHT

  \relative bes,,{
    bes\finger \markup \postscript #open
    b\finger \markup \postscript #twofour
    c\finger \markup \postscript #four
    des\finger \markup \postscript #twothree
    d\finger \markup \postscript #onetwo
    ees\finger \markup \postscript #one
    e\finger \markup \postscript #two
    f\finger \markup \postscript #open
    ges\finger \markup \postscript #twothree
    g\finger \markup \postscript #onetwo
    aes\finger \markup \postscript #one
    a\finger \markup \postscript #two
    bes\finger \markup \postscript #open
  }
}

\layout{
  indent = 0\cm
  \context {
    \Score
    \omit BarNumber
  }
}

1 Answer 1

8

I'm not sure where exactly the problem is — I don't know how to override the properties of Fingering to get the exact behavior you want. However, I know a simpler way of doing it (hopefully).

If you want the fingerings to be put into certain position with respect to the note (left/right/up/down), you should set fingeringOrientations like this:

\set fingeringOrientations = #'(left)

This will put all fingerings to the left of the notehead if and only if the note is a part of a chord (I have no idea why it's like this, but it's the official and well-documented behavior). So, if you write c4-1 d4-2 e4-3 etc., setting the fingeringOrientations will make no difference whatsoever! But if you make these notes into one-note chords like <c-1>4 <d-2> <e-3>, the fingerings will go to the left.

Throwing away your Fingering overrides, and replacing the code for the third line with this:

\set fingeringOrientations = #'(right)

\relative bes,,{
  <bes\finger \markup \postscript \open>
  <b\finger \markup \postscript \twofour>

etc. will do the trick:

enter image description here

5
  • Fantastic! That's what I needed. I couldn't figure out why fingeringOrientations wasn't working. It was the chord behaviour. I like this.
    – Stewart
    Nov 21, 2023 at 19:14
  • I also definitely would not have figured out the \open vs #open syntax on my own.
    – Stewart
    Nov 21, 2023 at 19:17
  • 1
    This behavior is in fact caused by the Fingering_engraver. This one directly listens to fingering events, which does not work for Notes in chords (as here the articulations are not broadcasted). So the Fingering_engraver only handles fingerings like this c\finger1 but not <c\finger1>. We also have the more advanced New_fingering_engraver. But as both engravers are present the Fingering_engraver will handle the event, at which point it gets removed from the note event. Thus the other one does not see it, so we do not get two grobs.
    – Lazy
    Nov 21, 2023 at 19:32
  • 1
    But this also means that the <c\finger1> is handled by the New_fingering_engraver which does use fingeringOrientations while c\finger1 is handled by Fingering_engraver, which does not. Removing Fingering_engraver from the voice context will have both cases work the same.
    – Lazy
    Nov 21, 2023 at 19:34
  • Thanks for the info @Lazy, I learned something.
    – Stewart
    Nov 21, 2023 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.