]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/rhythms.itely
Doc: NR section 3.5.x MIDI file creation tidy up
[lilypond.git] / Documentation / notation / rhythms.itely
index 92ace48df055b1038425756ebcf9d86dc3d9bfc6..e885d22824d1302a0a95f06303957c25cd024d8d 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.19.2"
+@c \version "2.19.20"
 
 @node Rhythms
 @section Rhythms
@@ -273,7 +273,7 @@ To modify the duration of notes without printing a tuplet bracket, see
 @funindex tupletSpannerDuration
 
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{entering-several-tuplets-using-only-one--times-command.ly}
+{entering-several-tuplets-using-only-one--tuplet-command.ly}
 
 @cindex Tuplet number changes
 
@@ -810,6 +810,8 @@ Internals Reference:
 @cindex whole rest for a full measure
 @cindex rest, whole for a full measure
 
+@funindex compressMMRests
+@funindex \compressMMRests
 @funindex R
 
 Rests for one or more full measures are entered like notes with
@@ -817,11 +819,12 @@ the note name uppercase @code{R}:
 
 @lilypond[quote,verbatim,relative=2]
 % Rest measures contracted to single measure
-\compressFullBarRests
-R1*4
-R1*24
-R1*4
-b2^"Tutti" b4 a4
+\compressMMRests {
+  R1*4
+  R1*24
+  R1*4
+  b2^"Tutti" b4 a4
+}
 @end lilypond
 
 The duration of full-measure rests is identical to the duration
@@ -830,15 +833,16 @@ always be an integral number of measure-lengths, so augmentation dots
 or fractions must often be used:
 
 @lilypond[quote,verbatim,relative=2]
-\compressFullBarRests
-\time 2/4
-R1 | R2 |
-\time 3/4
-R2. | R2.*2 |
-\time 13/8
-R1*13/8 | R1*13/8*12 |
-\time 10/8
-R4*5*4 |
+\compressMMRests {
+  \time 2/4
+  R1 | R2 |
+  \time 3/4
+  R2. | R2.*2 |
+  \time 13/8
+  R1*13/8 | R1*13/8*12 |
+  \time 10/8
+  R4*5*4 |
+}
 @end lilypond
 
 A full-measure rest is printed as either a whole or breve rest,
@@ -856,11 +860,6 @@ R1*2 |
 @cindex multi-measure rest, expanding
 @cindex multi-measure rest, contracting
 
-@funindex \expandFullBarRests
-@funindex expandFullBarRests
-@funindex \compressFullBarRests
-@funindex compressFullBarRests
-
 By default a multi-measure rest is expanded in the printed score to
 show all the rest measures explicitly.  Alternatively, a multi-measure
 rest can be shown as a single measure containing a multi-measure rest
@@ -872,10 +871,10 @@ symbol, with the number of measures of rest printed above the measure:
 \time 2/4 R2 |
 \time 4/4
 % Rest measures contracted to single measure
-\compressFullBarRests
-r1 | R1*17 | R1*4 |
-% Rest measures expanded
-\expandFullBarRests
+\compressMMRests {
+  r1 | R1*17 | R1*4 |
+}
+% Rest measures expanded again
 \time 3/4
 R2.*2 |
 @end lilypond
@@ -899,10 +898,11 @@ The predefined command @code{\fermataMarkup}
 is provided for adding fermatas.
 
 @lilypond[quote,verbatim,relative=2]
-\compressFullBarRests
-\time 3/4
-R2.*10^\markup { \italic "ad lib." }
-R2.^\fermataMarkup
+\compressMMRests {
+  \time 3/4
+  R2.*10^\markup { \italic "ad lib." }
+  R2.^\fermataMarkup
+}
 @end lilypond
 
 @warning{Markups attached to a multi-measure rest are objects of type
@@ -929,17 +929,14 @@ setting, resulting bar-check warnings may not be displayed.
 @funindex textLengthOff
 @funindex \fermataMarkup
 @funindex fermataMarkup
-@funindex \compressFullBarRests
-@funindex compressFullBarRests
-@funindex \expandFullBarRests
-@funindex expandFullBarRests
+@funindex \compressMMRests
+@funindex compressMMRests
 
 @predefined
 @code{\textLengthOn},
 @code{\textLengthOff},
 @code{\fermataMarkup},
-@code{\compressFullBarRests},
-@code{\expandFullBarRests}.
+@code{\compressMMRests}.
 @endpredefined
 
 
@@ -1027,7 +1024,9 @@ The time signature is set as follows:
 \time 3/4 c2.
 @end lilypond
 
-@cindex time signature, visibility of
+Mid-measure time signature changes are covered in @ref{Upbeats}.
+
+@cindex time signature visibility
 
 Time signatures are printed at the beginning of a piece
 and whenever the time signature changes.  If a change takes place
@@ -1321,15 +1320,16 @@ restores the default behavior of ignoring tempo marks
 for horizontal spacing.
 
 @lilypond[verbatim,quote,relative=0]
-\compressFullBarRests
-\markLengthOn
-\tempo "Molto vivace"
-R1*12
-\tempo "Meno mosso"
-R1*16
-\markLengthOff
-\tempo "Tranquillo"
-R1*20
+\compressMMRests {
+  \markLengthOn
+  \tempo "Molto vivace"
+  R1*12
+  \tempo "Meno mosso"
+  R1*16
+  \markLengthOff
+  \tempo "Tranquillo"
+  R1*20
+}
 @end lilypond
 
 @snippets
@@ -1356,7 +1356,7 @@ Music Glossary:
 
 Notation Reference:
 @ref{Formatting text},
-@ref{MIDI output}.
+@ref{Creating MIDI output}.
 
 Snippets:
 @rlsr{Staff notation}.
@@ -1374,29 +1374,22 @@ Internals Reference:
 @cindex measure, partial
 @cindex measure, pickup
 @cindex pickup measure
+@cindex time signature, mid-measure
 
 @funindex measurePosition
 @funindex \partial
 @funindex partial
 
 Partial or pick-up measures, such as an @emph{anacrusis} or an
-@emph{upbeat}, are entered using the @code{\partial} command,
+@emph{upbeat}, are entered using the @code{\partial} command:
 
 @example
 \partial @var{duration}
 @end example
 
-@noindent
-where @code{@var{duration}} is the @emph{remaining} length of the
-partial measure @emph{before} the start of the next full measure.
-
-@lilypond[quote,verbatim,relative=1]
-\time 3/4
-\partial 8
-e8 | a4 c8 b c4 |
-@end lilypond
-
-The @var{duration} can be any value less than a full measure:
+When @code{\partial} is used at the beginning of a score,
+@code{@var{duration}} is the length of the music preceding the
+first bar.
 
 @lilypond[quote,verbatim,relative=1]
 \time 3/4
@@ -1404,28 +1397,23 @@ The @var{duration} can be any value less than a full measure:
 r4 e8 | a4 c8 b c4 |
 @end lilypond
 
-@code{\partial @var{duration}} can also be written as:
-
-@example
-\set Timing.measurePosition -@var{duration}
-@end example
-
-So the first example above could be written:
+When @code{\partial} is used after the beginning of a score,
+@code{@var{duration}} is the @emph{remaining} length of the
+current measure.  It does not create a new numbered bar.
 
 @lilypond[quote,verbatim,relative=1]
-\time 3/4
-\set Timing.measurePosition = #(ly:make-moment -1/8)
-e8 | a4 c8 b c4 |
+\set Score.barNumberVisibility = #all-bar-numbers-visible
+\override Score.BarNumber.break-visibility =
+          #end-of-line-invisible
+\time 9/8
+d'4.~ 4 d8 d( c) b | c4.~ 4. \bar "||"
+\time 12/8
+\partial 4.
+c8( d) e | f2.~ 4 f8 a,( c) f |
 @end lilypond
 
-The property @code{measurePosition} contains a rational number,
-which is usually positive and indicates how much of the measure
-has passed at this point.  @code{\partial @var{duration}} is
-defined such that no numbered bar gets created: when used at the
-beginning of a score, @code{measurePosition} is set to a
-negative number, implying that the current bar will be
-@emph{preceded} by additional material.  When used elsewhere, it
-moves the requested distance before the @emph{end} of the bar.
+The @code{\partial} command is @emph{required} when the time
+signature changes in mid measure, but it may also be used alone.
 
 @lilypond[quote,verbatim,relative=1]
 \set Score.barNumberVisibility = #all-bar-numbers-visible
@@ -1441,6 +1429,9 @@ r8 e8 | a4
 c8 b[ c b] |
 @end lilypond
 
+The @code{\partial} command sets the @code{Timing.measurePosition}
+property, which is a rational number that indicates how much of
+the measure has passed.
 
 @seealso
 Music Glossary:
@@ -1594,8 +1585,8 @@ stretches of unmetered music to permit breaking:
 
 @cindex double time signatures
 @cindex signatures, polymetric
-@cindex time signatures, polymetric
-@cindex time signatures, double
+@cindex time signature, polymetric
+@cindex time signature, double
 @cindex polymetric signatures
 @cindex meter, polymetric
 
@@ -2102,6 +2093,14 @@ units of @code{baseMoment}.  By default, @code{baseMoment} is one
 over the denominator of the time signature.  By default, each unit of
 length @code{baseMoment} is a single beat.
 
+Note that there are separate @code{beatStructure} and @code{baseMoment}
+values for each time signature.  Changes to these variables apply only
+to the time signature that is currently in force, hence those changes
+must be placed after the @code{\time} command which starts a new time
+signature section, not before it.  New values given to a particular
+time signature are retained and reinstated whenever that time signature
+is re-established.
+
 @lilypond[quote,relative=2,verbatim]
 \time 5/16
 c16^"default" c c c c |
@@ -3071,15 +3070,6 @@ next example, the second bar check will signal an error.
 \time 3/4 c2 e4 | g2 |
 @end example
 
-Bar checks can also be used in lyrics:
-
-@example
-\lyricmode @{
-  \time 2/4
-  Twin -- kle | Twin -- kle |
-@}
-@end example
-
 An incorrect duration can result in a completely garbled score,
 especially if the score is polyphonic, so a good place to start
 correcting input is by scanning for failed bar checks and
@@ -3089,6 +3079,22 @@ If successive bar checks are off by the same musical interval,
 only the first warning message is displayed.  This allows the
 warning to focus on the source of the timing error.
 
+Bar checks can also be inserted in lyrics:
+
+@example
+\lyricmode @{
+  \time 2/4
+  Twin -- kle | Twin -- kle |
+@}
+@end example
+
+Note that bar check marks in lyrics are evaluated at the musical
+moment when the syllable @emph{following} the check mark is processed.
+If the lyrics are associated with the notes of a voice which has a
+rest at the beginning of a bar, then no syllable can be located at the
+start of that bar and a warning will be issued if a bar check mark is
+placed in the lyrics at that position.
+
 
 @funindex |
 @funindex "|"
@@ -3507,33 +3513,6 @@ spacer part, even if the visual part uses @code{\acciaccatura} or
 be printed, connecting the invisible grace note with the following
 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 = {
-  \acciaccatura { f8 } e8 r8 \acciaccatura { f8 } e8 r4
-}
-
-\new Staff {
-  <<
-    \new Voice {
-      \relative c'' {
-        r8 r8 \voiceOne \accMusic \oneVoice r8 |
-        r8 \voiceOne r8 \accMusic \oneVoice r8 |
-      }
-    }
-    \new Voice {
-      \relative c' {
-        s8 s8 \voiceTwo \accMusic \oneVoice s8 |
-        s8 \voiceTwo r8 \accMusic \oneVoice s8 |
-      }
-    }
-  >>
-}
-@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.