|
|
GNU LilyPondWelcome to the home of the GNU Music Typesetter |
||||||||||
|
Node:Polyphony, Next:Beaming, Previous:Staff notation, Up:Reference Manual PolyphonyPolyphonic parts, i.e. parts with more than one voice on a staff can be typeset with LilyPond. The easiest way to enter such fragments, is the Scheme function
\context Voice = VA \apply #voicify-music \relative c'' {
c4 < { f d e } \\ { b c2 } > c4 < g' \\ c, \\ f \\ d >
}
The function contexts, bearing the names To explicity typeset polyphonic music, instantiate a separate Voice
context for each part, and assign a stem direction to each part.
\context Staff
< \context Voice = VA { \stemUp b'4 a' g' f' e' }
\context Voice = VB { \stemDown g'4 g' g' g' g' } >
When there are more than two voices on a staff, you must also indicate
which voice should moved horizontally in case of a collision. This can
be done with the identifiers \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
}
>
The most convenient way is to use the identifiers \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 } >
Normally, note heads with a different number of dots are not merged, but
if you set the grob property \context Staff <
\context Voice = VA { \voiceOne
g'8 g'8
\property Staff.NoteCollision \override #'merge-differently-dotted = ##t
g'8 g'8
}
\context Voice = VB { \voiceTwo [g'8. f16] [g'8. f'16] }
>
LilyPond also vertically shifts rests that are opposite of a stem.
\context Staff <
\context Voice { \stemUp c''4 }
\context Voice =VB { r4 }
>
Note head collisions (horizontal shifting of note heads) are handled by the NoteCollision grob. RestCollision handles vertical shifting of rests. 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 lilypond@packages.debian.org Copyright (c) 1997--2001 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.4.12 (stable-branch) by