]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/advanced-notation.itely
Merge with master
[lilypond.git] / Documentation / user / advanced-notation.itely
index c5a868393de9dd067cf30908638cd64fe678b5a0..42cdb7bdae0f8a670720217f81e0be8b17cc7553 100644 (file)
@@ -1,5 +1,11 @@
 @c -*- coding: utf-8; mode: texinfo; -*-
 @c This file is part of lilypond.tely
+@ignore
+    Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
+
+    When revising a translation, copy the HEAD committish of the
+    version that you are working on.  See TRANSLATION for details.
+@end ignore
 
 @c A menu is needed before every deeper *section nesting of @node's; run
 @c     M-x texinfo-all-menus-update
@@ -303,9 +309,8 @@ but it can also be used anywhere text is called in lilypond
 }
 @end lilypond
 
-Text can also be placed on its own, away from any @code{\score}
-block.  This is primarily used in a @code{\book} (see
-@ref{Multiple scores in a book}).
+A @code{\markup} command can also be placed on its own, away from any
+@code{\score} block, see @ref{Multiple scores in a book}.
 
 @lilypond[quote,ragged-right,verbatim]
 \markup{ Here is some text. }
@@ -622,7 +627,7 @@ individual parts.
 @cindex whole rests for a full measure
 @funindex R
 
-Rests for one full measure (or many bars) are entered using `@code{R}'.  It
+Rests for one full measure (or many bars) are entered using @samp{R}.  It
 is specifically meant for full bar rests and for entering parts: the rest
 can expand to fill a score with rests, or it can be printed as a single
 multi-measure rest.  This expansion is controlled by the property
@@ -651,7 +656,7 @@ R1*13/8*12 |
 An @code{R} spanning a single measure is printed as either a whole rest
 or a breve, centered in the measure regardless of the time signature.
 
-If there are only a few measures of rest, LilyPond prints ``church rests''
+If there are only a few measures of rest, LilyPond prints @q{church rests}
 (a series of rectangles) in the staff.  To replace that with a simple
 rest, use @code{MultiMeasureRest.expand-limit}.
 
@@ -805,8 +810,8 @@ c1 \mark \default
 @end lilypond
 
 @noindent
-The letter@tie{}`I' is skipped in accordance with engraving traditions.
-If you wish to include the letter `I', then use
+The letter@tie{}@q{I} is skipped in accordance with engraving traditions.
+If you wish to include the letter @q{I}, then use
 
 @example
 \set Score.markFormatter = #format-mark-alphabet
@@ -843,6 +848,20 @@ You may use @code{format-mark-barnumbers}, @code{format-mark-box-barnumbers},
 and @code{format-mark-circle-barnumbers} to get bar numbers instead of
 incremented numbers or letters.
 
+Other styles of rehearsal mark can be specified manually
+
+@example
+\mark "A1"
+@end example
+
+@noindent
+@code{Score.markFormatter} does not affect marks specified in this manner.
+However, it is possible to apply a @code{\markup} to the string.
+
+@example
+\mark \markup@{ \box A1 @}
+@end example
+
 @cindex segno
 @cindex coda
 @cindex D.S al Fine
@@ -888,6 +907,8 @@ appears at that point in the music.
 
 @seealso
 
+This manual: @ref{Text marks}.
+
 Program reference: @internalsref{RehearsalMark}.
 
 Init files: @file{scm/@/translation@/-functions@/.scm} contains the
@@ -975,12 +996,13 @@ used to position the number correctly.
 In an orchestral score, instrument names are printed at the left side
 of the staves.
 
-This can be achieved by setting @internalsref{Staff}.@code{instrument}
-and @internalsref{Staff}.@code{instr}, or
-@internalsref{PianoStaff}.@code{instrument} and
-@internalsref{PianoStaff}.@code{instr}.  This will print text before
-the start of the staff.  For the first staff, @code{instrument} is
-used, for the following ones, @code{instr} is used.
+This can be achieved by setting @internalsref{Staff}.@code{instrumentName}
+and @internalsref{Staff}.@code{shortInstrumentName}, or
+@internalsref{PianoStaff}.@code{instrumentName} and
+@internalsref{PianoStaff}.@code{shortInstrumentName}.  This will
+print text before
+the start of the staff.  For the first staff, @code{instrumentName} is
+used, for the following ones, @code{shortInstrumentName} is used.
 
 @lilypond[quote,verbatim,ragged-right,relative=1,fragment]
 \set Staff.instrumentName = "Ploink "
@@ -1051,20 +1073,24 @@ be added to that context.
 More information about adding and removing engravers can
 be found in @ref{Modifying context plug-ins}.
 
+Instrument names may be changed in the middle of a piece,
 
-@seealso
+@lilypond[quote,fragment,verbatim,ragged-right]
+\set Staff.instrumentName = "First"
+\set Staff.shortInstrumentName = "one"
+c1 c c c \break
+c1 c c c \break
+\set Staff.instrumentName = "Second"
+\set Staff.shortInstrumentName = "two"
+c1 c c c \break
+c1 c c c \break
+@end lilypond
 
-Program reference: @internalsref{InstrumentName}.
 
-@refbugs
+@seealso
 
-When you put a name on a grand staff or piano staff, the width of the
-brace is not taken into account. The following property setting can be
-used to move the instrument names to the left, in such situations.
+Program reference: @internalsref{InstrumentName}.
 
-@example
-\override Score.InstrumentName #'padding = #2.0
-@end example
 
 
 @node Instrument transpositions
@@ -1125,7 +1151,7 @@ c'4^"in G"
 @node Ottava brackets
 @subsection Ottava brackets
 
-`Ottava' brackets introduce an extra transposition of an octave for
+@q{Ottava} brackets introduce an extra transposition of an octave for
 the staff.  They are created by invoking the function
 @code{set-octavation}
 
@@ -1143,9 +1169,9 @@ the staff.  They are created by invoking the function
 }
 @end lilypond
 
-The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
-(for 15ma) as arguments.  Internally the function sets the properties
-@code{ottavation} (e.g., to @code{"8va"}) and
+The @code{set-octavation} function also takes -1 (for 8va bassa), 2@tie{}(for 15ma),
+and -2 (for 15ma bassa) as arguments.  Internally the function sets the properties
+@code{ottavation} (e.g., to @code{"8va"} or @code{"8vb"}) and
 @code{centralCPosition}.  For overriding the text of the bracket, set
 @code{ottavation} after invoking @code{set-octavation}, i.e.,
 
@@ -1297,8 +1323,8 @@ The first @code{g} appears only once, although it was
 specified twice (once in each part).  Stem, slur, and tie directions are
 set automatically, depending whether there is a solo or unisono.  The
 first part (with context called @code{one}) always gets up stems, and
-`Solo', while the second (called @code{two}) always gets down stems and
-`Solo II'.
+@q{Solo}, while the second (called @code{two}) always gets down stems and
+@q{Solo II}.
 
 If you just want the merging parts, and not the textual markings, you
 may set the property @code{printPartCombineTexts} to false
@@ -1369,7 +1395,7 @@ will be ignored.
 @cindex Hiding staves
 
 In orchestral scores, staff lines that only have rests are usually
-removed; this saves some space.  This style is called `French Score'.
+removed; this saves some space.  This style is called @q{French Score}.
 For @internalsref{Lyrics},
 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
 switched on by default.  When the lines of these contexts turn out
@@ -1407,7 +1433,7 @@ or @code{\RemoveEmptyRhythmicStaffContext}.
 
 Another application is making ossia sections, i.e., alternative
 melodies on a separate piece of staff, with help of a Frenched
-staff.  See @inputfileref{input/@/test,ossia@/.ly} for an example.
+staff.  
 
 
 @node Quoting other voices
@@ -1417,19 +1443,19 @@ staff.  See @inputfileref{input/@/test,ossia@/.ly} for an example.
 
 With quotations, fragments of other parts can be inserted into a part
 directly.  Before a part can be quoted, it must be marked especially as
-quotable.  This is done with the @code{\addquote} command.
+quotable.  This is done with the @code{\addQuote} command.
 
 @example
-\addquote @var{name} @var{music}
+\addQuote @var{name} @var{music}
 @end example
 
 
 @noindent
 Here, @var{name} is an identifying string.  The @var{music} is any kind
-of music.  Here is an example of @code{\addquote}
+of music.  Here is an example of @code{\addQuote}
 
 @example
-\addquote clarinet \relative c' @{
+\addQuote clarinet \relative c' @{
   f4 fis g gis
 @}
 @end example
@@ -1437,7 +1463,7 @@ of music.  Here is an example of @code{\addquote}
 This command must be entered at toplevel, i.e., outside any music
 blocks.
 
-After calling @code{\addquote}, the quotation may then be done with
+After calling @code{\addQuote}, the quotation may then be done with
 @code{\quoteDuring} or @code{\cueDuring},
 
 @example
@@ -1457,7 +1483,7 @@ the previously added @code{clarinet} voice.
 
 More precisely, it takes the current time-step of the part being
 printed, and extracts the notes at the corresponding point of the
-@code{\addquote}d voice.  Therefore, the argument to @code{\addquote}
+@code{\addQuote}d voice.  Therefore, the argument to @code{\addQuote}
 should be the entire part of the voice to be quoted, including any
 rests at the beginning.
 
@@ -1465,7 +1491,7 @@ Quotations take into account the transposition of both source and target
 instruments, if they are specified using the @code{\transposition} command.
 
 @lilypond[quote,ragged-right,verbatim]
-\addquote clarinet \relative c' {
+\addQuote clarinet \relative c' {
   \transposition bes
   f4 fis g gis
 }
@@ -1492,12 +1518,15 @@ will quote notes (but no rests), together with scripts and dynamics.
 @refbugs
 
 Only the contents of the first @internalsref{Voice} occurring in an
-@code{\addquote} command will be considered for quotation, so
+@code{\addQuote} command will be considered for quotation, so
 @var{music} can not contain @code{\new} and @code{\context Voice}
 statements that would switch to a different Voice.
 
 Quoting grace notes is broken and can even cause LilyPond to crash.
 
+Quoting nested triplets may result in poor notation.
+
+
 @seealso
 
 In this manual: @ref{Instrument transpositions}.
@@ -1539,7 +1568,7 @@ smaller = {
   \override Beam #'length-fraction = #0.8
 }
 
-\addquote clarinet \relative {
+\addQuote clarinet \relative {
   R1*20
   r2 r8 c f f
 }
@@ -1590,6 +1619,34 @@ the original clef should be stated once again.
 
 @end itemize
 
+The macro @code{\transposedCueDuring} is
+useful to add cues to instruments which use a completely different
+octave range (for example, having a cue of a piccolo flute within
+a contra bassoon part).
+
+@lilypond[verbatim,ragged-right,quote]
+picc = \relative c''' {
+  \clef "treble^8"
+  R1 |
+  c8 c c e g2 |
+  a4 g g2 |
+}
+\addQuote "picc" { \picc }
+
+cbsn = \relative c, {
+  \clef "bass_8"
+  c4 r g r
+  \transposedCueDuring #"picc" #UP c,, { R1 } |
+  c4 r g r |
+}
+
+<<
+  \context Staff = "picc" \picc
+  \context Staff = "cbsn" \cbsn
+>>
+@end lilypond
+
+
 
 @node Aligning to cadenzas
 @subsection Aligning to cadenzas
@@ -1628,7 +1685,7 @@ cadenza = \relative c' {
 
 In the 20th century, composers have greatly expanded the musical
 vocabulary.  With this expansion, many innovations in musical notation
-have been tried.  The book ``Music Notation in the 20th century'' by
+have been tried.  The book @q{Music Notation in the 20th century} by
 Kurt Stone gives a comprehensive overview (see @ref{Literature
 list}).
 
@@ -1654,6 +1711,11 @@ see those sections of the documentation.
 @node Polymetric notation
 @subsection Polymetric notation
 
+@cindex double time signatures
+@cindex signatures, polymetric
+@cindex polymetric signatures
+@cindex meter, polymetric
+
 Double time signatures are not supported explicitly, but they can be
 faked.  In the next example, the markup for the time signature is
 created with a markup text.  This markup text is inserted in the
@@ -1665,7 +1727,7 @@ created with a markup text.  This markup text is inserted in the
 tsMarkup =\markup {
   \override #'(baseline-skip . 2) \number {
     \column { "2" "4" }
-    \lower #1 "+"
+    \vcenter "+"
     \bracket \column { "5" "8" }
   }
 }
@@ -1857,7 +1919,7 @@ seven sixteenths notes.
 @subsection Proportional notation
 @cindex Proportional notation
 
-Notes can be spaced proportional to their time-difference by
+Notes can be spaced proportionally to their time-difference by
 assigning a duration to @code{proportionalNotationDuration}
 
 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
@@ -1868,6 +1930,36 @@ assigning a duration to @code{proportionalNotationDuration}
 >>
 @end lilypond
 
+Setting this property only affects the ideal spacing between
+consecutive notes.  For true proportional notation, the following
+settings are also required.
+
+@itemize @bullet
+
+@item True proportional notation requires that symbols are allowed to
+overstrike each other.  That is achieved by removing the
+@internalsref{Separating_line_group_engraver} from
+@internalsref{Staff} context.
+
+@item Spacing influence of  prefatory matter (clefs, bar lines, etc.)
+is removed by setting the @code{strict-note-spacing} property to
+@code{#t} in @internalsref{SpacingSpanner} grob.
+
+@item Optical spacing tweaks are switched by setting 
+@code{uniform-stretching} in @internalsref{SpacingSpanner} to true.
+
+
+@end itemize
+
+@seealso
+
+@inputfileref{input/@/regression,spacing-proportional/.ly}
+@inputfileref{input/@/regression,spacing-strict-notespacing/.ly}
+@inputfileref{input/@/regression,spacing-strict-spacing-grace/.ly}
+
+An example of strict proportional notation is in the
+example file @file{input/proportional.ly}.
+
 
 @node Clusters
 @subsection Clusters
@@ -1912,7 +2004,7 @@ accurately.  Use @code{<g a>8 <e a>8} instead.
 @cindex note heads, special
 
 Different noteheads are used by various instruments for various
-meanings -- crosses are used for ``parlato'' with vocalists, stopped
+meanings -- crosses are used for @q{parlato} with vocalists, stopped
 notes on guitar; diamonds are used for harmonics on string instruments,
 etc.  There is a shorthand (@code{\harmonic}) for diamond shapes; the
 other notehead styles are produced by tweaking the property
@@ -2058,6 +2150,7 @@ teaching tools in addition to great musical scores.
 * Analysis brackets::           
 * Coloring objects::            
 * Parentheses::                 
+* Grid lines::                  
 @end menu
 
 @node Balloon help
@@ -2069,17 +2162,18 @@ balloon.  The primary purpose of this feature is to explain notation.
 The following example demonstrates its use.
 
 @lilypond[quote,verbatim,fragment,ragged-right,relative=2]
-\applyOutput #'Voice
-  #(add-balloon-text 'NoteHead "heads, or tails?"
-      '(1 . -3))
-  c8
+\new Voice \with { \consists "Balloon_engraver" }
+{
+  \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
+  <c-\balloonText #'(-2 . -2) \markup { Hello }  >8
+}
 @end lilypond
 
 @noindent
-The function @code{add-balloon-text} takes the name of a grob, the
-label to print, and the position where to put the label relative to
-the object.  In the above example, the text ``heads or tails?'' ends
-3 spaces below and 1 space to the right of the marked head.
+There are two music functions, @code{balloonText} and
+@code{balloonGrobText}. The latter takes the name of the grob to
+adorn, while the former may be used as an articulation on a note. 
+The other arguments  are the offset and the text of the label.
 
 @cindex balloon
 @cindex notation, explaining
@@ -2104,6 +2198,7 @@ removing @code{Bar_number_engraver}.
 
 
 @lilypond[quote,verbatim]
+\layout{ indent = #0 }
 emptymusic = {
   \repeat unfold 2 % Change this for more lines.
   { s1\break }
@@ -2111,9 +2206,13 @@ emptymusic = {
 }
 \new Score \with {
   \override TimeSignature #'transparent = ##t
+% un-comment this line if desired
+%  \override Clef #'transparent = ##t
   defaultBarType = #""
   \remove Bar_number_engraver
 } <<
+
+% modify these to get the staves you want
   \new Staff \emptymusic
   \new TabStaff \emptymusic
 >>
@@ -2187,7 +2286,7 @@ combinations are possible, e.g.
 @cindex easy notation
 @cindex Hal Leonard
 
-The `easy play' note head includes a note name inside the head.  It is
+The @q{easy play} note head includes a note name inside the head.  It is
 used in music for beginners
 
 @lilypond[quote,ragged-right,verbatim,fragment,staffsize=26]
@@ -2198,7 +2297,7 @@ used in music for beginners
 The command @code{\setEasyHeads} overrides settings for the
 @internalsref{NoteHead} object.  To make the letters readable, it has
 to be printed in a large font size.  To print with a larger font, see
-@ref{Setting global staff size}.
+@ref{Setting the staff size}.
 
 @refcommands
 
@@ -2345,3 +2444,11 @@ This only functions inside chords, even for single notes
 @end example
 
 
+@node Grid lines
+@subsection Grid lines
+
+Vertical lines can be drawn between staves synchronized with
+the notes.
+
+Examples: @inputfileref{input/@/regression,grid@/-lines@/.ly}.
+