Jump to content

Forcing measure width to adapt to a metronome mark’s width

From LilyPond wiki
Revision as of 12:19, 5 December 2025 by Lemzwerg (talk | contribs) (Improve)

By default, metronome marks do not influence horizontal spacing. This can be solved through a simple override, as shown in the second half of the example.

\version "2.24"

example = {
  R1
  \tempo "Allegro molto"
  R1*6
  \tempo "poco rit."
  R1*2
  \tempo "a tempo"
  R1*8
}

{
  \compressMMRests {
    \example
    \override Score.MetronomeMark.extra-spacing-width = #'(-3 . 0)
    \example
  }
}