]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/simultaneous.itely
Merge branch 'lilypond/translation' of ssh://trettig@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / Documentation / user / simultaneous.itely
index b2a2ccf2f99412f755a7e115c09a01eaaa71c849..0f83d5be042490b5130858366420d0b8f0e909cf 100644 (file)
@@ -18,8 +18,8 @@ in a piece of music.  Polyphony in LilyPond refers to having more
 than one voice on the same staff.
 
 @menu
-* Single voice::                
-* Multiple voices::             
+* Single voice::
+* Multiple voices::
 @end menu
 
 
@@ -29,12 +29,13 @@ than one voice on the same staff.
 This section discusses simultaneous notes inside the same voice.
 
 @menu
-* Chorded notes::                      
-* Clusters::                    
+* Chorded notes::
+* Parallel notes::
+* Clusters::
 @end menu
 
 @node Chorded notes
-@subsubsection Chorded notes
+@unnumberedsubsubsec Chorded notes
 
 @cindex chords
 @cindex brackets, angle
@@ -66,16 +67,51 @@ Notation Reference:
 Snippets:
 @rlsr{Simultaneous notes}.
 
+@ignore
 @knownissues
 
 For some reason, music expressions like @code{<< @{ g8 e8 @} a4 >>}
 that should automatically turn into chords, appear split in two
 staves.  To avoid this, use explicit chords instead as in
 @code{<g a>8 <e a>8}.
+@end ignore
+
+@node Parallel notes
+@unnumberedsubsubsec Parallel notes
+
+@ignore
+Pieces of music having the same rhythm form chords when
+combined in parallel into the same @code{Voice} context by enclosing
+them into double angle brackets:
+@end ignore
+
+Parallel pieces of music can be combined into a single
+@code{Voice} context, thus forming chords if they have the same
+rhythm.  To achieve this, enclose them in a simultaneous music
+construction:
 
+@lilypond[quote,relative=2,verbatim]
+\new Voice <<
+  { e4 f8 d e16 f g8 d4 }
+  { c4 d8 b c16 d e8 b4 }
+>>
+@end lilypond
+
+@seealso
+
+Learning Manual:
+@rlearning{Voices contain music}.
+
+Snippets:
+@rlsr{Simultaneous notes}.
+
+@knownissues
+
+This method leads to strange beamings and warnings if the pieces of
+music do not have the same rhythm.
 
 @node Clusters
-@subsubsection Clusters
+@unnumberedsubsubsec Clusters
 
 @cindex cluster
 @funindex \makeClusters
@@ -122,13 +158,14 @@ This section discusses simultaneous notes in multiple voices or
 multiple staves.
 
 @menu
-* Collision resolution::        
-* Automatic part combining::    
-* Writing music in parallel::   
+* Collision resolution::
+* Voice styles::
+* Automatic part combining::
+* Writing music in parallel::
 @end menu
 
 @node Collision resolution
-@subsubsection Collision resolution
+@unnumberedsubsubsec Collision resolution
 
 @cindex merging notes
 @cindex note collisions
@@ -159,8 +196,8 @@ a stem are shifted vertically.
 >>
 @end lilypond
 
-Note heads with different note heads may be merged, with the exception
-of half-note heads and quarter-note heads:
+Note heads with different note heads may be merged, with the
+exception of half-note heads and quarter-note heads:
 
 @lilypond[quote,verbatim,relative=2]
 <<
@@ -230,16 +267,31 @@ the top @code{g} out of the column, and
 >>
 @end lilypond
 
+The @code{\shiftOn}, @code{\shiftOnn}, and @code{\shiftOnnn}
+commands specify the degree to which chords of the current voice
+should be shifted.  The outer voices (normally: voices one and
+two) have @code{\shiftOff}, while the inner voices (three and
+four) have @code{\shiftOn}.  @code{\shiftOnn} and
+@code{\shiftOnnn} define further shift levels.
+
 Notes are only merged if they have opposing stem directions (i.e., in
 @code{Voice} 1 and 2).
 
+
 @cindex multiple voices
 @cindex polyphonic music
 @cindex shifting voices
 
 @predefined
 
-FIXME: use this first format.
+@funindex \mergeDifferentlyDottedOn
+@code{\mergeDifferentlyDottedOn},
+@funindex \mergeDifferentlyDottedOff
+@code{\mergeDifferentlyDottedOff},
+@funindex \mergeDifferentlyHeadedOn
+@code{\mergeDifferentlyHeadedOn},
+@funindex \mergeDifferentlyHeadedOff
+@code{\mergeDifferentlyHeadedOff}.
 
 @funindex \oneVoice
 @code{\oneVoice},
@@ -252,18 +304,6 @@ FIXME: use this first format.
 @funindex \voiceFour
 @code{\voiceFour}.
 
-@funindex \voiceNeutralStyle
-@funindex \voiceOneStyle
-@funindex \voiceTwoStyle
-@funindex \voiceThreeStyle
-@funindex \voiceFourStyle
-@example
-\voiceNeutralStyle
-\voiceOneStyle
-\voiceTwoStyle
-\voiceThreeStyle
-\voiceFourStyle
-@end example
 
 @funindex \shiftOn
 @code{\shiftOn},
@@ -272,14 +312,7 @@ FIXME: use this first format.
 @funindex \shiftOnnn
 @code{\shiftOnnn},
 @funindex \shiftOff
-@code{\shiftOff}: these commands specify the degree to which
-chords of the current voice should be shifted.  The outer voices
-(normally: voices one and two) have @code{\shiftOff}, while the
-inner voices (three and four) have @code{\shiftOn}.
-@code{\shiftOnn} and @code{\shiftOnnn} define further shift
-levels.
-
-FIXME: the above description shoudl go in the main text.
+@code{\shiftOff}.
 
 @snippets
 
@@ -303,19 +336,17 @@ Snippets:
 @rlsr{Simultaneous notes}.
 
 Internals Reference:
-@rinternals{NoteColumn}.
-The objects responsible for resolving collisions
-are
-@rinternals{NoteCollision} and
+@rinternals{NoteColumn},
+@rinternals{NoteCollision},
 @rinternals{RestCollision}.
 
 
 @knownissues
 
-When using @code{merge-differently-headed} with an upstem eighth or a
-shorter note, and a downstem half note, the eighth note stem gets a
-slightly wrong offset because of the different width of the half note
-head symbol.
+When using @code{merge-differently-headed} with an upstem eighth
+or a shorter note, and a downstem half note, the eighth note stem
+gets a slightly wrong offset because of the different width of the
+half note head symbol.
 
 @c investigate! Sometimes it works, sometimes not. --FV
 It is not clear in which circumpstances you can succesfully merge
@@ -326,19 +357,67 @@ different accidentals in the same chord.  In this case, it is
 recommended to use enharmonic transcription, or to use special
 cluster notation (see @ref{Clusters}).
 
+@node Voice styles
+@unnumberedsubsubsec Voice styles
+
+@cindex voice styles
+@cindex styles, voice
+@cindex coloring voices
+
+Voices may be given distinct colors and shapes, allowing them to be
+easily identified:
+
+@lilypond[quote,relative=2,verbatim]
+<<
+  {
+    a1
+    \voiceOneStyle
+    f2 g
+    \voiceNeutralStyle
+    a1
+  } \\ {
+    f1
+    \voiceTwoStyle
+    f4 f2 e4
+    \voiceNeutralStyle
+    f1
+  }
+>>
+@end lilypond
+
+@predefined
+
+@funindex \voiceOneStyle
+@code{\voiceOneStyle},
+@funindex \voiceTwoStyle
+@code{\voiceTwoStyle},
+@funindex \voiceThreeStyle
+@code{\voiceThreeStyle},
+@funindex \voiceFourStyle
+@code{\voiceFourStyle},
+@funindex \voiceNeutralStyle
+@code{\voiceNeutralStyle}.
+
+@seealso
+
+Lerning Manual:
+@rlearning{I'm hearing Voices}.
+
+Snippets:
+@rlsr{Simultaneous notes}.
 
 @node Automatic part combining
-@subsubsection Automatic part combining
+@unnumberedsubsubsec Automatic part combining
 
 @cindex automatic part combining
 @cindex part combiner
 @cindex combining parts
 @funindex \partcombine
 
-Automatic part combining is used to merge two parts of music onto a
-staff.  It is aimed at typesetting orchestral scores.  When the two
-parts are identical for a period of time, only one is shown.  In
-places where the two parts differ, they are typeset as separate
+Automatic part combining is used to merge two parts of music onto
+a staff.  It is aimed at typesetting orchestral scores.  When the
+two parts are identical for a period of time, only one is shown.
+In places where the two parts differ, they are typeset as separate
 voices, and stem directions are set automatically.  Also, solo and
 @notation{a due} parts are identified and marked by default.
 
@@ -348,10 +427,10 @@ The syntax for part combining is:
 \partcombine @var{musicexpr1} @var{musicexpr2}
 @end example
 
-The following example demonstrates the basic functionality of the part
-combiner: putting parts on one staff and setting stem directions and
-polyphony.  The same variables are used for the independent
-parts and the combined staff.
+The following example demonstrates the basic functionality of the
+part combiner: putting parts on one staff and setting stem
+directions and polyphony.  The same variables are used for the
+independent parts and the combined staff.
 
 @lilypond[quote,verbatim]
 instrumentOne = \relative c' {
@@ -377,14 +456,15 @@ instrumentTwo = \relative g' {
 >>
 @end lilypond
 
-The notes in the third measure appear only once, although they were
-specified in both parts.  Stem, slur, and tie directions are set
-automatically, depending whether there is a solo or unison.  When
-needed in polyphony situations, the first part (with context called
-@code{one}) always gets up stems, while the second (called @code{two})
-always gets down stems.  In solo situations, the parts get marked with
-@q{Solo} and @q{Solo II}, respectively.  The unisono (@notation{a due})
-parts are marked by default with the text @qq{a2}.
+The notes in the third measure appear only once, although they
+were specified in both parts.  Stem, slur, and tie directions are
+set automatically, depending whether there is a solo or unison.
+When needed in polyphony situations, the first part (with context
+called @code{one}) always gets up stems, while the second (called
+@code{two}) always gets down stems.  In solo situations, the parts
+get marked with @q{Solo} and @q{Solo II}, respectively.  The
+unisono (@notation{a due}) parts are marked by default with the
+text @qq{a2}.
 
 Both arguments to @code{\partcombine} will be interpreted as
 @code{Voice} contexts.  If using relative octaves,
@@ -465,7 +545,7 @@ events in those will be ignored.
 @c IIRC in users list someone pointed out more issues. TODO: lookup FV
 
 @node Writing music in parallel
-@subsubsection Writing music in parallel
+@unnumberedsubsubsec Writing music in parallel
 
 @cindex Writing music in parallel
 @cindex Interleaved music
@@ -474,9 +554,9 @@ events in those will be ignored.
 Music for multiple parts can be interleaved in input code.  The
 function @code{\parallelMusic} accepts a list with the names of a
 number of variables to be created, and a musical expression.  The
-content of alternate measures from the expression become the value of
-the respective variables, so you can use them afterwards to print the
-music.
+content of alternate measures from the expression become the value
+of the respective variables, so you can use them afterwards to
+print the music.
 
 @warning{Bar checks @code{|} must be used, and the measures must
 be of the same length.}