]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/basic-notation.itely
* lily/context-property.cc (execute_general_pushpop_property):
[lilypond.git] / Documentation / user / basic-notation.itely
index 8fb41f0823e94813701fac39f5433183c2e097d6..bde43e6dcd8878595a96d5cd0d3216d13592ad02 100644 (file)
@@ -1,4 +1,4 @@
-@c -*- coding: latin-1; mode: texinfo; -*-
+@c -*- coding: utf-8; mode: texinfo; -*-
 @c This file is part of lilypond.tely
 
 @c A menu is needed before every deeper *section nesting of @node's; run
@@ -42,6 +42,7 @@ related constructs, such as stems, tuplets and ties.
 * Augmentation dots::           
 * Tuplets::                     
 * Scaling durations::           
+* Stems::
 @end menu
 
 
@@ -163,10 +164,11 @@ print them manually.  A reminder accidental
 can be forced by adding an exclamation mark @code{!}
 after the pitch.  A cautionary accidental
 (i.e., an accidental within parentheses) can be obtained by adding the
-question mark `@code{?}' after the pitch.
+question mark `@code{?}' after the pitch.  These extra accidentals
+can be used to produce natural signs, too.
 
 @lilypond[quote,raggedright,fragment,verbatim]
-cis' cis' cis'! cis'?
+cis' cis' cis'! cis'? c c? c! c
 @end lilypond
 
 
@@ -231,7 +233,8 @@ r1 r2 r4 r8
 @end lilypond
 
 Whole bar rests, centered in middle of the bar,
-must be done with multi-measure rests.  They are discussed in
+must be done with multi-measure rests.  They can be used for a
+single bar as well as many bars, and are discussed in
 @ref{Multi measure rests}.
 
 
@@ -404,6 +407,16 @@ length
 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
 @end lilypond
 
+Tuplets may be nested, for example,
+
+@lilypond[fragment,raggedright,verbatim,relative=2]
+\set tupletNumberFormatFunction = #fraction-tuplet-formatter
+\times 4/6 {
+  a4 a 
+  \times 3/5 { a a a a a }
+}
+@end lilypond
+
 @refcommands
 
 @cindex @code{\tupletUp}
@@ -437,16 +450,15 @@ denominator, but if it is set to the Scheme function
 instead.
 
 
+
+
+
 @seealso
 
 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
 
+Examples: @inputfileref{input/@/regression,tuplet@/-nest@/.ly}.
 
-@refbugs
-
-Nested tuplets are not formatted automatically.  In this case, outer
-tuplet brackets should be moved manually, which is demonstrated in
-@inputfileref{input/@/regression,tuplet@/-nest@/.ly}.
 
 
 @node Scaling durations
@@ -471,6 +483,22 @@ b16*4 c4
 This manual: @ref{Tuplets}
 
 
+@node Stems
+@subsection Stems
+
+Whenever a note is found, a @internalsref{Stem} object is created
+automatically.  For whole notes and rests, they are also created but
+made invisible.
+
+@refcommands
+
+@cindex @code{\stemUp}
+@code{\stemUp},
+@cindex @code{\stemDown}
+@code{\stemDown},
+@cindex @code{\stemNeutral}
+@code{\stemNeutral}.
+
 
 @node Alternate music entry
 @section Alternate music entry
@@ -490,6 +518,7 @@ website for more information.
 * Octave check::                
 * Transpose::                   
 * Bar check::                   
+* Barnumber check::             
 * Skipping corrected music::    
 * Automatic note splitting::    
 @end menu
@@ -525,8 +554,9 @@ between this and the last note is always taken to be a fourth or
 less.  This distance is determined without regarding alterations; a
 @code{fisis} following a @code{ceses} will be put above the
 @code{ceses}.  In other words, a doubly-augmented fourth is considered
-a smaller interval than a diminshed fifth, even though the fourth is
-seven semitones while the fifth is only six semitones.
+a smaller interval than a diminished fifth, even though the
+doubly-augmented fourth spans seven semitones while the diminished
+fifth only spans six semitones.
 
 The octave changing marks @code{'} and @code{,} can be added to raise
 or lower the pitch by an extra octave.  Upon entering relative mode,
@@ -695,8 +725,7 @@ existing music with another @code{transpose}
 
 @seealso
 
-Program reference: @internalsref{TransposedMusic}, and
-@internalsref{UntransposableMusic}.
+Program reference: @internalsref{TransposedMusic}.
 
 
 @refbugs
@@ -750,16 +779,49 @@ pipeSymbol = \bar "||"
 @end lilypond
 
 
+@node Barnumber check
+@subsection Barnumber check
+
+When copying large pieces of music, it can be helpful to check that
+the LilyPond bar number corresponds to the original that you are
+entering from.  This can be checked with @code{\barNumberCheck}, for
+example, 
+
+@verbatim
+\barNumberCheck #123
+@end verbatim
+
+@noindent
+will print a warning if the @code{currentBarNumber} is not 123 when it
+is processed.
+
+
 @node Skipping corrected music
 @subsection Skipping corrected music
 
+
 @cindex @code{skipTypesetting}
+@cindex @code{showLastLength}
+
+When entering or copying music, only the music near the end (where you
+are adding notes) is interesting to view and correct.  To speed up
+this correction process, it is possible to skip typesetting of all but
+the last few measures. This is achieved by putting
+
+@verbatim
+showLastLength = R1*5
+\score { ... }
+@end verbatim
 
-The property @code{Score.skipTypesetting} can be used to switch on and
-off typesetting completely during the interpretation phase.  When
-typesetting is switched off, the music is processed much more
-quickly.  This can be used to skip over the parts of a score that
-have already been checked for errors
+@noindent
+in your source file. This will render only the last 5 measures
+(assuming 4/4 time signature) of every @code{\score} in the input
+file. For longer pieces, rendering only a small part is often an order
+of magnitude quicker than rendering it completely
+
+Skipping parts of a score can be controlled in a more fine-grained
+fashing with the property @code{Score.skipTypesetting}.  When it is
+set, no typesetting is performed at all.
 
 @lilypond[quote,fragment,raggedright,verbatim]
 \relative c'' {
@@ -1073,7 +1135,7 @@ measure is subdivided in 2, 2, 2 and 3.  This is passed to
 
 @seealso
 
-Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
+Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_translator}.
 
 
 @refbugs
@@ -1178,6 +1240,9 @@ connected between different staves of a StaffGroup
 >>
 @end lilypond
 
+
+@commonprop
+
 @cindex @code{whichBar}
 @cindex @code{repeatCommands}
 @cindex @code{defaultBarType}
@@ -1424,11 +1489,13 @@ lines.
 
 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.  For example,
+@code{tieWaitForNote} property to true. The same feature is also useful,
+for example, to tie a tremolo to a chord. For example,
 
 @lilypond[fragment,verbatim,relative=1,raggedright]
 \set tieWaitForNote = ##t
-\grace { c16[~ e~ g]~ } <c, e g>4   
+\grace { c16[~ e~ g]~ } <c, e g>2   
+\repeat "tremolo" 8 { c32~ c'~ } <c c,>1
 @end lilypond
 
 
@@ -1460,9 +1527,6 @@ Program reference: @internalsref{Tie}.
 
 Switching staves when a tie is active will not produce a slanted tie.
 
-Formatting of ties is a difficult subject.  The results are often not
-optimal.
-
 
 @node Slurs
 @subsection Slurs
@@ -1736,6 +1800,8 @@ every eighth grace note
    \new Staff { c4 \grace { g8[ b] } c4 } >>
 @end lilypond
 
+@cindex @code{\afterGrace}
+
 If you want to end a note with a grace, use the @code{\afterGrace}
 command.  It takes two arguments: the main note, and the grace notes
 following the main note. 
@@ -1806,6 +1872,9 @@ Another option is to change the variables @code{startGraceMusic},
 @code{stopAppoggiaturaMusic}.  More information is in the file
 @file{ly/@/grace@/-init@/.ly}.
 
+@noindent
+The slash through the stem in acciaccaturas can be obtained
+in other situations by @code{\override Stem  #'stroke-style = #"grace"}.
 
 @seealso
 
@@ -1828,7 +1897,8 @@ care when you mix staves with grace notes and staves without, for example,
 @end lilypond
 
 @noindent
-This can be remedied by inserting grace skips, for the above example
+This can be remedied by inserting grace skips of the corresponding
+durations in the other staves. For the above example
 
 @example
 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
@@ -2061,6 +2131,11 @@ use spacer notes if multiple marks are needed during one note
 c\< c\! d\> e\!
 << f1 { s4 s4\< s4\! \> s4\! } >>
 @end lilypond
+
+@noindent
+A hairpin starts at the left edge of the beginning note and ends on the
+right edge of the ending note.
+
 This may give rise to very short hairpins.  Use @code{minimum-length}
 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
 example
@@ -2097,6 +2172,18 @@ To create new dynamic marks or text that should be aligned
 with dynamics, see @ref{New dynamic marks}.
 
 
+@commonprop
+
+Dynamics that occur at, begin on, or end on, the same note
+will be vertically aligned.  If you want to ensure that dynamics
+are aligned when they do not occur on the same note, you can
+increase the @code{staff-padding} property.
+
+@example
+\override DynamicLineSpanner #'staff-padding = 4
+@end example
+
+
 @refcommands
 
 @cindex @code{\dynamicUp}
@@ -2168,6 +2255,8 @@ Long running trills are made with @code{\startTrillSpan} and
 
 @seealso
 
+This manual: @ref{Pitched trills}.
+
 Program reference: @internalsref{TrillSpanner}.
 
 
@@ -2883,10 +2972,34 @@ Percent repeats must be declared within a @code{Voice} context.
 }
 @end lilypond
 
+Measure repeats of more than 2 measures get a counter, if you switch
+on the @code{countPercentRepeats} property,
+
+@lilypond[relative=2,fragment,quote,verbatim,raggedright]
+\set countPercentRepeats = ##t
+\new Voice
+  \repeat "percent" 4 { c1 }
+@end lilypond
+
+
+
+Isolated percents can also be printed. This is done by putting a multi
+measure rest with a different print function,
+
+@lilypond[fragment,verbatim]
+\override MultiMeasureRest #'print-function
+  = #Multi_measure_rest::percent
+R1
+@end lilypond
+
+
+
 
 @seealso
 
-Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
+Program reference: @internalsref{RepeatSlash},
+@internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
+@internalsref{DoublePercentRepeatCounter},
+@internalsref{PercentRepeatCounter},
 @internalsref{PercentRepeatedMusic}, and
-@internalsref{DoublePercentRepeat}.