4.5.2 New spacing section

New sections with different spacing parameters can be started with the newSpacingSection command. This is useful for sections with different notions of ‘long’ and ‘short’ notes. The \newSpacingSection command creates a new SpacingSpanner object at that musical moment.

In the following example the time signature change introduces a new section, and the 16ths notes are automatically spaced slightly wider apart.

\relative c' {
  \time 2/4
  c4 c8 c
  c8 c c4 c16[ c c8] c4
  \newSpacingSection
  \time 4/16
  c16[ c c8]
}

[image of music]

If the automatic spacing adjustments do not give the required spacing, manual \overrides may be applied to its properties. These must be applied at the same musical moment as the \newSpacingSection command itself and will then affect the spacing of all the following music until the properties are changed in a new spacing section, for example:

\relative c' {
  \time 4/16
  c16[ c c8]
  \newSpacingSection
  \override Score.SpacingSpanner.spacing-increment = #2
  c16[ c c8]
  \newSpacingSection
  \revert Score.SpacingSpanner.spacing-increment
  c16[ c c8]
}

[image of music]

See also

Snippets: Spacing.

Internals Reference: SpacingSpanner.


LilyPond — Notation Reference v2.23.82 (development-branch).