-@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
* Overview of text markup commands::
* Font selection::
* New dynamic marks::
-* Other text markup issues::
@end menu
\textSpannerDown
\override TextSpanner #'edge-text = #'("rall " . "")
c2\startTextSpan b c\stopTextSpan a
+\break
+\textSpannerUp
+\override TextSpanner #'edge-text = #(cons (markup #:italic "rit" ) "")
+c2\startTextSpan b c\stopTextSpan a
@end lilypond
@refcommands
\set Staff.instrument = \markup{ \column{ Alto solo } }
c2^\markup{ don't be \flat }
- b2
+ \override TextSpanner #'edge-text = #(cons (markup #:italic "rit" ) "")
+ b2\startTextSpan
a2\mark \markup{ \large \bold Fine }
- r2
+ r2\stopTextSpan
\bar "||"
}
\addlyrics { bar, foo \markup{ \italic bar! } }
}
@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 movements}).
+
+@lilypond[quote,raggedright,verbatim]
+\markup{ Here is some text. }
+@end lilypond
+
@cindex font switching
The markup in the example demonstrates font switching commands. The
centered, so using @code{\mark \markup @{ \left-align .. @}} has no
effect.
+In addition, vertical placement is performed after creating the
+text markup object. If you wish to move an entire piece of markup,
+you need to use the #'padding property or create an "anchor" point
+inside the markup (generally with @code{\hspace #0}).
+
+@lilypond[quote,verbatim,fragment,relative=1]
+\fatText
+c'4^\markup{ \raise #5 "not raised" }
+\once \override TextScript #'padding = #3
+c'4^\markup{ raised }
+c'4^\markup{ \hspace #0 \raise #1.5 raised }
+@end lilypond
+
@seealso
@lilypond[fragment,verbatim]
{
- \override Staff.TimeSignature #'font-name = #"Times"
+ \override Staff.TimeSignature #'font-name = #"Charter"
\override Staff.TimeSignature #'font-size = #2
\time 3/4
c'1_\markup {
@cindex font size
@cindex font magnification
+
+It is also possible to change the default font family for the entire
+document. This is done by calling the @code{make-pango-font-tree} from
+within the @code{\paper} block. The function takes names for the font
+families to use for roman, sans serif and monospaced text. For
+example,
+
+@cindex font families, setting
+@cindex Pango
+
+
+@lilypond[verbatim]
+\paper {
+ myStaffSize = #20
+
+ #(define fonts
+ (make-pango-font-tree "Times New Roman"
+ "Nimbus Sans"
+ "Luxi Mono"
+ (/ myStaffSize 20)))
+}
+
+{
+ c'^\markup { roman: foo \sans bla \typewriter bar }
+}
+@end lilypond
+
+@c we don't do Helvetica / Courier, since GS incorrectly loads
+@c Apple TTF fonts
+
+
+
@seealso
-@c FIXME.
-Init files: @file{ly/@/declarations@/-init@/.ly} contains hints how new
-fonts may be added to LilyPond.
+Examples: @file{ly/@/font@/-family@/-override.ly}
@node New dynamic marks
@end lilypond
-@node Other text markup issues
-@subsection Other text markup issues
-
-To use a normal font within a title, you must define it manually
-
-@example
-#(def-markup-command (normal-font layout props arg) (markup?)
- "Switch to normal text font"
- (interpret-markup layout (cons '((font-series . 'medium) (font-shape . 'upright)) props) arg))
-
-\header@{
- title = \markup@{ ABCD \normal-font ABCD @}
-@}
-@end example
-
-
@node Preparing parts
@section Preparing parts
@subsection Multi measure rests
@cindex multi measure rests
+@cindex full measure rests
@cindex Rests, multi measure
+@cindex Rests, full measure
@cindex whole rests for a full measure
@cindex @code{R}
-Multi-measure rests are entered using `@code{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
+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
+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
@code{Score.skipBars}. If this is set to true, empty measures will not
be expanded, and the appropriate number is added automatically
R2.^\fermataMarkup
@end lilypond
+Warning! This text is created by @code{MultiMeasureRestText}, not
+@code{TextScript}.
+
+@lilypond[quote,raggedright,verbatim,fragment]
+\override TextScript #'padding = #5
+R1^"low"
+\override MultiMeasureRestText #'padding = #5
+R1^"high"
+@end lilypond
+
If you want to have text on the left end of a multi-measure rest,
attach the text to a zero-length skip note, i.e.,
To print other metronome markings, use these markup commands
@lilypond[quote,raggedright,verbatim,relative,fragment]
c4^\markup {
- "("
+ (
\smaller \general-align #Y #DOWN \note #"16." #1
- "="
- \smaller \general-align #Y #DOWN \note #"8" #1"
- ")" }
+ =
+ \smaller \general-align #Y #DOWN \note #"8" #1
+ ) }
@end lilypond
@noindent
@end lilypond
@noindent
-(The letter@tie{}`I' is skipped in accordance with engraving traditions.)
+The letter@tie{}`I' is skipped in accordance with engraving traditions.
+If you wish to include the letter `I', then use
+
+@example
+\set Score.markFormatter = #format-mark-alphabet
+@end example
The mark is incremented automatically if you use @code{\mark
\default}, but you can also use an integer argument to set the mark
c''1
@end lilypond
+If you wish to center the instrument names, you must center all of them
+
+@lilypond[quote,verbatim,raggedright]
+{ <<
+\new Staff {
+ \set Staff.instrument = \markup {
+ \center-align { "Clarinetti"
+ \line { "in B" \smaller \flat } } }
+ c''1
+}
+\new Staff {
+ \set Staff.instrument = \markup{ \center-align { Vibraphone }}
+ c''1
+}
+>>
+}
+@end lilypond
+
For longer instrument names, it may be useful to increase the
@code{indent} setting in the @code{\layout} block.
@refbugs
When you put a name on a grand staff or piano staff, the width of the
-brace is not taken into account. You must add extra spaces to the end of
-the name to avoid a collision.
+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))
+@end example
@node Instrument transpositions
when the original part takes over again, this should be marked with
the name of the original instrument.
- @c really? Are you sure about that last point? I'll check after 3.0 -gp
+@c really? Are you sure about that last point? I'll check after 3.0 -gp
@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 -hwn
- any other changes introduced by the cued part should also be
+Any other changes introduced by the cued part should also be
undone. For example, if the cued instrument plays in a different clef,
the original clef should be stated once again.
* Clusters::
* Special fermatas::
* Special noteheads::
+* Pitched trills::
* Feathered beams::
* Improvisation::
@end menu
@end lilypond
Each staff can also have its own time signature. This is done by
-moving the @internalsref{Timing_engraver} to the @internalsref{Staff}
+moving the @internalsref{Timing_translator} to the @internalsref{Staff}
context.
@example
\layout @{
- \context @{ \Score \remove "Timing_engraver" @}
- \context @{ \Staff \consists "Timing_engraver" @}
+ \context @{ \Score
+ \remove "Timing_translator"
+ \remove "Default_bar_line_engraver"
+ @}
+ \context @{
+ \Staff
+ \consists "Timing_translator"
+ \consists "Default_bar_line_engraver"
+ @}
+
@}
@end example
@lilypond[quote,raggedright]
\layout{
- \context{ \Score \remove "Timing_engraver" }
- \context{ \Staff \consists "Timing_engraver" }
+ \context{
+ \Score
+ \remove "Timing_translator"
+ \remove "Default_bar_line_engraver"
+ }
+ \context{ \Staff
+ \consists "Timing_translator"
+ \consists "Default_bar_line_engraver"
+ }
}
\relative c' <<
Program reference: @internalsref{NoteHead}.
+@node Pitched trills
+@subsection Pitched trills
+
+Trills that should be executed on an explicitly specified pitch can be
+typeset with the command @code{pitchedTrill},
+
+@lilypond[raggedright,verbatim,fragment]
+ \pitchedTrill c'4\startTrillSpan fis
+ f'\stopTrillSpan
+@end lilypond
+
+The first argument is the main note. The absolute pitch of the second
+is printed as a stemless note head in parentheses.
@node Feathered beams
@subsection Feathered beams
* Balloon help::
* Blank music sheet::
* Hidden notes::
-* Shaped note heads ::
+* Shape note heads ::
* Easy Notation note heads::
* Analysis brackets::
* Coloring objects::
@end lilypond
-@node Shaped note heads
-@subsection Shaped note heads
+@node Shape note heads
+@subsection Shape note heads
-In shaped note head notation, the shape of the note head corresponds
+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
popular in the 19th century American song books.
-Shaped note heads can be produced by setting @code{\aikenHeads} or
+Shape note heads can be produced by setting @code{\aikenHeads} or
@code{\sacredHarpHeads}, depending on the style desired.
@lilypond[verbatim,relative=1,fragment]
@findex \aikenHeads
@findex \sacredHarpHeads
-Shaped note heads are implemented through the @code{shapeNoteStyles}
+Shape note heads are implemented through the @code{shapeNoteStyles}
property. Its value is a vector of symbols. The k-th element indicates
the style to use for the k-th step of the scale. Arbitrary
combinations are possible, eg.,
Examples: @inputfileref{input/@/regression,note@/-group@/-bracket@/.ly}.
-
-@ignore
-
-I don't think we need this info.
-
-@n ode Stems
-@s ubsection 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}.
-
-@end ignore
-
-
@node Coloring objects
@subsection Coloring objects
In normal time signatures, automatic beams can start on any note but can
only end in a few positions within the measure: beams can end on a beat,
or at durations specified by the properties in
-@code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
-are defined in @file{scm/@/auto@/-beam@/.scm}.
+@code{autoBeamSettings}. The properties in @code{autoBeamSettings}
+consist of a list of rules for where beams can begin and end. The
+default @code{autoBeamSettings} rules are defined in
+@file{scm/@/auto@/-beam@/.scm}.
-The value of @code{autoBeamSettings} is changed with three functions,
+In order to add a rule to the list, use
@example
-#(override-auto-beam-setting
- '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
- [@var{context}])
-#(score-override-auto-beam-setting
- '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b})
-#(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m})
- @var{a} @var{b} [@var{context}])
+#(override-auto-beam-setting '(be p q n m) a b [context])
@end example
-Here, @var{be} is the symbol @code{begin} or @code{end}, and
-@var{context} is an optional context (default: @code{'Voice}). It
-determines whether the rule applies to begin or end-points. The
-quantity @var{p}/@var{q} refers to the length of the beamed notes (and
-`@code{* *}' designates notes of any length), @var{n}/@var{M} refers
-to a time signature (wildcards `@code{* *}' may be entered to
-designate all time signatures), @var{a}/@var{b} is a duration. By
-default, this command changes settings for the current voice. It is
-also possible to adjust settings at higher contexts, by adding a
-@var{context} argument. @code{score-override-auto-beam-setting} is
-equal to @code{override-auto-beam-setting} with the argument
-@var{context} set to @code{'Score}.
-
-For example, if automatic beams should end on the first quarter note, use
-the following
+
+@itemize @bullet
+
+@item @code{be} is either "begin" or "end".
+
+@item @code{b/q} is the duration of the note for which you want
+to add a rule. A beam is considered to have the duration of its
+shortest note. Set @code{p} and @code{q} to @code{'*'} to
+have this apply to any beam.
+
+@item @code{n/m} is the position in the time signature to which
+this rule should apply. Set @code{n} and @code{m} to @code{'*'}
+to have this apply in any time signature.
+
+@item @code{a/b} is the position in the bar at which the beam should end.
+
+@item @code{context} is optional, and it specifies the context at which
+the change should be made. The default is @code{'Voice}.
+@code{#(score-override-auto-beam-setting '(A B C D) E F)} is equivalent to
+@code{#(override-auto-beam-setting '(A B C D) E F 'Score)}.
+
+@end itemize
+
+For example, if automatic beams should always end on the first quarter
+node, use
+
@example
-#(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
+#(override-auto-beam-setting '(end * * * *) 1 4)
+@end example
+
+You can force the beam settings to only take effect on beams whose shortest
+note is a certain duration
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\time 2/4
+#(override-auto-beam-setting '(end 1 16 * *) 1 16)
+a16 a a a a a a a |
+a32 a a a a16 a a a a a |
+#(override-auto-beam-setting '(end 1 32 * *) 1 16)
+a32 a a a a16 a a a a a |
+@end lilypond
+
+You can force the beam settings to only take effect in certain time
+signatures
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\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
+
+You can also remove a previously set beam-ending rule by using
+
+@example
+#(revert-auto-beam-setting '(be p q n m) a b [context])
@end example
-Since the duration of a quarter note is 1/4 of a whole note, it is
-entered as @code{(ly:make-moment 1 4)}.
+@noindent
+be, p, q, n, m, a, b and context are the same as above. Note that the
+default rules are specified in @file{scm/@/auto@/-beam@/.scm},
+so you can revert rules that you did not explicitly create.
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\time 4/4
+a16 a a a a a a a a a a a a a a a
+#(revert-auto-beam-setting '(end 1 16 4 4) 1 4)
+a16 a a a a a a a a a a a a a a a
+@end lilypond
+
+The rule in a revert-auto-beam-setting statement must exactly match the
+original rule. That is, no wildcard expansion is taken into account.
+
+@lilypond[quote,fragment,raggedright,verbatim,relative=2]
+\time 1/4
+#(override-auto-beam-setting '(end 1 16 1 4) 1 8)
+a16 a a a
+#(revert-auto-beam-setting '(end 1 16 * *) 1 8) % this won't revert it!
+a a a a
+#(revert-auto-beam-setting '(end 1 16 1 4) 1 8) % this will
+a a a a
+@end lilypond
+
+
+
+@c TODO: old material -- not covered by above stuff, I think.
If automatic beams should end on every quarter in 5/4 time, specify
all endings
@example
3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
3/8, has passed within the measure).
-Rules can also be restricted to specific time signatures. A rule that
-should only be applied in @var{N}/@var{M} time signature is formed by
-replacing the second asterisks by @var{N} and @var{M}. For example, a
-rule for 6/8 time exclusively looks like
-@example
-#(override-auto-beam-setting '(begin * * 6 8) @dots{})
-@end example
-
-If a rule should be to applied only to certain types of beams, use the
-first pair of asterisks. Beams are classified according to the
-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}
@cindex lyrics
If beams are used to indicate melismata in songs, then automatic
-beaming should be switched off. This is done by setting
-@code{autoBeaming} to @code{#f}.
+beaming should be switched off with @code{\autoBeamOff}.
+
@refcommands