]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/advanced-notation.itely
New section on modifying templates and misc small changes.
[lilypond.git] / Documentation / user / advanced-notation.itely
index cd23b7a53aa5c0e9a1e89a1838f1b3eee4a39b70..1560bb3ba753f9d7c4b854626f8e9ec868747829 100644 (file)
@@ -13,7 +13,6 @@ This chapter deals with rarely-used and advanced notation.
 
 @menu
 * Text::                        
-* Even more than notes::        
 * Preparing parts::             
 * Orchestral music::            
 * Contemporary notation::       
@@ -22,6 +21,7 @@ This chapter deals with rarely-used and advanced notation.
 @end menu
 
 
+
 @node Text
 @section Text
 
@@ -31,10 +31,13 @@ your scores.
 @menu
 * Text scripts::                
 * Text spanners::               
+* Text marks::                  
 * Text markup::                 
 * Text encoding::               
 * Nested scores::               
 * Overview of text markup commands::  
+* Selecting font sizes::        
+* Font selection::              
 * New dynamic marks::           
 * Other text markup issues::    
 @end menu
@@ -42,16 +45,15 @@ your scores.
 
 @node Text scripts
 @subsection Text scripts
-@cindex Text scripts
 
+@cindex Text scripts
 @cindex text items, non-empty
 @cindex non-empty texts
 
-It is possible to place arbitrary strings of text or markup text (see
-@ref{Text markup}) above or below notes by using a string
-@code{c^"text"}.  By default, these indications do not influence the
-note spacing, but by using the command @code{\fatText}, the widths
-will be taken into account
+It is possible to place arbitrary strings of text or @ref{Text markup}
+above or below notes by using a string @code{c^"text"}.  By default,
+these indications do not influence the note spacing, but by using the
+command @code{\fatText}, the widths will be taken into account
 
 @lilypond[quote,fragment,raggedright,verbatim,relative=1]
 c4^"longtext" \fatText c4_"longlongtext" c4
@@ -74,15 +76,17 @@ The @code{\markup} is described in more detail in
 @cindex @code{\emptyText}
 @code{\emptyText}.
 
+
 @seealso
 
 In this manual: @ref{Text markup}.
 
-Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
+Program reference: @internalsref{TextScript}.
 
 
 @node Text spanners
 @subsection Text spanners
+
 @cindex Text spanners
 
 Some performance indications, e.g., @i{rallentando} or @i{accelerando},
@@ -110,25 +114,84 @@ c2\startTextSpan b c\stopTextSpan a
 @cindex textSpannerNeutral
 @code{textSpannerNeutral}.
 
+
 @seealso
 
-Internals @internalsref{TextSpanEvent},
-@internalsref{TextSpanner}.
+Program reference: @internalsref{TextSpanner}.
 
 Examples: @inputfileref{input/@/regression,text@/-spanner@/.ly}.
 
 
+@node Text marks
+@subsection Text marks
+
+@cindex coda on bar line
+@cindex segno on bar line
+@cindex fermata on bar line
+@cindex bar lines, symbols on
+@cindex @code{\mark}
+
+The @code{\mark} command is primarily used for
+@internalsref{Rehearsal marks},
+but it can also be used to put signs like coda,
+segno, and fermata on a bar line.  Use @code{\markup} to
+access the appropriate symbol
+
+@lilypond[fragment,quote,raggedright,verbatim,relative=2]
+c1 \mark \markup { \musicglyph #"scripts.ufermata" }
+c1
+@end lilypond
+
+@noindent
+@code{\mark} is only typeset above the top stave of the score.  If
+you specify the @code{\mark} command at a bar line, the resulting
+mark is placed above the bar line.  If you specify it in the middle
+of a bar, the resulting mark is positioned between notes.  If it is
+specified before the beginning of a score line, it is placed
+before the first note of the line.  Finally, if the mark occurs at
+a line break, the mark will be printed at the
+beginning of the next line.
+@c  IMO this is a bug; hopefully it'll be fixed soon, so I can
+@c  delete this sentence.   -gp
+If there is no next line, then the mark will not be printed at all.
+
+
+@commonprop
+
+To print the mark at the end of the current line, use
+
+@example
+\override Score.RehearsalMark
+  #'break-visibility = #begin-of-line-invisible
+@end example
+
+@code{\mark} is often useful for adding text to the end of bar.  In
+such cases, changing the @code{#'self-alignment} is very useful
+
+@lilypond[fragment,quote,raggedright,verbatim,relative=2]
+\override Score.RehearsalMark
+  #'break-visibility = #begin-of-line-invisible
+c1 c c c4 c c c
+\once \override Score.RehearsalMark #'self-alignment-X = #right
+\mark "D.S. al Fine "
+@end lilypond
+
+
+@seealso
+
+Program reference: @internalsref{RehearsalMark}.
+
+
 @node Text markup
 @subsection Text markup
+
+@cindex markup
 @cindex text markup
 @cindex markup text
-
 @cindex typeset text
 
-The internal mechanism to typeset texts is accessed with the keyword
-@code{\markup}.  Within markup mode, you can enter texts similar to
-lyrics.  They are simply entered, while commands use the backslash @code{\}.
-@cindex markup
+Use @code{\markup} to typeset text.  Commands are entered with the
+backslash @code{\}.
 
 @lilypond[quote,verbatim,fragment,relative=1]
 c1^\markup { hello }
@@ -136,12 +199,39 @@ c1_\markup { hi there }
 c1^\markup { hi \bold there, is \italic anyone home? }
 @end lilypond
 
+@noindent
+See @ref{Overview of text markup commands} for a list of all
+commands.
+
+@code{\markup} is primarily used for @internalsref{TextScript}s,
+but it can also be used anywhere text is called in lilypond
+
+@lilypond[quote,verbatim]
+\header{ title = \markup{ \bold { foo \italic { bar! } } } }
+\score{
+  \relative c'' {
+    \override Score.RehearsalMark
+      #'break-visibility = #begin-of-line-invisible
+    \override Score.RehearsalMark #'self-alignment-X = #right
+
+    \set Staff.instrument = \markup{ \column{ Alto solo } }
+    c2^\markup{ don't be \flat }
+    b2
+    a2\mark \markup{ \large \bold Fine }
+    r2
+    \bar "||"
+  }
+  \addlyrics { bar, foo \markup{ \italic bar! } }
+}
+@end lilypond
+
 @cindex font switching
 
 The markup in the example demonstrates font switching commands.  The
 command @code{\bold} and @code{\italic} apply to the first following 
-word only; enclose a set of texts with braces to apply a command
-to more words:
+word only; to apply a command to more than one word, enclose the
+words with braces,
+
 @example
 \markup @{ \bold @{ hi there @} @}
 @end example
@@ -153,9 +243,6 @@ For clarity, you can also do this for single arguments, e.g.,
 \markup @{ is \italic @{ anyone @} home @}
 @end example
 
-@cindex font size, texts
-
-
 In markup mode you can compose expressions, similar to mathematical
 expressions, XML documents, and music expressions.  You can stack
 expressions grouped vertically with the command @code{\column}.
@@ -167,6 +254,32 @@ c1^\markup { \center-align { a bbbb c } }
 c1^\markup { \line { a b c } }
 @end lilypond
 
+Lists with no previous command are not kept distinct.  The expression
+
+@example
+\center-align @{ @{ a b @} @{ c d @} @} 
+@end example
+
+@noindent
+
+is equivalent to
+
+@example
+\center-align @{ a b c d @}
+@end example
+
+@noindent
+
+To keep lists of words distinct, please use quotes @code{"} or
+the @code{\line} command
+
+@lilypond[quote,verbatim,fragment,relative=1]
+\fatText
+c4^\markup{ \center-align { on three lines } }
+c4^\markup{ \center-align { "all one line" } }
+c4^\markup{ \center-align { { on three lines } } }
+c4^\markup{ \center-align { \line { on one line } } }
+@end lilypond
 
 Markups can be stored in variables and these variables
 may be attached to notes, like
@@ -175,7 +288,6 @@ allegro = \markup @{ \bold \large @{ Allegro @} @}
  @{ a^\allegro b c d @}
 @end example
 
-
 Some objects have alignment procedures of their own, which cancel out
 any effects of alignments applied to their markup arguments as a
 whole.  For example, the @internalsref{RehearsalMark} is horizontally
@@ -185,6 +297,10 @@ effect.
 
 @seealso
 
+This manual: @ref{Overview of text markup commands}.
+
+Program reference: @internalsref{TextScript}.
+
 Init files: @file{scm/@/new@/-markup@/.scm}.
 
 
@@ -217,7 +333,6 @@ and Cyrillic lyrics,
 
 @lilypondfile[fontload]{utf-8.ly}
 
-
 The @TeX{} backend does not handle encoding specially at all.  Strings
 in the input are put in the output as-is.  Extents of text items in the
 @TeX{} backend, are determined by reading a file created via the
@@ -239,6 +354,7 @@ Both @file{les-nereides.texstr} and @file{les-nereides.tex} need
 suitable LaTeX wrappers to load appropriate La@TeX{} packages for
 interpreting non-ASCII strings.
 
+
 @seealso
 
 @inputfileref{input/regression,utf-8.ly}
@@ -262,7 +378,6 @@ block.
   e f
 }
 @end lilypond
 
 
 @node Overview of text markup commands
@@ -273,6 +388,133 @@ The following commands can all be used inside @code{\markup @{ @}}.
 @include markup-commands.tely
 
 
+@node Selecting font sizes
+@subsection Selecting font sizes
+
+The easiest method of setting the font size of any context, is by
+setting the @code{fontSize} property.
+
+@lilypond[quote,fragment,relative=1,verbatim]
+c8
+\set fontSize = #-4
+c f
+\set fontSize = #3
+g
+@end lilypond
+
+@noindent
+It does not change the size of variable symbols, such as beams or
+slurs.
+
+Internally, the @code{fontSize} context property will cause the
+@code{font-size} property to be set in all layout objects.  The value
+of @code{font-size} is a number indicating the size relative to the
+standard size for the current staff height.  Each step up is an
+increase of approximately 12% of the font size.  Six steps is exactly a
+factor two.  The Scheme function @code{magstep} converts a
+@code{font-size} number to a scaling factor.
+
+@lilypond[quote,fragment,relative=1,verbatim]
+c8
+\override NoteHead #'font-size = #-4
+c f
+\override NoteHead #'font-size = #3
+g
+@end lilypond
+
+LilyPond has fonts in different design sizes.  The music fonts for
+smaller sizes are chubbier, while the text fonts are relatively wider.
+Font size changes are achieved by scaling the design size that is
+closest to the desired size.  The standard font size (for
+@code{font-size} equals 0), depends on the standard staff height.  For
+a 20pt staff, a 10pt font is selected.
+
+The @code{font-size} property can only be set on layout objects that
+use fonts. These are the ones supporting the
+@internalsref{font-interface} layout interface.
+
+@refcommands
+
+The following commands set @code{fontSize} for the current voice:
+
+@cindex @code{\tiny}
+@code{\tiny}, 
+@cindex @code{\small}
+@code{\small}, 
+@cindex @code{\normalsize}
+@code{\normalsize}.
+
+
+@node Font selection
+@subsection Font selection
+
+@cindex font selection
+@cindex font magnification
+@cindex @code{font-interface}
+
+By setting the object properties described below, you can select a
+font from the preconfigured font families.  LilyPond has default
+support for the feta music fonts and @TeX{}'s Computer Modern text
+fonts.
+
+@itemize @bullet
+@item @code{font-encoding}
+is a symbol that sets layout of the glyphs.  This should only be set to
+select different types of non-text fonts, eg.
+
+@code{fetaBraces} for piano staff braces, @code{fetaMusic} the
+standard music font, including ancient glyphs, @code{fetaDynamic} for
+dynamic signs and @code{fetaNumber} for the number font.
+
+@item @code{font-family}
+is a symbol indicating the general class of the typeface.  Supported are
+@code{roman} (Computer Modern), @code{sans}, and @code{typewriter}.
+  
+@item @code{font-shape}
+is a symbol indicating the shape of the font.  There are typically
+several font shapes available for each font family.  Choices are
+@code{italic}, @code{caps}, and @code{upright}.
+
+@item @code{font-series}
+is a symbol indicating the series of the font.  There are typically
+several font series for each font family and shape.  Choices are
+@code{medium} and @code{bold}. 
+
+@end itemize
+
+Fonts selected in the way sketched above come from a predefined style
+sheet. If you want to use a font from outside the style sheet, 
+then set the 
+@code{font-name} property, 
+
+@lilypond[fragment,verbatim]
+{
+  \override Staff.TimeSignature #'font-name = #"Times"
+  \override Staff.TimeSignature #'font-size = #2
+  \time 3/4
+  c'1_\markup {
+    \override #'(font-name . "Vera Bold")
+      { This text is in Vera Bold }
+  }
+}
+@end lilypond
+
+@noindent
+Any font can be used, as long as it is available to Pango/FontConfig.
+
+The size of the font may be set with the @code{font-size}
+property. The resulting size is taken relative to the
+@code{text-font-size} as defined in the @code{\paper} block.
+
+@cindex font size
+@cindex font magnification
+
+@seealso
+
+Init files: @file{ly/@/declarations@/-init@/.ly} contains hints how new
+fonts may be added to LilyPond.
+
+
 @node New dynamic marks
 @subsection New dynamic marks
 
@@ -295,7 +537,6 @@ It is also possible to print dynamics in round parenthesis or square
 brackets.  These are often used for adding editorial dynamics.
 
 @lilypond[quote,verbatim,raggedright]
-\version "2.4.2"
 rndf = \markup{ \center-align {\line { \bold{\italic (}
   \dynamic f \bold{\italic )} }} }
 boxf = \markup{ \bracket { \dynamic f } }
@@ -319,152 +560,31 @@ To use a normal font within a title, you must define it manually
 @end example
 
 
-@c  really bad section name.  :(
-@node Even more than notes
-@section Even more than notes
+
+@node Preparing parts
+@section Preparing parts
+
+This section describes various notation that are useful for preparing
+individual parts.
 
 @menu
-* Transpose::                   
-* Ottava brackets::             
 * Multi measure rests::         
-* Time administration::         
+* Metronome marks::             
+* Rehearsal marks::             
+* Bar numbers::                 
+* Instrument names::            
+* Instrument transpositions::   
+* Ottava brackets::             
+* Different editions from one source::  
 @end menu
 
 
-
-@node Transpose
-@subsection Transpose
-@cindex Transpose
-@cindex transposition of pitches
-@cindex @code{\transpose}
-
-A music expression can be transposed with @code{\transpose}.  The
-syntax is
-@example
-\transpose @var{from} @var{to} @var{musicexpr}
-@end example
-
-This means that @var{musicexpr} is transposed by the interval between
-the pitches @var{from} and @var{to}: any note with pitch @code{from}
-is changed to @code{to}.
-
-
-For example, consider a piece written in the key of D-major.  If
-this piece is a little too low for its performer, it can be
-transposed up to E-major with
-@example
-\transpose d e @dots{}
-@end example
-
-Consider a part written for violin (a C instrument).  If
-this part is to be played on the A clarinet, the following
-transposition will produce the appropriate part
-
-@example
-\transpose a c @dots{}
-@end example
-
-@code{\transpose} distinguishes between enharmonic pitches: both
-@code{\transpose c cis} or @code{\transpose c des} will transpose up
-half a tone.  The first version will print sharps and the second
-version will print flats
-
-@lilypond[quote,raggedright,verbatim]
-mus = { \key d \major cis d fis g }
-\context Staff {
-  \clef "F" \mus
-  \clef "G"
-  \transpose c g' \mus
-  \transpose c f' \mus
-}
-@end lilypond
-
-@code{\transpose} may also be used to input written notes for a
-transposing instrument.  Pitches are normally entered into LilyPond
-in C (or ``concert pitch''), but they may be entered in another
-key.  For example, when entering music for a B-flat trumpet which
-begins on concert D, one would write
-
-@example
-\transpose c bes @{ e4 @dots{} @}
-@end example
-
-To print this music in B-flat again (ie producing a trumpet part,
-instead of a concert pitch conductor's score) you would wrap the
-existing music with another @code{transpose}
-
-@example
-\transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
-@end example
-
-
-
-@seealso
-
-Program reference: @internalsref{TransposedMusic}, and
-@internalsref{UntransposableMusic}.
-
-@refbugs
-
-If you want to use both @code{\transpose} and @code{\relative},
-you must put @code{\transpose} outside of @code{\relative}, since
-@code{\relative} will have no effect music that appears inside a
-@code{\transpose}.
-
-
-@node Ottava brackets
-@subsection Ottava brackets
-
-`Ottava' brackets introduce an extra transposition of an octave for
-the staff.  They are created by invoking the function
-@code{set-octavation}
-
-@cindex ottava
-@cindex 15ma
-@cindex octavation
-
-@lilypond[quote,raggedright,verbatim,fragment]
-\relative c''' {
-  a2 b
-  #(set-octavation 1)
-  a b
-  #(set-octavation 0)
-  a b
-}
-@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
-@code{centralCPosition}.  For overriding the text of the bracket, set
-@code{ottavation} after invoking @code{set-octavation}, i.e.,
-
-@lilypond[quote,raggedright,verbatim]
-{
-  #(set-octavation 1)
-  \set Staff.ottavation = #"8"
-  c'''
-}
-@end lilypond
-
-@seealso
-
-Program reference: @internalsref{OttavaBracket}.
-
-Examples: @inputfileref{input/@/regression,ottava@/.ly},
-@inputfileref{input/@/regression,ottava@/-broken@/.ly}.
-
-@refbugs
-
-@code{set-octavation} will get confused when clef changes happen
-during an octavation bracket.
-
-
 @node Multi measure rests
 @subsection Multi measure rests
+
 @cindex multi measure rests
 @cindex Rests, multi measure
-
+@cindex whole rests for a full measure
 @cindex @code{R}
 
 Multi-measure rests are entered using `@code{R}'.  It is specifically
@@ -507,13 +627,12 @@ R1*2 | R1*5 | R1*9
 R1*2 | R1*5 | R1*9
 @end lilypond
 
-
 @cindex text on multi-measure rest
 @cindex script on multi-measure rest
 @cindex fermata on multi-measure rest
 
 Texts can be added to multi-measure rests by using the
-@var{note}-@code{markup} syntax (see @ref{Text markup}).
+@var{note}-@code{markup} syntax @ref{Text markup}.
 A variable (@code{\fermataMarkup}) is provided for
 adding fermatas
 
@@ -533,19 +652,16 @@ R1*4
 @end example
 
 
-@cindex whole rests for a full measure
-
 @seealso
 
-Program reference: @internalsref{MultiMeasureRestEvent},
-@internalsref{MultiMeasureTextEvent},
-@internalsref{MultiMeasureRestMusicGroup}, and
+Program reference: @internalsref{MultiMeasureRestMusicGroup},
 @internalsref{MultiMeasureRest}.
 
 The layout object @internalsref{MultiMeasureRestNumber} is for the
 default number, and @internalsref{MultiMeasureRestText} for user
 specified texts.
 
+
 @refbugs
 
 It is not possible to use fingerings (e.g., @code{R1-4}) to put numbers
@@ -567,68 +683,6 @@ When @code{skipBars} is set, the result will look OK, but the bar
 numbering will be off.
 
 
-@node Time administration
-@subsection Time administration
-
-Time is administered by the @internalsref{Time_signature_engraver},
-which usually lives in the @internalsref{Score} context.
-The bookkeeping deals with the following variables
-
-@table @code
-@item currentBarNumber
-The measure number.
-
-@item measureLength
-The length of the measures in the current time signature.  For a 4/4
-time this is@tie{}1, and for 6/8 it is 3/4.
-
-@item measurePosition
-The point within the measure where we currently are.  This quantity
-is reset to@tie{}0 whenever it exceeds @code{measureLength}.  When that
-happens, @code{currentBarNumber} is incremented.
-
-@item timing
-If set to true, the above variables are updated for every time
-step.  When set to false, the engraver stays in the current measure
-indefinitely.
-@end table
-
-Timing can be changed by setting any of these variables explicitly.
-In the next example, the 4/4 time signature is printed, but
-@code{measureLength} is set to 5/4.  After a while, the measure is
-shortened by 1/8, by setting @code{measurePosition} to 7/8 at 2/4
-in the measure, so the next bar line will fall at 2/4 + 3/8.  The
-3/8 arises because 5/4 normally has 10/8, but we have manually
-set the measure position to be 7/8 and 10/8 - 7/8 = 3/8.
-
-@lilypond[quote,raggedright,verbatim,relative,fragment]
-\set Score.measureLength = #(ly:make-moment 5 4)
-c1 c4
-c1 c4
-c4 c4
-\set Score.measurePosition = #(ly:make-moment 7 8)
-b8 b b
-c4 c1
-@end lilypond
-
-
-
-@node Preparing parts
-@section Preparing parts
-
-This section describes various notation that are useful for preparing
-individual parts.
-
-@menu
-* Metronome marks::             
-* Rehearsal marks::             
-* Bar numbers::                 
-* Instrument names::            
-* Instrument transpositions::   
-* Different editions from one source::  
-@end menu
-
-
 @node Metronome marks
 @subsection Metronome marks
 
@@ -648,6 +702,9 @@ layout output, a metronome marking is printed
 \tempo 8.=120 c''1
 @end lilypond
 
+
+@commonprop
+
 To change the tempo in the MIDI output without printing anything, make
 the metronome marking invisible
 @example
@@ -670,7 +727,8 @@ See @ref{Text markup} for more details.
 
 @seealso
 
-Program reference: @internalsref{MetronomeChangeEvent}.
+Program reference: @internalsref{MetronomeMark}.
+
 
 @refbugs
 
@@ -687,8 +745,8 @@ further away from the staff.
 
 @node Rehearsal marks
 @subsection Rehearsal marks
+
 @cindex Rehearsal marks
-@cindex mark
 @cindex @code{\mark}
 
 To print a rehearsal mark, use the @code{\mark} command
@@ -703,8 +761,6 @@ c1 \mark \default
 
 @noindent
 (The letter@tie{}`I' is skipped in accordance with engraving traditions.)
-@c umm, is the manual the right place for feature requests?  :)  -gp
-@c FIXME - should make that tunable.
 
 The mark is incremented automatically if you use @code{\mark
 \default}, but you can also use an integer argument to set the mark
@@ -733,40 +789,9 @@ of @code{format-mark-numbers} (the default format), @code{format-mark-box-number
 These can be used as inspiration for other formatting functions.
 
 
-@cindex coda on bar line
-@cindex segno on bar line
-@cindex fermata on bar line
-@cindex bar lines, symbols on
-
-The @code{\mark} command can also be used to put signs like coda,
-segno, and fermata on a bar line.  Use @code{\markup} to
-access the appropriate symbol
-
-@lilypond[fragment,quote,raggedright,verbatim,relative=2]
-c1 \mark \markup { \musicglyph #"scripts.ufermata" }
-c1
-@end lilypond
-
-If the mark occurs at a line break, the mark will be printed at the
-beginning of the next line.
-@c  IMO this is a bug; hopefully it'll be fixed soon, so I can
-@c  delete this sentence.   -gp
-If there is no next line, then the mark will not be printed at all.
-To print the mark at the end of the current line, use
-
-@example
-\override Score.RehearsalMark
-  #'break-visibility = #begin-of-line-invisible
-@end example
-
-@cindex fermatas
-@cindex coda
-@cindex segno
-@cindex bar lines, putting symbols on
-
 @seealso
 
-Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
+Program reference: @internalsref{RehearsalMark}.
 
 Init files: @file{scm/@/translation@/-functions@/.scm} contains the
 definition of @code{format-mark-numbers} and
@@ -781,7 +806,6 @@ Examples: @inputfileref{input/@/regression,rehearsal@/-mark@/-letter@/.ly},
 @node Bar numbers
 @subsection Bar numbers
 
-
 @cindex Bar numbers
 @cindex measure numbers
 @cindex @code{currentBarNumber}
@@ -824,6 +848,7 @@ Bar numbers can be manually changed by setting the
 }
 @end lilypond
 
+
 @seealso
 
 Program reference: @internalsref{BarNumber}.
@@ -832,6 +857,7 @@ Examples:
 @inputfileref{input/@/test,bar@/-number@/-every@/-five@/-reset@/.ly},
 and @inputfileref{input/@/test,bar@/-number@/-regular@/-interval@/.ly}.
 
+
 @refbugs
 
 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
@@ -885,6 +911,7 @@ the name to avoid a collision.
 
 @node Instrument transpositions
 @subsection Instrument transpositions
+
 @cindex transposition, MIDI
 @cindex transposition, instrument
 
@@ -936,10 +963,62 @@ c'4^"in G"
 @end example
 
 
+@node Ottava brackets
+@subsection Ottava brackets
+
+`Ottava' brackets introduce an extra transposition of an octave for
+the staff.  They are created by invoking the function
+@code{set-octavation}
+
+@cindex ottava
+@cindex 15ma
+@cindex octavation
+
+@lilypond[quote,raggedright,verbatim,fragment]
+\relative c''' {
+  a2 b
+  #(set-octavation 1)
+  a b
+  #(set-octavation 0)
+  a b
+}
+@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
+@code{centralCPosition}.  For overriding the text of the bracket, set
+@code{ottavation} after invoking @code{set-octavation}, i.e.,
+
+@lilypond[quote,raggedright,verbatim]
+{
+  #(set-octavation 1)
+  \set Staff.ottavation = #"8"
+  c'''
+}
+@end lilypond
+
+
+@seealso
+
+Program reference: @internalsref{OttavaBracket}.
+
+Examples: @inputfileref{input/@/regression,ottava@/.ly},
+@inputfileref{input/@/regression,ottava@/-broken@/.ly}.
+
+
+@refbugs
+
+@code{set-octavation} will get confused when clef changes happen
+during an octavation bracket.
+
+
 @node Different editions from one source
 @subsection Different editions from one source
 
+@cindex @code{\tag}
 @cindex tag
+
 The @code{\tag} command marks music expressions with a name.  These
 tagged expressions can be filtered out later.  With this mechanism it
 is possible to make different versions of the same music source.
@@ -988,7 +1067,6 @@ would yield
 
 @lilypondfile[raggedright,quote]{tag-filter.ly}
 
-
 The argument of the @code{\tag} command should be a symbol, or a list
 of symbols, for example,
 @example
@@ -996,17 +1074,18 @@ of symbols, for example,
 @end example
 
 
-
 @seealso
 
 Examples: @inputfileref{input/@/regression,tag@/-filter@/.ly}.
 
+
 @refbugs
 
 Multiple rests are not merged if you create the score with both tagged
 sections.
  
 
+
 @node Orchestral music
 @section Orchestral music
 
@@ -1102,10 +1181,7 @@ no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
 
 @seealso
 
-Program reference: @internalsref{PartCombineMusic},
-@internalsref{SoloOneEvent}, and
-@internalsref{SoloTwoEvent}, and
-@internalsref{UnisonoEvent}.
+Program reference: @internalsref{PartCombineMusic}.
 
 @refbugs
 
@@ -1396,12 +1472,15 @@ LilyPond is limited.
 
 @menu
 * Polymetric notation::         
+* Time administration::         
 * Clusters::                    
 * Special fermatas::            
+* Special noteheads::           
 * Feathered beams::             
 * Improvisation::               
 @end menu
 
+
 @node Polymetric notation
 @subsection Polymetric notation
 
@@ -1488,7 +1567,7 @@ This notation can be created by setting a common time signature for
 each staff but replacing it manually using
 @code{timeSignatureFraction} to the desired fraction.  Then the printed
 durations in each staff are scaled to the common time signature.
-The latter is done with @code{\compressmusic}, which is similar to
+The latter is done with @code{\compressMusic}, which is similar to
 @code{\times}, but does not create a tuplet bracket.
 
 
@@ -1506,13 +1585,13 @@ multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
   \new Staff {
     \time 3/4
     \set Staff.timeSignatureFraction = #'(9 . 8)
-    \compressmusic #'(2 . 3)
+    \compressMusic #'(2 . 3)
       \repeat unfold 6 { c8[ c c] }
   }
   \new Staff {
     \time 3/4
     \set Staff.timeSignatureFraction = #'(10 . 8)
-    \compressmusic #'(3 . 5) {
+    \compressMusic #'(3 . 5) {
       \repeat unfold 2 { c8[ c c] }
       \repeat unfold 2 { c8[ c] }
       | c4. c4. \times 2/3 { c8 c c } c4
@@ -1530,6 +1609,53 @@ When using different time signatures in parallel, the spacing is
 aligned vertically, but bar lines distort the regular spacing.
 
 
+@node Time administration
+@subsection Time administration
+
+@cindex Time administration
+
+Time is administered by the @internalsref{Time_signature_engraver},
+which usually lives in the @internalsref{Score} context.  The
+bookkeeping deals with the following variables
+
+@table @code
+@item currentBarNumber
+The measure number.
+
+@item measureLength
+The length of the measures in the current time signature.  For a 4/4
+time this is@tie{}1, and for 6/8 it is 3/4.
+
+@item measurePosition
+The point within the measure where we currently are.  This quantity
+is reset to@tie{}0 whenever it exceeds @code{measureLength}.  When that
+happens, @code{currentBarNumber} is incremented.
+
+@item timing
+If set to true, the above variables are updated for every time
+step.  When set to false, the engraver stays in the current measure
+indefinitely.
+@end table
+
+Timing can be changed by setting any of these variables explicitly.
+In the next example, the 4/4 time signature is printed, but
+@code{measureLength} is set to 5/4.  After a while, the measure is
+shortened by 1/8, by setting @code{measurePosition} to 7/8 at 2/4
+in the measure, so the next bar line will fall at 2/4 + 3/8.  The
+3/8 arises because 5/4 normally has 10/8, but we have manually
+set the measure position to be 7/8 and 10/8 - 7/8 = 3/8.
+
+@lilypond[quote,raggedright,verbatim,relative,fragment]
+\set Score.measureLength = #(ly:make-moment 5 4)
+c1 c4
+c1 c4
+c4 c4
+\set Score.measurePosition = #(ly:make-moment 7 8)
+b8 b b
+c4 c1
+@end lilypond
+
+
 
 @node Clusters
 @subsection Clusters
@@ -1558,8 +1684,7 @@ automatically avoid collisions between ordinary notes and clusters.
 
 Program reference: @internalsref{ClusterSpanner},
 @internalsref{ClusterSpannerBeacon},
-@internalsref{Cluster_spanner_engraver}, and
-@internalsref{ClusterNoteEvent}.
+@internalsref{Cluster_spanner_engraver}.
 
 Examples: @inputfileref{input/@/regression,cluster@/.ly}.
 
@@ -1611,6 +1736,34 @@ of differing lengths.  The following fermatas are supported
 See @ref{Articulations} for general instructions how to apply scripts
 such as fermatas to notes.
 
+
+@node Special noteheads
+@subsection Special noteheads
+
+Different noteheads are used by various instruments for various
+meanings -- crosses are used for ``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
+
+@lilypond[raggedright,relative=1,fragment,verbatim,quote]
+c4 d
+\override NoteHead #'style = #'cross
+e f
+\revert NoteHead #'style
+e d <c f\harmonic> <d a'\harmonic>
+@end lilypond
+
+@noindent
+To see all notehead styles, please see
+@inputfileref{input/@/regression,note@/-head@/-style@/.ly}.
+
+
+@seealso
+
+Program reference: @internalsref{NoteHead}.
+
+
 @node Feathered beams
 @subsection Feathered beams
 
@@ -1618,7 +1771,7 @@ Feathered beams are not supported natively, but they can be faked by
 forcing two beams to overlap.  Here is an example,
 
 @c don't change relative setting witout changing positions!
-@lilypond[raggedright,relative=1,fragment,verbatim]
+@lilypond[raggedright,relative=1,fragment,verbatim,quote]
 \new Staff <<
   \new Voice
   {
@@ -1870,8 +2023,7 @@ to @internalsref{Staff} context.  A bracket is started with
 
 @seealso
 
-Program reference: @internalsref{HorizontalBracket},
-@internalsref{NoteGroupingEvent}.
+Program reference: @internalsref{HorizontalBracket}.
 
 Examples: @inputfileref{input/@/regression,note@/-group@/-bracket@/.ly}.
 
@@ -1977,6 +2129,7 @@ named normal color.
 COLORLIST
 
 
+
 @node Automatic notation
 @section Automatic notation
 
@@ -1989,7 +2142,6 @@ opinions to lilypond-devel.  Thanks!  :)
 @menu
 * Automatic accidentals::       
 * Setting automatic beam behavior::  
-* Beam formatting::             
 @end menu
 
 @node Automatic accidentals
@@ -2216,6 +2368,18 @@ shortest note they contain.  For a beam ending rule that only applies
 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
 *)}.
 
+For example,
+
+@lilypond[quote,raggedright,relative=2,fragment,verbatim]
+\time 5/8
+#(override-auto-beam-setting '(end * * 5 8) 2 8)
+c8 c d d d
+\time 4/4
+e8 e f f e e d d
+\time 5/8
+c8 c d d d
+@end lilypond
+
 @cindex automatic beam generation
 @cindex autobeam
 @cindex @code{autoBeaming}
@@ -2241,21 +2405,5 @@ same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
 >>}.  If a polyphonic voice ends while an automatic beam is still
 accepting notes, it is not typeset.
 
-@node Beam formatting
-@subsection Beam formatting
-
-When a beam falls in the middle of the staff, the beams point normally
-down.  However, this behaviour can be altered with the
-@code{neutral-direction} property.
-
-@lilypond[quote,raggedright,relative=2,fragment,verbatim]
-{
-  b8[ b]
-  \override Beam #'neutral-direction = #-1
-  b[ b]
-  \override Beam #'neutral-direction = #1
-  b[ b]
-}
-@end lilypond