@code{thickness} or @code{font-shape}, others are used as values that
can be given to properties, like @code{italic}. Note the distinction
from arbitrary text strings, which would appear as @code{"a text
-string"}; for more details about symbols and strings, see @ref{Scheme
-tutorial}.
+string"}; for more details about symbols and strings, see
+@rextend{Scheme tutorial}.
So we see that the @code{\override} command needed to print the lyrics
in italics is:
@seealso
-Learning Manual: @ref{Scheme tutorial}.
+Extending: @rextend{Scheme tutorial}.
@node Types of properties
@seealso
-Learning Manual: @ref{Scheme tutorial}.
+Extending: @rextend{Scheme tutorial}.
@node Appearance of objects
@code{grob-interface} and so is a property of all layout objects.
By default it is set to @code{#f} for all within-staff objects,
and to a numerical value appropriate to each outside-staff object
-when the object is created. The following table shows
-the default numerical values for some of the commonest
-outside-staff objects which are, by default, placed in the
-@code{Staff} or @code{Voice} contexts.
+when the object is created. The following table shows the default
+numerical values for some of the commonest outside-staff objects
+which are, by default, placed in the @code{Staff} or @code{Voice}
+contexts.
+
+@cindex spanners
+
+Note the unusual names for some of the objects: spanner objects
+are automatically created to control the vertical positioning of
+grobs which (might) start and end at different musical moments, so
+changing the @code{outside-staff-priority} of the underlying grob
+will have no effect. For example, changing
+@code{outside-staff-priority} of the @code{Hairpin} object will
+have no effect on the vertical positioning of hairpins -- you must
+change @code{outside-staff-priority} of the associated
+@code{DynamicLineSpanner} object instead. This override must be
+placed at the start of the spanner, which might include several
+linked hairpins and dynamics.
@multitable @columnfractions .3 .3 .3
@headitem Layout Object
% Start Ottava Bracket
\ottava #1
c' \startTextSpan
-% Add Dynamic Text
-c\pp
-% Add Dynamic Line Spanner
-c\<
+% Add Dynamic Text and hairpin
+c\pp\<
+c
% Add Text Script
c^Text
c c
-% Add Dynamic Text
+% Add Dynamic Text and terminate hairpin
c\ff c \stopTextSpan
% Stop Ottava Bracket
\ottava #0
The @code{right-padding} property affects the spacing between the
accidental and the note to which it applies. It is not often
-required, but the following example shows one situation where it
-is needed. Suppose we wish to show a chord containing both
-a B-natural and a B-flat. To avoid ambiguity we would like to
-precede the notes with both a natural and a flat sign. Here
-are a few attempts to do this:
-
-@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
-<b bes>
-<b! bes>
-<b? bes>
-@end lilypond
-
-None work, with the second two showing bad collisions between
-the two signs.
-
-One way of achieving this is to override the accidental stencil
-with a markup containing the natural and flat symbols in the
-order we would like, like this:
+required, but the default spacing may be wrong for certain special
+accidental glyphs or combination of glyphs used in some microtonal
+music. These have to be entered by overriding the accidental
+stencil with a markup containing the desired symbol(s), like this:
@cindex Accidental, example of overriding
@cindex text property, example
@cindex right-padding property, example
@lilypond[quote,ragged-right,verbatim]
-naturalplusflat = \markup { \natural \flat }
+sesquisharp = \markup { \sesquisharp }
\relative c'' {
+ c
+ % This prints a sesquisharp but the spacing is too small
\once \override Accidental
#'stencil = #ly:text-interface::print
- \once \override Accidental #'text = #naturalplusflat
- \once \override Score.AccidentalPlacement #'right-padding = #1.5
- <b bes>
+ \once \override Accidental #'text = #sesquisharp
+ cis c
+ % This improves the spacing
+ \once \override Score.AccidentalPlacement #'right-padding = #0.6
+ \once \override Accidental
+ #'stencil = #ly:text-interface::print
+ \once \override Accidental #'text = #sesquisharp
+ cis
}
@end lilypond
This necessarily uses an override for the accidental stencil which
will not be covered until later. The stencil type must be a
procedure, here changed to print the contents of the @code{text}
-property of @code{Accidental}, which itself is set to be a natural
-sign followed by a flat sign. These are then moved further away
-from the note head by overriding @code{right-padding}.
+property of @code{Accidental}, which itself is set to be a
+sesquisharp sign. This sign is then moved further away from the
+note head by overriding @code{right-padding}.
@noindent
@c The following should appear as music without code
@c This example should not be indexed
-@lilypond[quote,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2
c4.\( g8 |
\mergeDifferentlyDottedOn
bes2.^\markup {\bold "Moderato"} r8
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
% Reposition the c2 to the right of the merged note
{c,8~ \once \override NoteColumn #'force-hshift = #1.0
structure in a score block, and see what LilyPond produces by
default:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4. g8 |
bes1~ |
}
@end lilypond
-All the notes are right, but the appearance is far from satisfactory.
-The tie clashes with the change in time signature, the beaming in the
-third bar is wrong, the notes are not merged together, and several
-notation elements are missing. Let's first deal with the easier
-things. We can correct the beaming by inserting a beam manually, and
-we can easily add the left hand slur and the right hand phrasing slur,
+All the notes are right, but the appearance is far from
+satisfactory. The tie clashes with the change in time signature,
+the notes are not merged together, and several notation elements
+are missing. Let's first deal with the easier things. We can
+easily add the left hand slur and the right hand phrasing slur,
since these were all covered in the Tutorial. Doing this gives:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
bes1~ |
bes2. r8
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
{c,8~ c2 | }
\\
This completes bar two, giving:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
\once \override Tie #'staff-position = #3.5
bes2. r8
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
{c,8~ c2 | }
\\
On to bar three and the start of the Moderato section. The tutorial
showed how to add embolded text with the @code{\markup} command, so
adding @q{Moderato} in bold is easy. But how do we merge notes in
-different voices together? This is where we need to turn to the
-Notation Reference for help. A search for @qq{merge} in the Notation
-Reference index quickly leads us to the commands for merging
+different voices together? This is where we need to turn again to
+the Notation Reference for help. A search for @qq{merge} in the
+Notation Reference index quickly leads us to the commands for merging
differently headed and differently dotted notes in @ruser{Collision
resolution}. In our example we need to merge both types of note for
the duration of the polyphonic section in bar 3, so using the
@noindent
to the end, giving:
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
\once \override Tie #'staff-position = #3.5
\mergeDifferentlyDottedOn
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
{c,8~ c2 | }
\\
@cindex Tie, example of overriding
@cindex staff-position property, example
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2 c4.\( g8 |
\once \override Tie #'staff-position = #3.5
\mergeDifferentlyDottedOn
% Start polyphonic section of four voices
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
% Move the c2 out of the main note column so the merge will work
{c,8~ \shiftOnn c2 | }
@cindex Stem, example of overriding
@cindex transparent property, example
-@lilypond[quote,verbatim,ragged-right]
+@c line-width ensures no break
+@lilypond[quote,verbatim,ragged-right,line-width=5.5\in]
rhMusic = \relative c'' {
r2
c4.\( g8 |
\mergeDifferentlyHeadedOn
\mergeDifferentlyDottedOn
<<
- {c,8[ d fis bes a] | }
+ {c,8 d fis bes a | }
\\
% Reposition the c2 to the right of the merged note
{c,8~ \once \override NoteColumn #'force-hshift = #1.0
is currently outside the scope of this manual, as a knowledge of
the Scheme language is required. Users should be warned that
a substantial amount of technical knowledge or time is required
-to understand Scheme and these files (see @ref{Scheme tutorial}).
+to understand Scheme and these files (see @rextend{Scheme tutorial}).
If you have this knowledge, the Scheme files which may be of
interest are:
the Scheme programming language can be incorporated directly in
the internal operation of LilyPond. Of course, at least a basic
knowledge of programming in Scheme is required to do this, and an
-introduction is provided in the @ref{Scheme tutorial}.
+introduction is provided in the @rextend{Scheme tutorial}.
As an illustration of one of the many possibilities, instead of
setting a property to a constant it can be set to a Scheme
@end lilypond
Further examples showing the use of these programmable interfaces
-can be found in @ref{Tweaking with Scheme}.
+can be found in @rextend{Tweaking with Scheme}.