Next: Automatic part combining, Up: Multiple voices
Normally, note heads with a different number of dots are not
merged, but when the object property
merge-differently-dotted
is set in the
NoteCollision object, they are merged:
\new Voice << { g8 g8 \override Staff.NoteCollision #'merge-differently-dotted = ##t g8 g8 } \\ { g8.[ f16] g8.[ f16] } >>
Similarly, you can merge half note heads with eighth notes, by
setting merge-differently-headed
:
\new Voice << { c8 c4. \override Staff.NoteCollision #'merge-differently-headed = ##t c8 c4. } \\ { c2 c2 } >>
merge-differently-headed
and
merge-differently-dotted
only apply to opposing stem
directions (i.e. Voice 1 & 2).
LilyPond also vertically shifts rests that are opposite of a stem, for example
\new Voice << c''4 \\ r4 >>
If three or more notes line up in the same column,
merge-differently-headed
cannot successfully complete the
merge of the two notes that should be merged. To allow the merge
to work properly, apply a \shift
to the note that should
not be merged. In the first measure of following example,
merge-differently-headed
does not work (the half-note head
is solid). In the second measure, \shiftOn
is applied to
move the top g
out of the column, and
merge-differently-headed
works properly.
\override Staff.NoteCollision #'merge-differently-headed = ##t << { d=''2 g2 } \\ { \oneVoice d=''8 c8 r4 e,8 c'8 r4 } \\ { \voiceFour e,,2 e'2} >> << { d'=''2 \shiftOn g2 } \\ { \oneVoice d=''8 c8 r4 e,8 c'8 r4 } \\ { \voiceFour e,,2 e'2} >>
In some instances of complex polyphonic music, you may need additional voices to avoid collisions between notes. Additional voices are added by defining an variable, as shown below:
voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice) \relative c''' << { \voiceOne g4 ~ \stemDown g32[ f( es d c b a b64 )g] } \\ { \voiceThree b4} \\ { \voiceFive d,} \\ { \voiceTwo g,} >>
\oneVoice
,
\voiceOne
,
\voiceTwo
,
\voiceThree
,
\voiceFour
.
\voiceNeutralStyle \voiceOneStyle \voiceTwoStyle \voiceThreeStyle \voiceFourStyle
\shiftOn
,
\shiftOnn
,
\shiftOnnn
,
\shiftOff
: these commands specify the degree to which
chords of the current voice should be shifted. The outer voices
(normally: voice one and two) have \shiftOff
, while the
inner voices (three and four) have \shiftOn
.
\shiftOnn
and \shiftOnnn
define further shift
levels.
When LilyPond cannot cope, the force-hshift
property of the
NoteColumn object and pitched rests can be used to
override typesetting decisions.
\relative << { <d g> <d g> } \\ { <b f'> \once \override NoteColumn #'force-hshift = #1.7 <b f'> } >>
Snippets: Simultaneous .
Internals Reference: the objects responsible for resolving collisions are NoteCollision and RestCollision.
When using merge-differently-headed
with an upstem eighth
or a shorter note, and a downstem half note, the eighth note gets
the wrong offset.
There is no support for clusters where the same note occurs with
different accidentals in the same chord. In this case, it is
recommended to use enharmonic transcription, or to use special
cluster notation (see Clusters).
Next: Automatic part combining, Up: Multiple voices
Diese Seite ist für LilyPond-2.11.40 (Entwicklungszweig).
Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.
Ihre Vorschläge für die Dokumentation sind willkommen.