Jump to content

Positioning grace notes with floating space: Difference between revisions

From LilyPond wiki
No edit summary
m New category
Tags: Mobile edit Mobile web edit
Line 18: Line 18:


[[Category:Rhythms]]
[[Category:Rhythms]]
[[Category:Included in the official documentation]][[Category:Snippet]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Revision as of 23:20, 21 November 2025

Setting the property 'strict-grace-spacing makes the musical columns for grace notes 'floating', i.e., decoupled from the non-grace notes: first the normal notes are spaced, then the (musical columns of the) graces are put left of the musical columns for the main notes.

\version "2.24"

\relative c'' {
  <<
    \override Score.SpacingSpanner.strict-grace-spacing = ##t
    \new Staff \new Voice {
      \afterGrace c4 { c16[ c8 c16] }
      c8[ \grace { b16 d } c8]
      c4 r
    }
    \new Staff {
      c16 c c c c c c c c4 r
    }
  >>
}