Showing posts with label stems. Show all posts
Showing posts with label stems. Show all posts

Monday, May 12, 2008

LilyPond cross-staff stems

Cross-staff stem lengths set manually.



\layout {
ragged-right = ##t
\context {
\Score
proportionalNotationDuration = #(ly:make-moment 1 48)
\override NonMusicalPaperColumn
#'line-break-system-details =
#'((alignment-offsets . (0 -8)))
autoBeaming = ##f } }

\new PianoStaff <<
\new Staff = "RH" {
#(set-accidental-style 'forget)
\override Beam #'positions = #'(8 . 8)
\override Stem #'direction = #up
<d'>16 [
<d'>16
<d'>16
<d'>16 ]
}
\new Staff = "LH" {
\clef bass
\override Stem #'flag-style = #'no-flag
\override Stem #'length = #20
\override Stem #'cross-staff = ##t
<c>16
<c>16
<c>16
<c>16
}
>>

Stem overrides to 'flag-style, 'length and 'cross-staff all matter.

Thursday, May 8, 2008

Making LilyPond stems disappear

Setting Stem #'stencil = ##f can cause problems. Setting Stem #'length = #0 works better.



\new Staff {
\override Stem #'length = #0
c'4 d'4 e'4 f'4
g'4 a'4 b'4 c''4
d''4 e''4 f''4 g''4
}

But even zero-length stems extend to the center line. The no-stem-extend attribute in stem-interface helps.




\new Staff {
\override Stem #'length = #0
\override Stem #'no-stem-extend = ##t
c'4 d'4 e'4 f'4
g'4 a'4 b'4 c''4
d''4 e''4 f''4 g''4
}

Zero-length stems now exhibit true zero length.