Jump to content

Adjusting grace note spacing: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
No edit summary
Line 19: Line 19:
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Rhythms]]
[[Category:Rhythms]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]][[Category:Snippet]]

Revision as of 22:46, 21 November 2025

The space given to grace notes can be adjusted using the spacing-increment property of Score.GraceSpacing.

\version "2.24"

graceNotes = {
  \grace { c4 c8 c16 c32 }
  c8
}

\relative c'' {
  c8
  \graceNotes
  \override Score.GraceSpacing.spacing-increment = #2.0
  \graceNotes
  \revert Score.GraceSpacing.spacing-increment
  \graceNotes
}