|
|
GNU LilyPond-- -- |
||||||||||
|
PolyphonyThe easiest way to enter such fragments with more than one voice on a
staff is to split chords using the separator \context Voice = VA \relative c'' {
c4 < { f d e } \\ { b c2 } > c4 < g' \\ b, \\ f \\ d >
}
The separator causes Voice
contexts to be instantiated,
bearing the names Sometimes, it is necessary to instantiate these contexts by hand: For
Instantiate a separate Voice context for each part, and use
\relative c''
\context Staff < \context Voice = VA { \voiceOne cis2 b }
\context Voice = VB { \voiceThree b4 ais ~ ais4 gis4 }
\context Voice = VC { \voiceTwo fis4~ fis4 f ~ f } >
The identifiers If you want more than four voices, you can also manually set horizontal shifts and stem directions, as is shown in the following example: \context Staff \notes\relative c''<
\context Voice=one {
\shiftOff \stemUp e4
}
\context Voice=two {
\shiftOn \stemUp cis
}
\context Voice=three {
\shiftOnn \stemUp ais
}
\context Voice=four {
\shiftOnnn \stemUp fis
}
>
Normally, note heads with a different number of dots are not merged, but
if you set the object property \context Voice < {
g'8 g'8
\property Staff.NoteCollision \override
#'merge-differently-dotted = ##t
g'8 g'8
} \\ { [g'8. f16] [g'8. f'16] }
>
Similarly, you can merge half note heads with eighth notes, by setting
\context Voice < {
c8 c4.
\property Staff.NoteCollision
\override #'merge-differently-headed = ##t
c8 c4. } \\ { c2 c2 } >
LilyPond also vertically shifts rests that are opposite of a stem. \context Voice < c''4 \\ r4 >
See also NoteCollision and RestCollision BUGS Resolving collisions is a very intricate subject, and LilyPond only
handles a few situations. When it can not cope, you are advised to use
|
||||||||||
|
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to lilypond-user@gnu.org. Please send comments on these web pages to (address unknown) Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
|||||||||||
This page was built from LilyPond-1.6.6 (stable-branch) by