]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/advanced-notation.itely
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / Documentation / user / advanced-notation.itely
index b4335de9a011f2267579729691f3add36741afe5..8d3186dc1b177502b4bb82c42c7b77a74d3d7683 100644 (file)
@@ -1,7 +1,7 @@
 @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 
+@c A menu is needed before every deeper *section nesting of @node's; run
 @c     M-x texinfo-all-menus-update
 @c to automatically fill in these menus before saving changes
 
@@ -75,16 +75,16 @@ The @code{\markup} is described in more detail in
 
 @refcommands
 
-@cindex @code{\fatText}
+@findex \fatText
 @code{\fatText},
-@cindex @code{\emptyText}
+@findex \emptyText
 @code{\emptyText}.
 
 
 @commonprop
 
-Checking to make sure that text scripts and lyrics are within the margins is 
-a relatively large computational task.  To speed up processing, lilypond does 
+Checking to make sure that text scripts and lyrics are within the margins is
+a relatively large computational task.  To speed up processing, lilypond does
 not perform such calculations by default; to enable it, use
 
 @example
@@ -128,7 +128,7 @@ c2\startTextSpan b c\stopTextSpan a
 
 @cindex textSpannerUp
 @code{textSpannerUp},
-@cindex textSpannerDown 
+@cindex textSpannerDown
 @code{textSpannerDown},
 @cindex textSpannerNeutral
 @code{textSpannerNeutral}.
@@ -139,7 +139,7 @@ c2\startTextSpan b c\stopTextSpan a
 To print a solid line, use
 
 @example
-\override TextSpanner #'dash-fraction = #'() 
+\override TextSpanner #'dash-fraction = #'()
 @end example
 
 
@@ -157,7 +157,7 @@ Examples: @inputfileref{input/@/regression,text@/-spanner@/.ly}.
 @cindex segno on bar line
 @cindex fermata on bar line
 @cindex bar lines, symbols on
-@cindex @code{\mark}
+@findex \mark
 
 The @code{\mark} command is primarily used for
 @ref{Rehearsal marks},
@@ -313,7 +313,7 @@ block.  This is primarily used in a @code{\book} (see
 @cindex font switching
 
 The markup in the example demonstrates font switching commands.  The
-command @code{\bold} and @code{\italic} apply to the first following 
+command @code{\bold} and @code{\italic} apply to the first following
 word only; to apply a command to more than one word, enclose the
 words with braces,
 
@@ -342,7 +342,7 @@ c1^\markup { \line { a b c } }
 Lists with no previous command are not kept distinct.  The expression
 
 @example
-\center-align @{ @{ a b @} @{ c d @} @} 
+\center-align @{ @{ a b @} @{ c d @} @}
 @end example
 
 @noindent
@@ -450,7 +450,7 @@ The following commands can all be used inside @code{\markup @{ @}}.
 
 @cindex font selection
 @cindex font magnification
-@cindex @code{font-interface}
+@findex font-interface
 
 By setting the object properties described below, you can select a
 font from the preconfigured font families.  LilyPond has default
@@ -472,7 +472,7 @@ 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
@@ -481,14 +481,14 @@ several font shapes available for each font family.  Choices are
 @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}. 
+@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, 
+sheet. If you want to use a font from outside the style sheet,
+then set the
+@code{font-name} property,
 
 @lilypond[fragment,verbatim]
 {
@@ -526,7 +526,7 @@ example,
 @lilypond[verbatim]
 \paper  {
   myStaffSize = #20
-  
+
   #(define fonts
     (make-pango-font-tree "Times New Roman"
                           "Nimbus Sans"
@@ -540,7 +540,7 @@ example,
 @end lilypond
 
 @c we don't do Helvetica / Courier, since GS incorrectly loads
-@c Apple TTF fonts  
+@c Apple TTF fonts
 
 
 
@@ -613,7 +613,7 @@ individual parts.
 @cindex Rests, multi measure
 @cindex Rests, full measure
 @cindex whole rests for a full measure
-@cindex @code{R}
+@findex R
 
 Rests for one full measure (or many bars) are entered using `@code{R}'.  It
 is specifically meant for full bar rests and for entering parts: the rest
@@ -735,7 +735,7 @@ Metronome settings can be entered as follows
 
 In the MIDI output, they are interpreted as a tempo change.  In the
 layout output, a metronome marking is printed
-@cindex @code{\tempo}
+@findex \tempo
 @lilypond[quote,ragged-right,verbatim,fragment]
 \tempo 8.=120 c''1
 @end lilypond
@@ -773,7 +773,7 @@ Program reference: @internalsref{MetronomeMark}.
 Collisions are not checked.  If you have notes above the top line of
 the staff (or notes with articulations, slurs, text, etc), then the
 metronome marking may be printed on top of musical symbols.  If this
-occurs, increase the padding of the metronome mark to place it 
+occurs, increase the padding of the metronome mark to place it
 further away from the staff.
 
 @example
@@ -785,7 +785,7 @@ further away from the staff.
 @subsection Rehearsal marks
 
 @cindex Rehearsal marks
-@cindex @code{\mark}
+@findex \mark
 
 To print a rehearsal mark, use the @code{\mark} command
 
@@ -827,7 +827,7 @@ c1
 @end lilypond
 
 The file @file{scm/@/translation@/-functions@/.scm} contains the definitions
-of @code{format-mark-numbers} (the default format), 
+of @code{format-mark-numbers} (the default format),
 @code{format-mark-box-numbers},
 @code{format-mark-letters} and @code{format-mark-box-letters}.
 These can be used as inspiration for other formatting functions.
@@ -836,6 +836,30 @@ 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.
 
+The horizontal location of rehearsal marks can be adjusted by
+setting @code{break-align-symbol}
+
+@lilypond[fragment,quote,ragged-right,verbatim,relative]
+c1
+\key cis \major
+\clef alto
+\override Score.RehearsalMark #'break-align-symbol = #'key-signature
+\mark "on-key"
+cis
+\key ces \major
+\override Score.RehearsalMark #'break-align-symbol = #'clef
+\clef treble
+\mark "on clef"
+ces
+@end lilypond
+
+@code{break-align-symbol} may also accept the following values:
+@code{ambitus}, @code{breathing-sign}, @code{clef}, @code{custos},
+@code{staff-bar}, @code{left-edge}, @code{key-cancellation},
+@code{key-signature}, and @code{time-signature}.  Setting
+@code{break-align-symbol} will only have an effect if the symbol
+appears at that point in the music.
+
 
 @seealso
 
@@ -856,12 +880,29 @@ Examples: @inputfileref{input/@/regression,rehearsal@/-mark@/-letter@/.ly},
 
 @cindex Bar numbers
 @cindex measure numbers
-@cindex @code{currentBarNumber}
+@findex currentBarNumber
 
 Bar numbers are printed by default at the start of the line.  The
 number itself is stored in the @code{currentBarNumber} property, which
 is normally updated automatically for every measure.
 
+@lilypond[verbatim,ragged-right,quote,fragment,relative]
+\repeat unfold 4 {c4 c c c} \break
+\set Score.currentBarNumber = #50
+\repeat unfold 4 {c4 c c c}
+@end lilypond
+
+Bar numbers may only be printed at bar lines; to print a bar
+number at the beginning of a piece, an empty bar line must
+be added
+
+@lilypond[verbatim,ragged-right,quote,fragment,relative]
+\set Score.currentBarNumber = #50
+\bar ""
+\repeat unfold 4 {c4 c c c} \break
+\repeat unfold 4 {c4 c c c}
+@end lilypond
+
 Bar numbers can be typeset at regular intervals instead of at the
 beginning of each line.  This is illustrated in the following example,
 whose source is available as
@@ -869,44 +910,17 @@ whose source is available as
 
 @lilypondfile[ragged-right,quote]{bar-number-regular-interval.ly}
 
-Bar numbers can be typeset manually by tweaking the
-@code{markFormatter} property
-
-@lilypond[verbatim,ragged-right,quote]
-\relative c' {
-  \set Score.markFormatter
-    = #(lambda (mark context)
-      (make-bold-markup
-        (make-box-markup
-          (number->string (ly:context-property context
-                                               'currentBarNumber)))))
-
-  c1 \bar "||" \mark \default c1 c1 \mark \default c1 \bar "|."
-}
-@end lilypond
-
-Bar numbers can be manually changed by setting the
-@code{Staff.currentBarNumber} property
-
-@lilypond[verbatim,ragged-right,quote]
-\relative c' {
-  \repeat unfold 4 {c4 c c c} \break
-  \set Score.currentBarNumber = #50
-  \repeat unfold 4 {c4 c c c}
-}
-@end lilypond
-
 Bar numbers can be removed entirely by removing the Bar number
 engraver from the score.
 
-@lilypond[verbatim,ragged-right,quote,relative=2]
+@lilypond[verbatim,ragged-right,quote]
 \layout {
   \context {
     \Score
     \remove "Bar_number_engraver"
   }
 }
-{
+\relative c''{
 c4 c c c \break
 c4 c c c
 }
@@ -1010,8 +1024,7 @@ brace is not taken into account. The following property setting can be
 used to move the instrument names to the left, in such situations.
 
 @example
-\override Score.InstrumentName #'space-alist =
-  #'((left-edge extra-space . 2.0))
+\override Score.InstrumentName #'padding = #2.0
 @end example
 
 
@@ -1123,7 +1136,7 @@ during an octavation bracket.
 @node Different editions from one source
 @subsection Different editions from one source
 
-@cindex @code{\tag}
+@findex \tag
 @cindex tag
 
 The @code{\tag} command marks music expressions with a name.  These
@@ -1193,7 +1206,7 @@ Examples: @inputfileref{input/@/regression,tag@/-filter@/.ly}.
 
 Multiple rests are not merged if you create the score with both tagged
 sections.
+
 
 
 @node Orchestral music
@@ -1361,6 +1374,8 @@ staff.  See @inputfileref{input/@/test,ossia@/.ly} for an example.
 @node Quoting other voices
 @subsection Quoting other voices
 
+@cindex cues
+
 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.
@@ -1457,6 +1472,8 @@ Program reference: @internalsref{QuoteMusic}.
 @node Formatting cue notes
 @subsection Formatting cue notes
 
+@cindex cues, formatting
+
 The previous section deals with inserting notes from another voice.
 There is a more advanced music function called @code{\cueDuring},
 which makes formatting cue notes easier.
@@ -1486,24 +1503,24 @@ smaller = {
 \addquote clarinet \relative {
   R1*20
   r2 r8 c f f
-} 
+}
 
 \new Staff \relative  <<
 
   % setup a context for  cue  notes.
   \new Voice = "cue" { \smaller \skip 1*21 }
-  
+
   \set Score.skipBars = ##t
-  
+
   \new Voice {
     R1*20
     \cueDuring #"clarinet" #1 {
       R1
     }
-    g4 g2. 
+    g4 g2.
   }
 >>
-@end lilypond 
+@end lilypond
 
 
 Here are a couple of hints for successful cue notes
@@ -1522,7 +1539,7 @@ Cue notes have smaller font sizes.
 @c Yes, this is good practice.  Otherwise, the start of the original
 @c part can only be seen from the font size.  This is not good enough
 @c for sight-reading.  It is possilbe to use other
-@c markers (e.g. a big close-bracket over the staff) to indicate the cue 
+@c markers (e.g. a big close-bracket over the staff) to indicate the cue
 @c   notes are
 @c finished.
 @c -hwn
@@ -1609,7 +1626,7 @@ see those sections of the documentation.
 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
-@internalsref{TimeSignature} grob. See also 
+@internalsref{TimeSignature} grob. See also
 @inputfileref{input/@/test,compound@/-time@/.ly}).
 
 @lilypond[verbatim,ragged-right]
@@ -1645,7 +1662,7 @@ context.
     \consists "Timing_translator"
     \consists "Default_bar_line_engraver"
   @}
-    
+
 @}
 @end example
 
@@ -1799,7 +1816,7 @@ c4 c1
 
 @noindent
 As the example illustrates, @code{ly:make-moment n m} constructs a
-duration of n/m of a whole note.  For example, @code{ly:make-moment 1 8} is 
+duration of n/m of a whole note.  For example, @code{ly:make-moment 1 8} is
 an eighth
 note duration and @code{ly:make-moment 7 16} is the duration of
 seven sixteenths notes.
@@ -1951,7 +1968,7 @@ teaching tools in addition to great musical scores.
 * Balloon help::                
 * Blank music sheet::           
 * Hidden notes::                
-* Shape note heads ::           
+* Shape note heads::            
 * Easy Notation note heads::    
 * Analysis brackets::           
 * Coloring objects::            
@@ -1967,12 +1984,10 @@ 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]
-\new Voice {
-  \applyOutput
-    #(add-balloon-text 'NoteHead "heads, or tails?"
-    '(1 . -3))
+\applyOutput #'Voice
+  #(add-balloon-text 'NoteHead "heads, or tails?"
+      '(1 . -3))
   c8
-}
 @end lilypond
 
 @noindent
@@ -2027,8 +2042,8 @@ emptymusic = {
 @cindex Invisible notes
 @cindex Transparent notes
 
-@cindex @code{\hideNotes}
-@cindex @code{\unHideNotes}
+@findex \hideNotes
+@findex \unHideNotes
 Hidden (or invisible or transparent) notes can be useful in preparing theory
 or composition exercises.
 
@@ -2041,8 +2056,8 @@ g4 a
 @end lilypond
 
 
-@node Shape note heads 
-@subsection Shape note heads 
+@node Shape note heads
+@subsection Shape note heads
 
 In shape note head notation, the shape of the note head corresponds
 to the harmonic function of a note in the scale.  This notation was
@@ -2098,7 +2113,7 @@ to be printed in a large font size.  To print with a larger font, see
 
 @refcommands
 
-@cindex @code{\setEasyHeads}
+@findex \setEasyHeads
 @code{\setEasyHeads}
 
 
@@ -2206,10 +2221,10 @@ Appendix: @ref{List of colors}.
 
 @refbugs
 Not all x11 colors are distinguishable in a web browser.  For web use
-normal colors are recommended. 
+normal colors are recommended.
 
 An x11 color is not necessarily exactly the same shade as a similarly
-named normal color. 
+named normal color.
 
 Notes in a chord cannot be colored with @code{\override}; use
 @code{\tweak} instead.  See @ref{Objects connected to the input}
@@ -2223,16 +2238,21 @@ for details.
 @cindex notes, ghost
 @cindex notes, parenthesized
 
-Objects may be parenthesized by prefixing @code{\parenthesize} to the music 
-event, 
+Objects may be parenthesized by prefixing @code{\parenthesize} to the music
+event,
 
 @lilypond[relative=2,fragment,verbatim,ragged-right]
 <
   c
   \parenthesize d
   g
->4-\parenthesize -. 
+>4-\parenthesize -.
 @end lilypond
 
+This only functions inside chords, even for single notes
+
+@example
+< \parenthesize NOTE>
+@end example