]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/refman.itely
(Rehearsal marks): document new
[lilypond.git] / Documentation / user / refman.itely
index 02fd47bb06ba4923c5cf13b89594246c82edd2f7..e31a01ee227f0d1a320a334907c1aefee522f85b 100644 (file)
@@ -356,10 +356,6 @@ direction manually:
 
 Internals: @internalsref{Dots}, and @internalsref{DotColumn}. 
 
-@refbugs
-
-In dense chords, dots can overlap.
-
 @node Stems
 @subsection Stems
 
@@ -504,10 +500,16 @@ instead.
 
 Internals: @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.
+tuplet brackets should be moved manually, which is demonstrated in
+@inputfileref{input/regression,tuplet-nest.ly}.
+
+
+
 
 @node Easy Notation note heads
 @subsection Easy Notation note heads
@@ -635,8 +637,22 @@ additional @code{\relative} inside the @code{\transpose}.
 @subsection Octave check
 
 
-Octave checks make octave errors easier to correct.
-The syntax is 
+Octave checks make octave errors easier to correct:  a note may be
+followed by @code{=}@var{quotes} which indicates what its absolute
+octave should be.  In the following example,
+@example
+  \relative c'' @{ c='' b=' d,='' @}        
+@end example
+
+@noindent
+@c take care with @code, adds confusing quotes.
+the d will generate a warning, because a d'' is expected, but a d' is
+found.  In the output, the octave is corrected this and the following
+notes.
+
+
+
+There is also a syntax that is separate from the notes.
 @example
   \octave @var{pitch}
 @end example
@@ -1134,6 +1150,7 @@ c4
 \bar ":|" c
 \bar ".|" c
 \bar ".|." c
+\bar ":|:" c
 \bar "|." c
 \bar ":" c
 @end lilypond
@@ -1220,6 +1237,9 @@ to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
 each of these contexts, vertical direction of slurs, stems, etc. is set
 appropriately.
 
+@cindex @code{\voiceOne}
+@cindex @code{\voiceFour}
+
 This can also be done by instantiating @internalsref{Voice} contexts
 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
 a stem directions and horizontal shift for each part:
@@ -1232,6 +1252,11 @@ a stem directions and horizontal shift for each part:
   \new Voice { \voiceTwo fis4~  fis4 f ~ f  } >>
 @end lilypond
 
+@noindent
+The command @code{\oneVoice} will revert back to the normal setting.
+@cindex @code{\oneVoice}
+
+
 Normally, note heads with a different number of dots are not merged, but
 when  the object property @code{merge-differently-dotted} is set in
 the @internalsref{NoteCollision} object, they are merged:
@@ -1278,6 +1303,7 @@ LilyPond also vertically shifts rests that are opposite of a stem:
 @cindex @code{\voiceFour}
 @code{\voiceFour}.
 
+
 The following commands specify in what chords of the current voice
 should be shifted: the outer voice has @code{\shiftOff}, and the inner
 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
@@ -2128,7 +2154,7 @@ Internals: @internalsref{ScriptEvent}, and @internalsref{Script}.
 
 @refbugs
 
- These note ornaments appear in the printed output but have no
+These note ornaments appear in the printed output but have no
 effect on the MIDI rendering of the music.
 
 
@@ -2352,8 +2378,6 @@ Internals: @internalsref{GraceMusic}.
 
 @refbugs
 
-Grace notes cannot be used in the smallest size (@file{paper11.ly}).
-
 A score that starts with an @code{\grace} section needs an explicit
 @code{\context Voice} declaration, otherwise the main note and grace
 note end up on different staves.
@@ -2371,9 +2395,6 @@ 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.
 
-Overriding settings cannot be done in separate styles for appoggiatura
-and acciaccatura.
-
 
 @node Glissando
 @subsection Glissando
@@ -3115,7 +3136,8 @@ handle this cross-staffing behavior.  In this section we discuss the
 There is no support for putting chords across staves.  You can get
 this result by increasing the length of the stem in the lower stave so
 it reaches the stem in the upper stave, or vice versa. An example is
-included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
+included with the distribution as
+@inputfileref{input/test,stem-cross-staff.ly}.
 
 Dynamics are not centered, but kludges do exist. See
 @inputfileref{input/template,piano-dynamics.ly}.
@@ -3462,54 +3484,53 @@ The definition of lyrics mode is too complex.
 @node The Lyrics context
 @subsection  The Lyrics context
 
-Lyrics are printed by interpreting them in @internalsref{Lyrics} context:
+Lyrics are printed by interpreting them in @internalsref{LyricsVoice} context:
 @example
- \context Lyrics \lyrics @dots{}
+ \context LyricsVoice \lyrics @dots{}
 @end example
 
 @cindex automatic syllable durations
-@cindex @code{\addlyrics}
+@cindex @code{\lyricsto}
 @cindex lyrics and melodies
 
 This will place the lyrics according to the durations that were
 entered. The lyrics can also be aligned under a given melody
 automatically.  In this case, it is no longer necessary to enter the
 correct duration for each syllable.  This is achieved by combining the
-melody and the lyrics with the @code{\addlyrics} expression:
+melody and the lyrics with the @code{\lyricsto} expression:
 @example
-\addlyrics
-  \notes @dots{}
-  \context Lyrics @dots{} 
+\lyricsto @var{name} \new LyricsVoice @dots{} 
 @end example
 
-@cindex staff order, with @code{\addlyrics}
+This aligns the lyrics to the notes of the @internalsref{Voice}
+context called @var{name}, which has to exist. Therefore, normally
+the @code{Voice} is specified first, and then the lyrics are specified
+with @code{\lyricsto}. 
 
-Normally, this will put the lyrics below the staff. For different or
-more complex orderings, the best way is to setup the hierarchy of
-staves and lyrics first, e.g.
+For different or more complex orderings, the best way is to setup the
+hierarchy of staves and lyrics first, e.g.
 @example
 \context ChoirStaff \notes <<
-  \context Lyrics = sopr @{ s1 @}
-  \context Staff = soprStaff @{ s1 @}
-  \context Lyrics = tenor @{ s1 @}
-  \context Staff = tenorStaff @{ s1 @}
+  \context LyricsVoice = sopranoLyrics @{ s1 @}
+  \context Voice = soprano @{ @emph{music} @}
+  \context LyricsVoice = tenor @{ s1 @}
+  \context Voice = tenorLyrics @{ @emph{music} @}
 >>
 @end example
 and then combine the appropriate melodies and lyric lines:
 @example
-  \addlyrics
-    \context Staff = soprStaff  @emph{the music}
-    \context Lyrics = sopr @emph{the lyrics}
+  \lyricsto "soprano" \new LyricsVoice @emph{the lyrics}
 @end example
 
-putting both together, you would get
-@example
-\context ChoirStaff \notes <<
-  \context Lyrics = @dots{}
-  \context Staff =  @dots{}
-  \addlyrics @dots{}
->>
-@end example
+An example is in @inputfileref{input/template,satb.ly}.
+
+When multiple stanzas are put on the same melody, it can happen that
+two stanzas have melismata in different locations. This can be
+remedied by switching off melismata for one
+@internalsref{LyricsVoice}. This is achieved by setting
+the @code{ignoreMelismata} property to @code{#t}. An example is shown
+in @inputfileref{input/regression,lyric-combine-new.ly}.
+
 
 @cindex SATB
 @cindex choral score
@@ -3521,19 +3542,17 @@ A complete example of a SATB score setup is in the file
 
 Internals: @internalsref{LyricCombineMusic}, @internalsref{Lyrics}
 
-Examples: @inputfileref{input/template,satb.ly}.
-
+Examples: @inputfileref{input/template,satb.ly},
+@inputfileref{input/regression,lyric-combine-new.ly}.
 @refbugs
 
-@code{\addlyrics} is not automatic enough: melismata are not detected
-automatically, and melismata are not stopped when they hit a rest.  A
-melisma on the last note in a melody is not printed.
+Melismata are not detected automatically, and must be inserted by hand.
 
 
 @node More stanzas
 @subsection More stanzas
 
-
 @cindex phrasing, in lyrics
 
 
@@ -3562,17 +3581,15 @@ that identity followed by a dash.  In the preceding example, the
 The complete example is shown here:
 @lilypond[singleline,verbatim]
 \score {
-\addlyrics
-  \notes \relative c'' \context Voice = duet { \time 3/4
+  << \notes \relative c'' \context Voice = duet { \time 3/4
      g2 e4 a2 f4 g2.  }
-  \lyrics \context Lyrics <<
-  \context LyricsVoice = "duet-1" {
-    \property LyricsVoice . stanza = "Bert"
-    Hi, my name is bert.    }
-  \context LyricsVoice = "duet-2" {
-    \property LyricsVoice . stanza = "Ernie" 
+  \lyrics << \lyricsto "duet" \new LyricsVoice {
+    \property LyricsVoice . stanza = "1"
+    Hi, my name is bert. }
+  \lyricsto "duet" \new LyricsVoice {
+    \property LyricsVoice . stanza = "2" 
     Ooooo, ch\'e -- ri, je t'aime. }
-  >>
+  >> >>
 }
 @end lilypond
 
@@ -4163,17 +4180,49 @@ for the score.
 To print a  rehearsal mark, use the @code{\mark} command:
 @lilypond[fragment,verbatim]
 \relative c'' {
-  c1 \mark "A"
-  c1 \mark "B"
-  c1 \mark "12"
-  c1 \mark "13"
-  c1
+  c1 \mark \default
+  c1 \mark \default
+  c1 \mark #8 
+  c1 \mark \default
+  c1 \mark \default
 }
 @end lilypond
 
+@noindent
+(The letter I is skipped in accordance with engraving traditions.)
+
 The mark is incremented automatically if you use @code{\mark
-\default}. The value to use is stored in the property
-@code{rehearsalMark} is used and automatically incremented.
+\default}, but you can also use an integer argument to set the mark
+manually.  The value to use is stored in the property
+@code{rehearsalMark}.
+
+The style is defined by the property @code{markFormatter}. It is a
+function taking the current mark (an integer) and the current context
+as argument. It should return a markup object. In the following
+example, @code{markFormatter} is set to a canned procedure. After a
+few measures, it is set to function that produces a boxed number. 
+
+@lilypond[verbatim,fragment,relative 1]
+  \property Score.markFormatter = #format-mark-numbers 
+  c1 \mark \default
+  c1 \mark \default
+  \property Score.markFormatter
+    = #(lambda (mark  context)
+       (make-bold-markup (make-box-markup (number->string mark))))
+  c1 \mark \default
+  c1 \mark \default
+@end lilypond
+
+The file @file{scm/translation-functions.scm} contains the definitions
+of @code{format-mark-numbers} (the default format) and
+@code{format-mark-letters}. They 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 fermatas on a barline. Use @code{\markup} to
@@ -4184,17 +4233,14 @@ to access the appropriate symbol:
   c1
 @end lilypond
 
-In this case, during line breaks,
-marks must also be printed at the end of the line, and not at the
-beginning. Use the following to force that behavior:
+In this case, during line breaks, marks must also be printed at the
+end of the line, and not at the beginning. Use the following to force
+that behavior:
 @example
 \property Score.RehearsalMark \override
   #'break-visibility = #begin-of-line-invisible
 @end example
 
-See @inputfileref{input/test,boxed-molecule.ly} for putting boxes
-around the marks.
-
 @cindex fermatas
 @cindex coda
 @cindex segno
@@ -4204,7 +4250,13 @@ around the marks.
 
 Internals: @internalsref{MarkEvent}, @internalsref{RehearsalMark}
 
-Examples: @inputfileref{input/test,boxed-molecule.ly}.
+Init files: @file{scm/translation-functions.scm} contains the
+definition of @code{format-mark-numbers} and
+@code{format-mark-letters}. They can be used as inspiration for other
+formatting functions.
+
+Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
+@inputfileref{input/regression,rehearsal-mark-number.ly}.
 
 
 @node Bar numbers
@@ -7308,7 +7360,7 @@ entering the chant, as the following short excerpt demonstrates:
 @lilypond[raggedright,verbatim,noindent]
 \include "gregorian-init.ly"
 \score {
-  \addlyrics
+<<
   \context VaticanaVoice {
     \property Score.BarNumber \set #'transparent = ##t
     \notes {
@@ -7317,9 +7369,10 @@ entering the chant, as the following short excerpt demonstrates:
       \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
     }
   }
-  \context Lyrics \lyrics {
+  \lyricsto "" \new LyricsVoice \lyrics {
     San- ctus, San- ctus, San- ctus
-  }
+  } >>
+  
 }
 @end lilypond
 
@@ -7476,6 +7529,7 @@ naming, and are manipulated using @code{\property}:
 @example
   \property Context.propertyName  = @var{value}
 @end example
+
 Layout properties are use Scheme style variable naming, i.e.  lower
 case words separated with dashes. They are symbols, and should always
 be quoted using @code{#'}.  For example, this could be an imaginary
@@ -7484,6 +7538,11 @@ layout property name:
   #'layout-property-name
 @end example
 
+@seealso
+
+The introduction of the @ref{Technical manual} gives a more in-depth
+treatment of the difference between translation and layout.
+
 @menu
 * Tuning objects::              
 * Constructing a tweak::        
@@ -7506,7 +7565,7 @@ for @internalsref{Stem}:
 
 @example
         (thickness . 1.3)
-        (beamed-lengths . (0.0 2.5 2.0 1.5))
+       (beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
         (Y-extent-callback . ,Stem::height)
         @var{...}
 @end example
@@ -7979,7 +8038,7 @@ added to LilyPond.
 @refbugs
 
 There is no style sheet provided for other fonts besides the @TeX{}
-family.
+Computer Modern family.
 
 @cindex font selection
 @cindex font magnification
@@ -8111,18 +8170,18 @@ respectively.
   This is converted to a musical symbol, e.g. @code{\musicglyph
 #"accidentals-0"} will select the natural sign from the music font.
 See @ref{The Feta font} for  a complete listing of the possible glyphs.
+
 @item \char
 This produces a single character, e.g. @code{\char #65} produces the 
 letter 'A'.
 
-@item \note  @var{log} @var{dots} @var{dir}
+@item \note  @var{duration} @var{dir}
 @cindex @code{\note}
 
 This produces a note with a stem pointing in @var{dir} direction, with
-duration log @var{log} and @var{dots} augmentation dots. The duration
-log is the negative 2-logarithm of the duration denominator. For
-example, a quarter note has log 2, an eighth note 3 and a breve has
-log -1.
+the @var{duration} for the note head type and augmentation dots. For
+example, @code{\note #"4." #-0.75} creates a dotted quarter note, with
+a shortened down stem.
 
 @item \hspace #@var{amount}
 @cindex @code{\hspace}
@@ -8429,26 +8488,74 @@ There is no convenient mechanism to manually override spacing.
 @cindex staff size, setting
 @cindex @code{paper} file
 
-The Feta font provides musical symbols at seven different sizes.
-These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
-26 point.  The point size of a font is the height of the corresponding
-staff (excluding line thicknesses).
-
-Definitions for these sizes are the files @file{paperSZ.ly}, where
-@code{SZ} is one of 11, 13, 16, 20, 23 and 26.  If you include any
-of these files, the variables @code{paperEleven},
-@code{paperThirteen}, @code{paperSixteen}, 
-@code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
-are defined respectively.  The default @code{\paper} block is also
-set. These files should be imported at toplevel, i.e.
+The Feta font provides musical symbols at eight seven different
+sizes. Each font is tuned for a different staff size: at smaller sizes
+the font gets heavier, to match the relatively heavier staff lines.
+The recommended font sizes are listed in the following table:
+
+@multitable @columnfractions  .25 .25 .25 .25
+
+@item @b{name}
+@tab @b{staff height (pt)}
+@tab @b{staff height (mm)}
+@tab @b{use}
+
+@item feta11
+@tab 11.22
+@tab 3.9 
+@tab pocket scores
+
+@item feta13
+@tab 12.60pt
+@tab 4.4mm
+@tab
+
+@item feta14
+@tab 14.14pt
+@tab 5.0mm
+@tab 
+
+@item feta16
+@tab 15.87pt
+@tab 5.6mm
+@tab 
+
+@item feta18
+@tab 17.82pt
+@tab 6.3mm
+@tab song books
+
+@item feta20
+@tab 17.82pt
+@tab 7.0mm
+@tab standard parts 
+
+@item feta23
+@tab 22.45 pt
+@tab 7.9mm
+@tab 
+
+@item feta20
+@tab 25.2 pt
+@tab 8.9mm
+@tab
+@c modern rental material  ?
+
+@end multitable
+
+These fonts are available in any sizes. The context property
+@code{fontSize} and the layout property @code{staff-space} (in
+@internalsref{StaffSymbol}) can be used to tune size for individual
+staffs. The size of individual staffs are relative to the global size,
+which can be set   in the following manner:
+
 @example
-        \include "paper26.ly"
-        \score @{  ... @}
+  #(set-staff-size 14)
 @end example
 
-The default font size settings for each staff heights are generated
-from the 20pt style sheet. For more details, see the file
-@file{scm/font.scm}.
+This sets the global default size to 14pt staff height, and scales all
+fonts accordingly.
+
 
 
 @node Line breaking
@@ -8476,14 +8583,22 @@ point.
 For linebreaks at regular intervals  use @code{\break} separated by
 skips and repeated with @code{\repeat}:
 @example
-<<  \repeat unfold 7 @{ s1 * 4 \break  @}
+<<  \repeat unfold 7 @{
+         s1 \noBreak s1 \noBreak
+         s1 \noBreak s1 \break  @}
    @emph{the real music}
 >> 
 @end  example
 
 @noindent
 This makes the following 28 measures (assuming 4/4 time) be broken every
-4 measures.
+4 measures, and only there.
+
+@refcommands
+
+@code{\break}, @code{\noBreak}
+@cindex @code{\break}
+@cindex @code{\noBreak}
 
 @seealso
 
@@ -8549,21 +8664,13 @@ The predefined command @code{\newpage} also does this.
 @cindex page size
 @cindex @code{papersize}
 
-To change the paper size, you must first set the @code{papersize} paper 
-variable variable as in the example below.  Set it to
-the strings @code{a4}, @code{letter}, or @code{legal}.  After this
-specification, you must set the font as described above.  If you want
-the default font, then use the 20 point font.
-
+To change the paper size, use the following Scheme code:
 @example
-        \paper@{ papersize = "a4" @}
-        \include "paper16.ly"
+        \paper@{
+           #(set-paper-size "a4")
+        @}
 @end example
 
-The file @code{paper16.ly}  will now include a file named @file{a4.ly}, which
-will set the paper variables @code{hsize} and @code{vsize} (used by
-@code{lilypond-book} and @code{lilypond}).
-
 
 @refcommands