Jump to content

Positioning grace notes with floating space: Difference between revisions

From LilyPond wiki
mNo edit summary
mNo edit summary
 
Line 1: Line 1:
Setting the property <code>'strict-grace-spacing</code> 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.
Setting the property <code>strict-grace-spacing</code> 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.


<lilypond version="2.24">
<lilypond version="2.24">

Latest revision as of 08:17, 8 December 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
    }
  >>
}