lilypond

How to Vertically Move Tuplet Bracket in LilyPond?


I have a piece of music I am trying to rewrite with new fingerings, and it starts with a small section that gives you the basic idea on how to play the piece.

The problem is that with the notation I am trying to create I have a tuplet bracket that is coinciding with fingerings.

Is there a way to vertically move this bracket out of the way? Or am I stuck with simply repositioning the fingerings?

Rendering of the below code, showing tuplet (bracket and number) colliding with fingering.

Working snippet:

\version "2.24.4"
\language "english"

{
    \clef treble
    \time 2/4
    \tempo Adagio
    \key c \minor
    \fixed c' {
        \tupletUp \tuplet 6/4 4 {
            \override TupletBracket.tuplet-slur = ##t
            \override TupletBracket.bracket-visibility = ##t
            \override Fingering.staff-padding = #'()
            \set strokeFingerOrientations = #'(up)

            c16_1 \rightHandFinger #1 ^[
            g_0 \rightHandFinger #2
            af'_4 \rightHandFinger #4
            ef'_3 \rightHandFinger #3
            g'_2 \rightHandFinger #4
            g_0 \rightHandFinger #2 ]
        }
    }
}

I have attempted to override the y-position of TupletBracket to no avail, it does not move it at all.


Solution

  • You can move the tuplet bracket out of the way by overriding its padding, e.g.:
    \override TupletBracket.padding = #2

    And (as with other overrides) you can turn this off again with a \revert:
    \revert TupletBracket.padding

    Rendering of the code in the question, but with the padding override added.  The tuplet bracket and number are moved up avoiding a collision.

    This property of the tuplet bracket interface (and many others) can be found on this page of the internals documentation:
    https://lilypond.org/doc/v2.24/Documentation/internals/tuplet_002dbracket_002dinterface