Showing posts with label horizontal spacing. Show all posts
Showing posts with label horizontal spacing. Show all posts

Monday, June 2, 2008

Minimum LilyPond glissando lengths

From Matt on the list two weeks ago:

\override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
\override Glissando #'minimum-length = #4

The code is a mystery but potentially useful for the spacing of a variety of objects. Will require tests.

Thursday, May 22, 2008

After grace positioning in LilyPond

LilyPond renders after grace notes well in a variety of metric positions.



\layout { indent = #0
ragged-right = ##t
}

\new Staff \with {
\remove Time_signature_engraver
} {
\set Score.proportionalNotationDuration = #(ly:make-moment 1 32)
\override Score.SpacingSpanner #'uniform-stretching = ##t
\override Score.SpacingSpanner #'strict-note-spacing = ##t
\override Score.SpacingSpanner #'strict-grace-spacing = ##t
\override Stem #'direction = #down
\afterGrace c'8 [ { c'32 [ c'32 c'32 c'32 ] } c'8 c'8 c'8 ]
c'8 [ \afterGrace c'8 { c'32 [ c'32 c'32 c'32 ] } c'8 c'8 ]
c'8 [ c'8 \afterGrace c'8 { c'32 [ c'32 c'32 c'32 ] } c'8 ]
c'8 [ c'8 c'8 \afterGrace c'8 ] { c'32 [ c'32 c'32 c'32 ] }
}

Time signatures and strict note spacing in LilyPond

Time signatures and strict note spacing in LiyPond disagree.



Time signatures with strict note spacing turned on. The bracket underextends and the time signature and noteheads overlap.




Time signatures with strict note spacing turned off. The bracket extends correctly and neither the time signaure nore noteheads overlap.

Spacing LilyPond trill spanners

Consecutive LilyPond trill spanners overlap at the same vertical position. The spanner package in 2.11 fixes this with independent control of left and right padding.



\new Staff {
\override TrillSpanner #'bound-details #'right #'padding = #2
c'4 \startTrillSpan
c'4 \stopTrillSpan \startTrillSpan
\revert TrillSpanner #'bound-details #'right
c'4 \stopTrillSpan \startTrillSpan
c'4 \stopTrillSpan
}

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.