Jump to content

Breaking vertical alignment of dynamics and textscripts

From LilyPond wiki
Revision as of 23:33, 21 November 2025 by Lemzwerg (talk | contribs) (New category)

By default, LilyPond uses DynamicLineSpanner grobs to vertically align successive dynamic objects like hairpins and dynamic text. However, this is not always wanted. By inserting \breakDynamicSpan, which ends the alignment spanner prematurely, this vertical alignment can be avoided.

\version "2.24"

{ g1\< |
  e''\f\> |
  c'\p }

{ g1\< |
  e''\breakDynamicSpan\f\> |
  c'\p }

\paper { tagline = ##f }