Thursday, May 22, 2008

Making LilyPond accidentals consume no horizontal space

Accidentals consume no horizontal space with their X-extent set to zero.


\new Staff {
\set Score.proportionalNotationDuration = #(ly:make-moment 1 32)
\override Accidental #'X-extent = #'(0 . 0)
\override Accidental #'extra-offset = #'(-1 . 0)
c'16
cis'16
c'16
c'16
c'16
c'16
c'16
c'16
}

extra-offset is required to move zero-width accidentals away from the left edge of the parent notehead.

No comments: