When different melodic lines are combined on a single staff, these are printed as polyphonic voices: each voice has its own stems, slurs and beams, and the top voice has the stems up, while the bottom voice has them down.
Entering such parts is done by entering each voice as a sequence (with
{ .. }
), and combining those simultaneously, separating the
voices with \\
:
<< { a4 g2 f4~ f4 } \\ { r4 g4 f2 f4 } >>
For polyphonic music typesetting, spacer rests can also be convenient: these are rests that do not print. It is useful for filling up voices that temporarily do not play:
<< { a4 g2 f4~ f4 } \\ { s4 g4 f2 f4 } >>
Again, these expressions can be nested arbitrarily:
More features of polyphonic typesetting are in the notation manual in Polyphony.
This page is for LilyPond-2.0.1 (stable-branch).