]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/rhythms.itely
[doc] Handle leading dash in @code.
[lilypond.git] / Documentation / notation / rhythms.itely
index e2ab6d22300a989916f3d0eaf37bc4dd8f7c1069..625d7db4a8abdcbfb1d775236516469c24e35085 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.13.44"
+@c \version "2.14.0"
 
 @node Rhythms
 @section Rhythms
@@ -142,6 +142,9 @@ the staff; see @ref{Direction and placement}.
 
 @snippets
 
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{alternative-breve-note.ly}
+
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {changing-the-number-of-augmentation-dots-per-note.ly}
 
@@ -1374,7 +1377,7 @@ For example, @code{\partial 8*3} becomes:
 The property @code{measurePosition} contains a rational number
 indicating how much of the measure has passed at this point.  Note
 that this is set to a negative number by the @code{\partial} command:
-i.e., @code{\partial 4} is internally translated to @code{-4}, meaning
+i.e., @code{\partial 4} is internally translated to @w{@code{-4}}, meaning
 @qq{there is a quarter note left in the measure.}
 
 @seealso
@@ -1439,10 +1442,10 @@ c4 c d8[ d d] f4 g4.
 d4 e d c
 @end lilypond
 
-@cindex beaming in cadenzas
-@cindex beaming in unmetered music
-@cindex cadenza, beaming in
-@cindex unmetered music, beaming in
+@cindex beams, in cadenzas
+@cindex beams, in unmetered music
+@cindex cadenza, with beams
+@cindex unmetered music, with beams
 
 Automatic beaming is disabled by @code{\cadenzaOn} and enabled
 by @code{\cadenzaOff}.  Therefore, all beaming in cadenzas
@@ -1553,8 +1556,8 @@ signature; see @ref{Time signature}.  The scaling is done with
 @code{\times}, but does not create a tuplet bracket; see
 @ref{Scaling durations}.
 
-@cindex beaming in polymetric music
-@cindex beaming in polymetric meter
+@cindex beams, with polymetric meters
+@cindex polymetric meters, with beams
 
 In this example, music with the time signatures of 3/4, 9/8, and
 10/8 are used in parallel.  In the second staff, shown durations
@@ -1574,7 +1577,7 @@ duration scaling affects the autobeaming rules.
     \time 3/4
     \set Staff.timeSignatureFraction = #'(9 . 8)
     \scaleDurations #'(2 . 3)
-    \repeat unfold 6 { c8[ c c] }
+      \repeat unfold 6 { c8[ c c] }
   }
   \new Staff {
     \time 3/4
@@ -1672,28 +1675,35 @@ time signatures.
 
 @cindex notes, splitting
 @cindex splitting notes
+@cindex rests, splitting
+@cindex splitting rests
 
 @funindex Note_heads_engraver
 @funindex Completion_heads_engraver
+@funindex Completion_rest_engraver
 
-Long notes which overrun bar lines can be converted automatically
-to tied notes.  This is done by replacing the
-@code{Note_heads_engraver} with the
-@code{Completion_heads_engraver}.  In the following
-example, notes crossing the bar lines are split and tied.
+Long notes which overrun bar lines can be converted automatically to
+tied notes.  This is done by replacing the @code{Note_heads_engraver}
+with the @code{Completion_heads_engraver}.  Similarly, long rests which
+overrun bar lines are split automatically by replacing the
+@code{Rest_engraver} with the @code{Completion_rest_engraver}.  In the
+following example, notes and rests crossing the bar lines are split,
+notes are also tied.
 
 @lilypond[quote,verbatim,relative=1]
 \new Voice \with {
   \remove "Note_heads_engraver"
   \consists "Completion_heads_engraver"
+  \remove "Rest_engraver"
+  \consists "Completion_rest_engraver"
 }
 
-{ c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 }
+{ c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 r1*2 }
 @end lilypond
 
-This engraver splits all running notes at the bar line, and
-inserts ties.  One of its uses is to debug complex scores: if the
-measures are not entirely filled, then the ties show exactly how
+These engravers split all running notes and rests at the bar line, and
+inserts ties for notes.  One of its uses is to debug complex scores: if
+the measures are not entirely filled, then the ties show exactly how
 much each measure is off.
 
 
@@ -1711,6 +1721,8 @@ Snippets:
 Internals Reference:
 @rinternals{Note_heads_engraver},
 @rinternals{Completion_heads_engraver},
+@rinternals{Rest_engraver},
+@rinternals{Completion_rest_engraver},
 @rinternals{Forbid_line_break_engraver}.
 
 
@@ -1826,8 +1838,7 @@ By default, beams are inserted automatically:
 
 @cindex beams, manual
 @cindex manual beams
-@cindex beams, setting rules for
-@cindex beams, custom rules for
+@cindex beams, customizing rules
 
 @funindex \autoBeamOn
 @funindex autoBeamOn
@@ -1854,8 +1865,8 @@ c4 c8 c8. c16 c8.
 c16 c8
 @end lilypond
 
-@cindex melismata, beams
-@cindex beams and melismata
+@cindex melismata, with beams
+@cindex beams, with melismata
 
 @warning{If beams are used to indicate melismata in songs, then
 automatic beaming should be switched off with @code{\autoBeamOff}
@@ -1867,35 +1878,30 @@ produce unintended results.  See the snippet below for more information.}
 Beaming patterns that differ from the automatic defaults can be
 created; see @ref{Setting automatic beam behavior}.
 
-
 @predefined
 @code{\autoBeamOff},
 @code{\autoBeamOn}.
 @endpredefined
 
-
-@snippets
-
-
-@cindex line breaks and beams
-@cindex beams and line breaks
-
+@cindex beams, line breaks
+@cindex line breaks, beams
+@cindex beams, with knee gap
+@cindex knee gap, with beams
 @funindex breakable
 
+@snippets
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {beams-across-line-breaks.ly}
 
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {changing-beam-knee-gap.ly}
 
-@cindex \partcombine and \autoBeamOff
-@cindex \autoBeamOff and \partcombine
-
+@cindex beams, \partcombine with \autoBeamOff
+@cindex voices, \partcombine with \autoBeamOff
 
 @lilypondfile [verbatim, lilyquote, ragged-right, texidoc, doctitle]
 {partcombine-and-autobeamoff.ly}
 
-
 @seealso
 Notation Reference:
 @ref{Manual beams},
@@ -1916,21 +1922,11 @@ Internals Reference:
 @rinternals{beam-interface},
 @rinternals{unbreakable-spanner-interface}.
 
-
-@knownissues
-
-Beams can collide with note heads and accidentals in other voices.
-
-
 @node Setting automatic beam behavior
 @unnumberedsubsubsec Setting automatic beam behavior
 
-
-@cindex automatic beams, tuning
-@cindex tuning automatic beaming
-@cindex automatic beam generation
-@cindex autobeam
-@cindex lyrics and beaming
+@cindex beams, with lyrics
+@cindex lyrics, with beams
 
 @funindex autoBeaming
 @funindex baseMoment
@@ -2085,7 +2081,6 @@ context to the default behavior.
 \repeat unfold 6 { a8 }
 @end lilypond
 
-
 The default automatic beaming settings for a time signature
 are determined in @file{scm/time-signature-settings.scm}.
 Changing the default automatic beaming settings
@@ -2152,10 +2147,10 @@ end beams at the end of beats.
 
 @end itemize
 
-In the rules above, the beam-type is the duration of the
+In the rules above, the @emph{beam-type} is the duration of the
 shortest note in the beamed group.
 
-For reference, the default beaming rules are found in
+The default beaming rules can be found in
 @file{scm/time-signature-settings.scm}.
 
 @snippets
@@ -2173,8 +2168,8 @@ For reference, the default beaming rules are found in
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {conducting-signs,-measure-grouping-signs.ly}
 
-@cindex beam, last in score
-@cindex beam, last in polyphonic voice
+@cindex beam, endings in a score
+@cindex beam, endings with multiple voices
 
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {beam-endings-in-score-context.ly}
@@ -2225,10 +2220,10 @@ in only one staff.
 >>
 @end lilypond
 
-The default beam settings for the time signature can also be
-changed, so that set the desired beaming will always be used
-Changes in automatic beaming settings
-for a time signature are described in @ref{Time signature}.
+The default beam settings for the time signature can also be changed, so
+that the desired beaming will always be used.  Changes in automatic
+beaming settings for a time signature are described in
+@ref{Time signature}.
 
 @lilypond[quote,verbatim,relative=2]
 <<
@@ -3212,9 +3207,9 @@ durations in the other staves.  For the above example
 >>
 @end lilypond
 
-The use of grace notes within voice contexts confuses the way the
-voice is typeset. This can be overcome by inserting a rest or note
-between the voice command and the grace note.
+The use of grace notes within voice contexts confuses the way the voice
+is typeset. This can be overcome by inserting a rest or note between the
+voice command and the grace note.
 
 @lilypond[quote,verbatim]
 accMusic = {
@@ -3239,9 +3234,33 @@ accMusic = {
 }
 @end lilypond
 
-Grace sections should only be used within sequential music
-expressions.  Nesting or juxtaposing grace sections is not
-supported, and might produce crashes or other errors.
+Grace sections should only be used within sequential music expressions.
+Nesting or juxtaposing grace sections is not supported, and might
+produce crashes or other errors.
+
+Each grace note in MIDI output has a length of 1/4 of its actual
+duration.  If the combined length of the grace notes is greater than the
+length of the preceding note a @qq{@code{Going back in MIDI time}}
+error will be generated.  Either make the grace notes shorter in
+duration, for example:
+
+@example
+\acciaccatura @{ c'8[ d' e' f' g'] @}
+@end example
+
+becomes:
+
+@example
+\acciaccatura @{ c'16[ d' e' f' g'] @}
+@end example
+
+Or explicitly change the musical duration:
+
+@example
+\acciaccatura @{ \scaleDurations #' (1 . 2) @{ c'8[ d' e' f' g'] @} @}
+@end example
+
+See @ref{Scaling durations}.
 
 
 @node Aligning to cadenzas