lilypond

Move VoltaBracket in lilypond gracefully


is there way to properly move VoltaBracket so Lilypond can recalculate space?

I tried suggested settings in this page without success: https://lilypond.org/doc/v2.25/Documentation/learning/moving-objects

What I can do is to move VoltaBracket with

\override Score.VoltaBracket.extra-offset = #'(0 . -1.6)

but that is just moving object without constrains and space is not properly recalculated.

Default state:

First example of default state

Moving with extra-offset:

Extra offset

Annotated spacing:

I would like to decrease extra-dist space as much as possible. Ideally that Opus text is almost touching VoltaBracket. How can this be achieved properly please?

annotate-spacing

Example code:

\version "2.25.16"
\score {
    \header {
        piece = \markup { \fontsize #4 \bold "Something" }
        opus = \markup { \fontsize #4 \bold "Opus text" }
    }
    \relative d' {
        \override Score.VoltaBracket.extra-offset = #'(0 . -1.6)
        \clef "treble" \time 2/4 \key bes \major \transposition bes
        \repeat volta 2 {
          \bar "[|:"
          es4. 8 d4 c bes g f2 a4 bes4 c2
          \alternative {
            \volta 1 {
              bes2~ 8[ bes8( c d)]
              \bar ":|]"
            }
            \volta 2 {
              bes2~ 4 r4
            }
          }
        }
    }
}

Solution

  • It looks like this is the override you want:

    \override Score.VoltaBracketSpanner.padding = 0