Next: Staff notation, Previous: Repeats, Up: Top
These snippets illustrate the Notation Reference, section Simultaneous notes.
In some instances of complex polyphonic music, additional voices are
necessary to prevent collisions between notes. If more than four
parallel voices are needed, additional voices can be added by defining
a variable using the Scheme function context-spec-music
.
voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice) \relative c'' { \time 3/4 \key d \minor \partial 2 << { \voiceOne a4. a8 e'4 e4. e8 f4 d4. c8 } \\ { \voiceThree f,2 bes4 a2 a4 s2 } \\ { \voiceFive s2 g4 g2 f4 f2 } \\ { \voiceTwo d2 d4 cis2 d4 bes2 } >> }
Individual note heads in a chord can be modified with the
\tweak
command inside a chord, by altering the font-size
property.
Inside the chord (within the brackets < >
), before the note to
be altered, place the \tweak
command, followed by
#'font-size
and define the proper size like #-2
(a tiny
notehead).
\layout { ragged-right = ##t } \relative { <\tweak #'font-size #+2 c e g c \tweak #'font-size #-2 e>1^\markup { A tiny e }_\markup { A big c } }
When using the automatic part combining feature, the printed text for the solo and unison sections may be changed:
\new Staff << \set Staff.soloText = #"girl" \set Staff.soloIIText = #"boy" \set Staff.aDueText = #"together" \partcombine \relative c'' { g4 g r r a2 g } \relative c'' { r4 r a( b) a2 g } >>
Clusters are a device to denote that a complete range of notes is to be played.
\layout { ragged-right = ##t } fragment = \relative c' { c4 f <e d'>4 <g a>8 <e a> a4 c2 <d b>4 e2 c } << \new Staff \fragment \new Staff \makeClusters \fragment >>
The part combiner tool ( \partcombine
command ) allows the
combination of several different parts on the same staff. Text
directions such as "solo" or "a2" are added by default; to remove
them, simply set the property printPartCombineTexts
to
"false". For vocal scores (hymns), there is no need to add
"solo"/"a2" texts, so they should be switched off. However, it
might be better not to use it if there are any solos, as they won't be
indicated. In such cases, standard polyphonic notation may be
preferable.
This snippet presents the three ways two parts can be printed on a same
staff: standard polyphony, \partcombine
without texts, and
\partcombine
with texts.
musicUp = \relative c'' { \time 4/4 a4 c4.( g8) a4 | g4 e' g,( a8 b) | c b a2. } musicDown = \relative c'' { g4 e4.( d8) c4 | r2 g'4( f8 e) | d2 \stemDown a } \score { << << \new Staff { \set Staff.instrumentName = "Standard polyphony " << \musicUp \\ \musicDown >> } \new Staff \with { printPartCombineTexts = ##f } { \set Staff.instrumentName = "PartCombine without texts " \partcombine \musicUp \musicDown } \new Staff { \set Staff.instrumentName = "PartCombine with texts " \partcombine \musicUp \musicDown } >> >> \layout { indent = 6.0\cm \context { \Score \override SystemStartBar #'collapse-height = #30 } } }
When the typesetting engine cannot cope, the force-hshift
property of the NoteColumn
object can be used to override
typesetting decisions. The measure units used here are staff spaces.
\relative c' << { <d g>2 <d g> } \\ { <b f'>2 \once \override NoteColumn #'force-hshift = #1.7 <b f'>2 } >>
If notes from two voices with stems in the same direction are
placed at the same position, and both voices have no shift or the
same shift specified, the error message "warning: ignoring too
many clashing note columns" will appear when compiling the
LilyPond file. This message can be suppressed by setting the
'ignore-collision
property of the NoteColumn
object
to #t
.
ignore = \override NoteColumn #'ignore-collision = ##t \relative c' << \ignore { \stemDown f2 g } \\ { c2 c, } >>
This page is for LilyPond-2.11.58 (development-branch).
Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Your suggestions for the documentation are welcome.