3.2.2 Explicitly instantiating voices

Voice contexts can also be created manually
inside a << >> block to create polyphonic music, using
\voiceOne … \voiceFour to indicate the required
directions of stems, slurs, etc. In longer scores this method
is clearer, as it permits the voices to be separated and to be
given more descriptive names.

Specifically, the construct << \\ >> which we used in
the previous section:

The \voiceXXX commands set the direction of stems, slurs,
ties, articulations, text annotations, augmentation dots of dotted
notes, and fingerings. \voiceOne and \voiceThree
make these objects point upwards, while \voiceTwo and
\voiceFour make them point downwards. These commands also
generate a horizontal shift for each voice when this is required
to avoid clashes of note heads. The command \oneVoice
reverts the settings back to the normal values for a single voice.

Let us see in some simple examples exactly what effect
\oneVoice, \voiceOne and voiceTwo have on
markup, ties, slurs, and dynamics:

Now let’s look at three different ways to notate the same passage of
polyphonic music, each of which is advantageous in different
circumstances, using the example from the previous section.

An expression that appears directly inside a << >> belongs to the
main voice (but, note, not in a << \\ >> construct).
This is useful when extra voices appear while the main voice is playing.
Here is a more correct rendition of our example. The red diamond-shaped
notes demonstrate that the main melody is now in a single voice context,
permitting a phrasing slur to be drawn over them.

This method of nesting new voices briefly is useful
when only small sections of the music
are polyphonic, but when the whole staff is largely polyphonic
it can be clearer to use multiple voices throughout, using
spacing notes to step over sections where the voice is silent,
as here:

Note columns

Closely spaced notes in a chord, or notes occurring at the same
time in different voices, are arranged in two, occasionally more,
columns to prevent the note heads overlapping. These are called
note columns. There are separate columns for each voice, and
the currently specified voice-dependent shift is applied to the
note column if there would otherwise be a collision. This can
be seen in the example above. In bar 2 the C in voice two is
shifted to the right relative to the D in voice one, and in the
final chord the C in voice three is also shifted to the right
relative to the other notes.

The \shiftOn, \shiftOnn, \shiftOnnn, and
\shiftOff commands specify the degree to which notes and
chords of the voice should be shifted if a collision
would otherwise occur. By default, the outer voices (normally
voices one and two) have \shiftOff specified, while the
inner voices (three and four) have \shiftOn specified.
When a shift is applied, voices one and three are shifted to
the right and voices two and four to the left.

\shiftOnn and \shiftOnnn define further shift
levels which may be specified temporarily to resolve collisions
in complex situations – see Real music example.

A note column can contain just one note (or chord) from a voice
with stems up and one note (or chord) from a voice with stems
down. If notes from two voices which have their 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
“Too many clashing note columns” will be produced.