]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/rhythms.itely
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / Documentation / user / rhythms.itely
index cf4c1a205d9624c119e3fb2f4e6941de1a55723f..7c05cfb75e681564e9c7deb5b71d9e10a898e9d2 100644 (file)
@@ -9,8 +9,7 @@
 @node Rhythms
 @section Rhythms
 
-@lilypondfile[ragged-right,line-width=16\cm,staffsize=14,quote]
-{rhythms-headword.ly}
+@lilypondfile[quote]{rhythms-headword.ly}
 
 This section discusses rhythms, rests, durations, beaming and bars.
 
@@ -108,12 +107,11 @@ Optionally, notes can be spaced strictly proportionately to their
 duration.  For details of this and other settings which control
 proportional notation, see @ref{Proportional notation}.
 
-@predefined
-
 Dots are normally moved up to avoid staff lines, except in
-polyphonic situations.  The following commands may be used to
-force a particular direction manually, and to return to the
-default behaviour:
+polyphonic situations.  To force a particular direction manually, 
+see @ref{Controlling direction and placement}.
+
+@predefined
 
 @funindex \dotsUp
 @code{\dotsUp},
@@ -125,16 +123,25 @@ default behaviour:
 
 @seealso
 
-Music Glossary: @rglos{breve}, @rglos{longa}, @rglos{note value}
+Music Glossary: 
+@rglos{breve}, 
+@rglos{longa}, 
+@rglos{note value},
 @rglos{Duration names notes and rests}.
 
-Notation Reference: @ref{Automatic beams}, @ref{Ties},
-@ref{Writing rhythms}, @ref{Writing rests}, @ref{Vocal music},
-@ref{Ancient notation}, @ref{Proportional notation}.
+Notation Reference: 
+@ref{Automatic beams}, 
+@ref{Ties},
+@ref{Writing rhythms}, 
+@ref{Writing rests}, 
+@ref{Vocal music},
+@ref{Ancient notation}, 
+@ref{Proportional notation}.
 
 Snippets: @lsrdir{Rhythms,Rhythms}
 
-Internals Reference: @internalsref{Dots},
+Internals Reference: 
+@internalsref{Dots},
 @internalsref{DotColumn}.
 
 
@@ -173,6 +180,10 @@ c4 c \times 2/3 {b4 a g}
 
 @end lilypond
 
+The automatic placement of the tuplet bracket above or below the 
+notes may be overridden manually, for details see 
+@ref{Controlling direction and placement}.
+
 Tuplets may be nested:
 
 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
@@ -182,7 +193,9 @@ c4 \times 4/5 { f8 e f \times 2/3 {e[ f g] } } f4 |
 
 Modifying nested tuplets which begin at the same musical moment
 must be done with @code{\tweak}.
-@c TODO Add link to LM section which deals with this.
+
+To modify the duration of notes without printing a tuplet bracket,
+see @ref{Scaling durations}.
 
 @predefined
 
@@ -205,12 +218,10 @@ must be done with @code{\tweak}.
 @lilypondfile [verbatim,lilyquote,ragged-right,texidoc]
 {entering-several-tuplets-using-only-one--times-command.ly}
 
-@noindent
-For more information about @code{make-moment}, see
-@ref{Time administration}.
-
 @funindex TupletNumber
 
+@c Sent to VV on 12 Feb - replace with @lilypondfile when available
+@c TODO and delete from here ...
 By default, only the numerator of the tuplet number
 is printed over the tuplet bracket, i.e. the denominator
 of the argument to the @code{\times} command.  Alternatively,
@@ -226,187 +237,84 @@ the tuplet number may be suppressed altogether.
 \times 2/3 { c8 c c }
 @end lilypond
 
-@c TODO Add snippet to show this
-Tuplets may extend over bar lines, but they will inhibit a
-line break unless the @code{Forbid_line_break_engraver} is
-removed from the @code{Voice context}.
-
-@c TODO Move to LM 4
-@ignore
-@subheading Modifying nested tuplets
-
-@cindex tuplets, nested
-@cindex triplets, nested
-@cindex bracket, tuplet
-@cindex tuplet bracket
-@cindex triplet bracket
-@funindex TupletBracket
-
-If nested tuplets do not begin at the same moment their
-appearance may be modified in the usual way with
-@code{\override} commands:
-
-@c NOTE Tuplet brackets collide if notes are high on staff
-@c See issue 509
-@lilypond[quote,ragged-right,verbatim,fragment,relative=1]
-\times 2/3 { c8[ c c]}
-\once \override TupletNumber #'text = #tuplet-number::calc-fraction-text
-\times 2/3 {
-  c[ c]
-  c[ c]
-  \once \override TupletNumber #'transparent = ##t
-  \times 2/3 { c8[ c c] }
-\times 2/3 { c8[ c c]}
-}
-@end lilypond
+@c ... to here
 
-However, if the nested tuplets begin at the same musical moment,
-@code{\override} commands cannot be applied to just one of them
--- they apply to both.  So to change the appearance of nested
-tuplets beginning at the same musical moment individually, the
-@code{\tweak} function must be used (see @ref{Objects connected
-to the input}).  The @code{\tweak} function is applied to the
-following @code{\times} command as it appears in the input stream,
-and so can distinguish between separate @code{\times} commands
-even if their tuplets begin at the same musical moment.
-
-In this example, the @code{\tweak} command is used to specify
-fraction text for the outer @code{TupletNumber} and denominator
-text for the @code{TupletNumber} of the first of the three
-inner tuplets.
-
-@c NOTE Tuplet brackets collide if notes are high on staff
-@c so use relative=1 until this is fixed
-@c See issue 509
-@lilypond[quote,ragged-right,verbatim,fragment,relative=1]
-\tweak #'text #tuplet-number::calc-fraction-text
-\times 4/3 {
-   \tweak #'text #tuplet-number::calc-denominator-text
-   \times 2/3 { c8[ c8 c8] }
-   \times 2/3 { c8[ c8 c8] }
-   \times 2/3 { c8[ c8 c8] }
-}
-@end lilypond
 
-In the next example, @code{\tweak} and @code{\override} work
-together to specify @code{TupletBracket} direction.  The first
-@code{\tweak} positions the @code{TupletBracket} of the outer
-tuplet above the staff.  The second @code{\tweak} positions the
-@code{TupletBracket} of the first of the three inner tuplets below
-the staff.  Note that the @code{\tweak} command needs to be used
-only for events that begin at the same music moment: the outer
-tuplet and the first of the three inner tuplets.  To position the
-@code{TupletBracket}s of the second and third of the inner tuplets
-below the staff, we can use @code{\override} in the usual way.
+@c Sent to VV on 12 Feb - replace with @lilypondfile when available
+@c TODO and delete from here ...
+This artificial example shows how both manual and automatic line
+breaks may be permitted within a beamed tuplet. Note that such
+off-beat tuplets have to be beamed manually.
 
-@lilypond[quote,ragged-right,verbatim,fragment,relative=2]
-\tweak #'text #tuplet-number::calc-fraction-text
-\tweak #'direction #up
-\times 4/3 {
-   \tweak #'direction #down
-   \times 2/3 { c8[ c8 c8] }
-   \override TupletBracket #'direction = #down
-   \times 2/3 { c8[ c8 c8] }
-   \times 2/3 { c8[ c8 c8] }
+@lilypond[quote,ragged-right,verbatim]
+\relative c'' {
+  a8
+  \repeat unfold 8 {\times 2/3 { c[ b a]}}
+  % Insert a manual line break within a tuplet
+  \times 2/3 { c[ b \bar "" \break a]}
+  \repeat unfold 2 {\times 2/3 { c[ b a]}}
+  c8
 }
-@end lilypond
-@end ignore
-
-@c TODO - tidy up
-@c Sent to Valentin for LSR (general list of Rhythm snippets) 22 Feb
-@c Maybe try referencing with:
-@c For example of modifying bracket length see @lsr{..}
-@c Index entries could then be added above this.
-@c Delete ignore block when available in LSR
-
-@ignore
-@subheading Modifying tuplet bracket length
-
-@cindex tuplet bracket length
-@cindex triplet bracket length
-@cindex bracket length, tuplets
-@funindex tupletFullLength
-@funindex tupletFullLengthNote
-
-Tuplet brackets can be made to run to prefatory matter or the
-next note.
-Default tuplet brackets end at the right edge of the final note
-of the tuplet; full-length tuplet brackets extend farther to the
-right, either to cover all the non-rhythmic notation up to the
-following note, or to cover only the whitespace before the next
-item of notation, be that a clef, time signature, key signature,
-or another note.  The example shows how to switch tuplets to
-full length mode and how to modify what material they cover.
-
-
-@lilypond[ragged-right,verbatim,quote]
-\new RhythmicStaff {
-  % Set tuplets to be extendable ..
-  \set tupletFullLength = ##t
-  % .. to cover all items up to the next note
-  \set tupletFullLengthNote = ##t
-  \time 2/4
-  \times 2/3 { c4 c c }
-  % .. or to cover just whitespace
-  \set tupletFullLengthNote = ##f
-  \time 4/4
-  \times 4/5 { c4 c1 }
-  \time 3/4
-  c4
+\layout {
+  \context {
+    \Voice
+    % Permit line breaks within tuplets
+    \remove "Forbid_line_break_engraver"
+    % Allow beams to be broken at line breaks
+    \override Beam #'breakable = ##t
+  }
 }
 @end lilypond
-@end ignore
-
-@c Compressing music
-
-@cindex compressing music
-@funindex \compressMusic
-
-@code{\compressMusic} works similarly to \times, but does not
-create a tuplet bracket.  One application is in polymetric
-notation, see @ref{Polymetric notation}.
-
-@lilypondfile [verbatim,lilyquote,ragged-right,texidoc]
-{printing-music-with-different-time-signatures.ly}
 
+@c .. to here
 
 @seealso
 
-Music Glossary: @rglos{triplet}, @rglos{tuplet},
+Music Glossary: 
+@rglos{triplet}, 
+@rglos{tuplet},
 @rglos{polymetric}.
 
-Notation Reference: @ref{Time administration},
-@ref{Objects connected to the input}, @ref{Polymetric notation}.
+Notation Reference:
+@ref{Time administration},
+@ref{Scaling durations},
+@ref{Objects connected to the input},
+@ref{Polymetric notation}.
 
 Snippets: @lsrdir{Rhythms,Rhythms}.
 
-Internals Reference: @internalsref{TupletBracket},
-@internalsref{TupletNumber}, @internalsref{TimeScaledMusic}.
-
-@knownissues
-
-Lines may be broken within a tuplet with @code{\bar "" \break},
-but the tuplet bracket does not correctly carry over.
+Internals Reference: 
+@internalsref{TupletBracket},
+@internalsref{TupletNumber}, 
+@internalsref{TimeScaledMusic}.
 
 
 @node Scaling durations
 @subsubsection Scaling durations
 
-You can alter the length of a duration by a fraction @var{N/M}
-by appending @code{*@var{N/M}} (or @code{*@var{N}} if @var{M=1}).
+@cindex scaling durations
+@cindex durations, scaling
+
+You can alter the duration of single notes, rests or chords by a
+fraction @code{N/M} by appending @code{*N/M} (or @code{*N} if
+@code{M} is 1) to the duration.
 This will not affect the appearance of the notes or rests
 produced, but the altered duration will be used in calculating the
 position within the measure and setting the duration in the MIDI
-output.  Multiplying factors may be combined
-such as @code{*M*N}.
+output.  Multiplying factors may be combined such as @code{*L*M/N}.
 
 In the following example, the first three notes take up exactly
 two beats, but no triplet bracket is printed.
 
 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
 \time 2/4
+% Alter durations to triplets
 a4*2/3 gis4*2/3 a4*2/3
-a4 a4 a4*2
+% Normal durations
+a4 a4
+% Double the duration of chord
+<a d>4*2
+% Duration of quarter, appears like sixteeth
 b16*4 c4
 @end lilypond
 
@@ -414,9 +322,50 @@ The duration of skip or spacing notes may also be modified by
 a multiplier.  This is useful for skipping many measures, e.g.,
 @code{s1*23}.
 
+@cindex compressing music
+@funindex \compressMusic
+
+Longer stretches of music may be compressed by a fraction in 
+the same way, as if every note, chord or rest had the fraction 
+as a multiplier.  The general syntax of the command to do this
+is:
+
+@example
+\compressMusic #'(@emph{num} . @emph{den}) @{ @emph{music} @}
+@end example
+
+@noindent
+This will leave the appearance of @emph{music} unchanged but
+the internal duration of the notes will be multiplied by the
+fraction @emph{num}/@emph{den}.  The spaces around the dot
+are required.  Here is an example showing how music can be
+compressed and expanded:
+
+@lilypond[quote,fragment,relative=2,ragged-right,verbatim]
+\time 2/4
+% Normal durations
+<c a>4 c8 a
+% Scale music by *2/3
+\compressMusic #'(2 . 3) {
+  <c a f>4. c8 a f
+}
+% Scale music by *2
+\compressMusic #'(2 . 1) {
+  <c' a>4 c8 b
+}
+@end lilypond
+
+@noindent
+One application of this command is in polymetric
+notation, see @ref{Polymetric notation}.
+
+
 @seealso
 
-Notation Reference: @ref{Tuplets}, @ref{Skips}, @ref{Polymetric notation}.
+Notation Reference:
+@ref{Tuplets},
+@ref{Skips},
+@ref{Polymetric notation}.
 
 Snippets: @lsrdir{Rhythms,Rhythms}
 
@@ -427,7 +376,7 @@ Snippets: @lsrdir{Rhythms,Rhythms}
 @funindex ~
 
 A tie connects two adjacent note heads of the same pitch.  The tie
-in effect extends the length of a note.
+in effect extends the duration of a note.
 
 @warning{Ties should not be confused with @emph{slurs}, which
 indicate articulation, or @emph{phrasing slurs}, which indicate
@@ -453,13 +402,12 @@ used when note values cross larger subdivisions of the measure:
 @end lilypond
 
 If you need to tie a lot of notes across bar lines, it may be
-easier to use automatic note splitting (see @ref{Automatic note
-splitting}).  This mechanism automatically splits long notes, and
+easier to use automatic note splittingsee @ref{Automatic note
+splitting}.  This mechanism automatically splits long notes, and
 ties them across bar lines.
 
-@funindex \repeatTie
-@cindex repeating ties
-@cindex volta brackets and ties
+@cindex ties and chords
+@cindex chords and ties
 
 When a tie is applied to a chord, all note heads whose pitches
 match are connected.  When no note heads match, no ties will be
@@ -471,47 +419,54 @@ the chord.
 <c~ e g~ b> <c e g b>
 @end lilypond
 
+@funindex \repeatTie
+@cindex repeating ties
+@cindex ties, repeating
+@cindex volta brackets and ties
+@cindex ties and volta brackets
+
 When a second alternative of a repeat starts with a tied note, you
-have to repeat the tie.  This can be achieved with
-@code{\repeatTie},
+have to specify the repeated tie as follows:
 
 @lilypond[fragment,quote,ragged-right,relative=2,verbatim]
 \repeat volta 2 { c g <c e>2 ~ }
-\alternative {{ <c e>2. r4 } {<c e>2\repeatTie d4 c }}
+\alternative {
+  % Following note is tied normally in first alternative
+  { <c e>2. r4 }
+  % Following note has a repeated tie in second alternative
+  {<c e>2\repeatTie d4 c }}
 @end lilypond
 
 @cindex laissez vibrer
 @cindex ties, laissez vibrer
 @funindex \laissezVibrer
-@funindex \tieUp
-@funindex \tieDown
-@funindex \tieNeutral
 
 @notation{L.v.} ties (@notation{laissez vibrer}) indicate that
 notes must not be damped at the end.  It is used in notation for
 piano, harp and other string and percussion instruments.  They can
-be entered using @code{\laissezVibrer}:
+be entered as follows:
 
 @lilypond[fragment,ragged-right,verbatim,relative=1]
 <c f g>\laissezVibrer
 @end lilypond
 
-The vertical placement of ties may be controlled; see
+@cindex ties, placement
+@funindex \tieUp
+@funindex \tieDown
+@funindex \tieNeutral
+
+The vertical placement of ties may be controlled, see the
+predefined commands.  For details, see
 @ref{Controlling direction and placement}.
 
-@quotation
-DELETE THIS ?
-@code{\tieDown} (see example below).  @code{\tieNeutral} reverts
-to the default behaviour again.
+@cindex ties, appearance
+@funindex \tieDotted
+@funindex \tieDashed
+@funindex \tieSolid
 
-However, as with other music elements of this kind, there is a
-convenient shorthand for forcing tie directions.  By adding
-@code{_} or @code{^} before the tilde, the direction is also set:
+Solid, dotted or dashed ties may be specified, see predefined
+commands.
 
-@lilypond[relative=2,ragged-right,quote,verbatim,fragment]
-c4_~ c c^~ c)
-@end lilypond
-@end quotation
 
 @predefined
 
@@ -531,6 +486,7 @@ c4_~ c c^~ c)
 
 @snippets
 
+@c TODO Remove when snippet available - sent 15 Mar 08
 Ties are sometimes used to write out arpeggios.  In this case, two
 tied notes need not be consecutive.  This can be achieved by
 setting the @code{tieWaitForNote} property to true.  The same
@@ -546,6 +502,9 @@ e8~ c~ a~ f~ <e' c a f>2
 \tieUp c8~ a \tieDown \tieDotted g~ c g2
 @end lilypond
 
+@c end of section to be removed
+
+@c TODO Remove when snippet available - sent 15 Mar 08
 Ties may be engraved manually by changing the
 @code{tie-configuration} property of the @code{TieColumn} object.
 The first number indicates the distance from the center of the
@@ -559,30 +518,24 @@ direction (1=up, -1=down).
 <c e g>~ <c e g> |
 @end lilypond
 
+@c end of section to be removed
 
 
 @seealso
 
-Music Glossary: @rglos{tie},
-@c [TODO]add @rglos{laissez vibrer}. when there is a glossary entry.
+Music Glossary:
+@rglos{tie},
+@rglos{laissez vibrer}.
+
+Notation Reference: @ref{Automatic note splitting}.
 
 Snippets: @lsrdir{Rhythms,Rhythms}
 
 Internals Reference:
 @internalsref{LaissezVibrerTie}
 @internalsref{LaissezVibrerTieColumn}
-
-Example files:
-@c @lsr{connecting,laissez-vibrer-ties.ly}
-
-
-
-
-Notation Reference: @ref{Automatic note splitting}.
-
-Snippets: @lsrdir{Rhythms,Rhythms}
-
-Internals Reference: @internalsref{Tie}.
+@internalsref{TieColumn}
+@internalsref{Tie}.
 
 
 @knownissues
@@ -1130,6 +1083,10 @@ Snippets: @lsrdir{Rhythms,Rhythms}
 @node Polymetric notation
 @subsubsection Polymetric notation
 
+@c TODO Work this example into the main text
+@c @lilypondfile [verbatim,lilyquote,ragged-right,texidoc]
+@c {printing-music-with-different-time-signatures.ly}
+
 @cindex double time signatures
 @cindex signatures, polymetric
 @cindex polymetric signatures
@@ -1899,7 +1856,8 @@ with @code{\set Timing.defaultBarType = }@var{bartype}.
 @seealso
 
 Notation Reference: @ref{Line breaking}, @ref{Repeats},
-@ref{System start delimiters}.
+@c FIXME: node name changed, but is subject to further changes.
+@c @ref{System start delimiters}.
 
 Snippets: @lsrdir{Rhythms,Rhythms}
 
@@ -2599,3 +2557,5 @@ Internals Reference: @internalsref{Timing_translator},
 
 
 
+
+