note head:
@cindex color property, example
+@cindex NoteHead, example of overriding
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
c d
of the note head to the default value for the final two notes:
@cindex color property, example
+@cindex NoteHead, example of overriding
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
c d
change the color of a single note like this:
@cindex color property, example
+@cindex NoteHead, example of overriding
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
c d
@code{\once \override} would do:
@cindex font-size property, example
+@cindex NoteHead, example of overriding
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
<c e g>4
a chord would be changed in this way:
@cindex font-size property, example
+@cindex @code{\tweak}, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
<c e g>4
a series of articulations, as shown here:
@cindex color property, example
-@cindex tweak example
+@cindex @code{\tweak}, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
a ^Black
notes and the second one specifies that the tuplet number is to be
printed in red on the first short tuplet bracket.
-@cindex tweak example
+@cindex @code{\tweak}, example
@cindex direction property, example
@cindex color property, example
@code{\override} commands:
@cindex text property, example
-@cindex tuplet-number example
+@cindex tuplet-number function, example
@cindex transparent property, example
+@cindex TupletNumber, example of overriding
@c NOTE Tuplet brackets collide if notes are high on staff
@c See issue 509
@cindex override example
@cindex Internals Reference, example of using
-@cindex addlyrics example
+@cindex @code{\addlyrics} example
Let's use a concrete example with a simple fragment of real
music:
The man who feels love's sweet e -- mo -- tion
}
}
-@end lilypond
+@end lilypond
Suppose now that we decide we would like the slurs to be a
little heavier. Is this possible? The slur is certainly a
answer is, @q{Within the music, before the first slur and
close to it.} Let's do that:
-@cindex Slur example
+@cindex Slur example of overriding
@cindex thickness property, example
@lilypond[quote,verbatim,relative=2]
is simply discarded. So the command with @code{\once} must be
repositioned as follows:
-@cindex Slur example
+@cindex Slur, example of overriding
@cindex thickness property, example
@lilypond[quote,verbatim,relative=2]
@code{\once} placed immediately before each of the notes where
the slurs begin:
-@cindex Slur example
+@cindex Slur, example of overriding
@cindex thickness property, example
@lilypond[quote,verbatim,relative=2]
command to return the @code{thickness} property to its default value
after the second slur:
-@cindex Slur example
+@cindex Slur, example of overriding
@cindex thickness property, example
@lilypond[quote,verbatim,relative=2]
lyrics which it should affect, like this:
@cindex font-shape property, example
-@cindex italic example
-@cindex LyricText example
+@cindex italic, example
+@cindex LyricText, example of overriding
+@cindex @code{\addlyrics}, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
{
setting its value to @code{#f}. Let's try it, as before, omitting
the implied Context, @code{Voice}:
-@cindex BarLine example
+@cindex BarLine, example of overriding
@cindex stencil property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
produced, and nothing is logged in the log file. Let's try correcting
it by adding the correct context:
-@cindex BarLine example
+@cindex BarLine, example of overriding
@cindex stencil property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
required, as always, to precede the value itself in the
@code{\override} command.
-@cindex BarLine example
+@cindex BarLine, example of overriding
@cindex break-visibility property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
@code{grob-interface}. So the command to make the time signature
transparent is:
-@cindex TimeSignature example of overriding
+@cindex TimeSignature, example of overriding
@cindex transparent property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
how to introduce a new temporary staff, as in an @rglos{ossia}.
@cindex alignAboveContext property, example
-@cindex @code{\with} example
+@cindex @code{\with}, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
\new Staff ="main" {
we simply set the stencil of each to @code{#f}, as follows:
@cindex alignAboveContext property, example
-@cindex @code{\with} example
+@cindex @code{\with}, example
@cindex stencil property, example
@cindex Clef, example of overriding
@cindex TimeSignature, example of overriding
So we could replace the example above with
@cindex alignAboveContext property, example
-@cindex @code{\with} example
+@cindex @code{\with}, example
@cindex Clef, example of overriding
@cindex TimeSignature, example of overriding
Let's try it in our ossia example:
@cindex alignAboveContext property, example
-@cindex @code{\with} example
+@cindex @code{\with}, example
@cindex Clef, example of overriding
@cindex TimeSignature, example of overriding
+@cindex fontSize property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
\new Staff ="main" {
objects in proportion. It is used like this:
@cindex alignAboveContext property, example
-@cindex @code{\with} example
+@cindex @code{\with}, example
@cindex Clef, example of overriding
@cindex TimeSignature, example of overriding
-@cindex fontsize property, example
-@cindex StaffSymbol, example
-@cindex magstep, example of using
+@cindex fontSize property, example
+@cindex StaffSymbol, example of overriding
+@cindex magstep function, example of using
+@cindex staff-space property, example
+@cindex stencil property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
\new Staff ="main" {
which the objects should be placed, as follows.
First, LilyPond places all the within-staff objects.
-Then it sorts the outside-staff objects according to their
+Then it sorts the outside-staff objects according to their
@code{outside-staff-priority}. The outside-staff objects are
taken one by one, beginning with the object with the lowest
@code{outside-staff-priority}, and placed so that they do not
-collide with any objects that have already been placed. That is,
-if two outside-staff grobs are competing for the same space, the
+collide with any objects that have already been placed. That is,
+if two outside-staff grobs are competing for the same space, the
one with the lower @code{outside-staff-priority} will be placed
closer to the staff. If two objects have the same
@code{outside-staff-priority} the one encountered first will be
placed closer to the staff.
-In the following example all the markup texts have the same
+In the following example all the markup texts have the same
priority (since it is not explicitly set). Note that @q{Text3}
is automatically positioned close to the staff again, nestling
under @q{Text2}.
+@cindex markup example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
c2^"Text1"
c^"Text2"
all stems forced up, and finally four notes reverted back to the
default behavior.
+@cindex Stem, example of overriding
+@cindex direction property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
a4 g c a
\override Stem #'direction = #DOWN
behaviour, and the following two bars shows the effect of
specifying @code{DOWN} and @code{UP}:
+@cindex Fingering, example of overriding
+@cindex direction property, example
+
@lilypond[quote,verbatim,relative=2]
c-5 a-3 f-1 c'-5
\override Fingering #'direction = #DOWN
the fingering number is usually preferable. Here is the previous
example using this method:
+@cindex fingering example
+
@lilypond[quote,verbatim,relative=2]
c-5 a-3 f-1 c'-5
c_5 a_3 f_1 c'_5
the fingering is automatically placed both above and below the
notes of a chord, as shown:
+@cindex fingering example
+
@lilypond[quote,verbatim,relative=2]
<c-5 g-3>
<c-5 g-3 e-2>
but this may be overriden to manually force all or any of the
individual fingering numbers above or below:
+@cindex fingering example
+
@lilypond[quote,verbatim,relative=2]
<c-5 g-3 e-2 c-1>
<c^5 g_3 e_2 c_1>
Here are a few examples:
+@cindex fingering example
+@cindex @code{\set}, example of using
+@cindex fingeringOrientations property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
\set fingeringOrientations = #'(left)
<f-2>
@funindex \stopTextSpan
@funindex stopTextSpan
+@cindex TextSpanner, example of overriding
+@cindex bound-details property, example
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
% Set details for later Text Spanner
@code{TextSpanner}, remembering that @code{OttavaBracket} is created
in the @code{Staff} context:
+@cindex TextSpanner, example of overriding
+@cindex bound-details property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
% Set details for later Text Spanner
\override TextSpanner #'bound-details #'left #'text
in the IR or in the tables above, and increase the priority of
@qq{Text3} to a higher value:
+@cindex TextScript, example of overriding
+@cindex outside-staff-priority property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
c2^"Text1"
c^"Text2"
be turned off by setting the priority to @code{#f}. Here's an
example to show how markup text interacts with such notes.
+@cindex TextScript, example of overriding
+@cindex outside-staff-priority property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
% This markup is short enough to fit without collision
c2^"Tex"
@noindent
Let's see if this works in our previous example:
+@cindex DynamicText, example of overriding
+@cindex extra-spacing-width property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
\dynamicUp
\override DynamicText #'extra-spacing-width = #'(0 . 0)
lines, so moving the left edge half a unit to the left and the
right edge half a unit to the right should do it:
+@cindex DynamicText, example of overriding
+@cindex extra-spacing-width property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
\dynamicUp
% Extend width by 1 staff space
(or decrease) the distance between symbols that are printed
above or below notes.
+@cindex Script, example of overriding
+@cindex padding property, example
+
@lilypond[quote,fragment,relative=1,verbatim]
c2\fermata
\override Script #'padding = #3
b2\fermata
@end lilypond
+@cindex MetronomeMark, example of overriding
+@cindex padding property, example
+
@lilypond[quote,fragment,relative=1,verbatim]
% This will not work, see below:
\override MetronomeMark #'padding = #3
with a markup containing the natural and flat symbols in the
order we would like, like this:
+@cindex Accidental, example of overriding
+@cindex text property, example
+@cindex stencil property, example
+@cindex AccidentalPlacement, example of overriding
+@cindex right-padding property, example
+
@lilypond[quote,ragged-right,verbatim]
naturalplusflat = \markup { \natural \flat }
\relative c'' {
spanners. So this is the way to align the dynamic marks in the
example taken from the previous section:
+@cindex DynamicText, example of overriding
+@cindex extra-spacing-width property, example
+@cindex DynamicLineSpanner, example of overriding
+@cindex staff-padding property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=2]
\dynamicUp
% Extend width by 1 unit
of a string fingering object with a note's stem by aligning the
right edge with the reference point of the parent note:
+@cindex StringNumber, example of overriding
+@cindex self-alignment-X property, example
+
@lilypond[quote,fragment,ragged-right,verbatim,relative=3]
\voiceOne
< a \2 >
@code{staff-position} is set to -4 for MultiMeasureRest, so we need to
move it, say, four half-staff spaces down to @code{-8}.
+@cindex MultiMeasureRest, example of overriding
+@cindex staff-position property, example
+
@lilypond[quote,verbatim,fragment,ragged-right, relative=1]
<<
{c c c c}
In the following example, the second fingering is moved a little to
the left, and 1.8 staff space downwards:
+@cindex Fingering, example of overriding
+@cindex extra-offset property, example
+
@lilypond[quote,fragment,relative=1,verbatim]
\stemUp
f-5
slur down a little using the @code{positions} property. This
also resolves the rather nasty shape.
+@cindex PhrasingSlur, example of overriding
+@cindex positions property, example
+
@lilypond[quote,verbatim,fragment,ragged-right,relative=1]
r4
\once \override PhrasingSlur #'positions = #'(-4 . -3)
up from their position at 2 staff-spaces above the center line to,
say, 3:
+@cindex Beam, example of overriding
+@cindex positions property, example
+
@lilypond[quote,verbatim,fragment,ragged-right]
{
\clef "bass"
Here's the final result:
+@cindex NoteColumn, example of overriding
+@cindex force-hshift property, example
+
@lilypond[quote,verbatim,fragment,ragged-right]
\new Staff \relative c'' {
\key aes \major
dynamics, fingering and pedalling.
@c The following should appear as music without code
+@c This example should not be indexed
@lilypond[quote,ragged-right]
rhMusic = \relative c'' {
r2
using @code{\shiftOnn} to avoid it interfering with the two D's.
Applying these changes gives:
+@cindex Tie, example of overriding
+@cindex staff-position property, example
+
@lilypond[quote,verbatim,ragged-right]
rhMusic = \relative c'' {
r2 c4.\( g8 |
earlier tweaks: we make the stem transparent, and move the C with
the @code{force-hshift} property. Here's the final result:
+@cindex NoteColumn, example of overriding
+@cindex force-hshift property, example
+@cindex Stem, example of overriding
+@cindex transparent property, example
+
@lilypond[quote,verbatim,ragged-right]
rhMusic = \relative c'' {
r2
and blanking the first up-stem in that voice, the tie appears to
cross voices:
+@cindex Stem, example of overriding
+@cindex transparent propery, example
+
@lilypond[quote,fragment,relative=2,verbatim]
<<
{
its @code{stencil} property to @code{#f} would be the best way.
We show here the effect of the two methods:
+@cindex MetronomeMark, example of overriding
+@cindex transparent property, example
+
@lilypond[quote,verbatim,ragged-right]
\score {
\relative c'' {
}
@end lilypond
+@cindex MetronomeMark, example of overriding
+@cindex stencil property, example
+
@lilypond[quote,verbatim,ragged-right]
\score {
\relative c'' {
perhaps choose shorter names for the variables to make them
quicker to type:
+@cindex LyricText, example of overriding
+@cindex font-shape property, example
+@cindex font-series property, example
+
@lilypond[quote,verbatim]
emphasize = {
\override Lyrics . LyricText #'font-shape = #'italic
example we color the note head in accordance with its position on
the staff.
+@cindex x11-color function, example of using
+@cindex NoteHead, example of overriding
+@cindex color property, setting to Scheme procedure
+
@lilypond[quote,verbatim,ragged-right]
#(define (color-notehead grob)
"Color the notehead according to its position on the staff."
\relative c' {
% Arrange to obtain color from color-notehead procedure
\override NoteHead #'color = #color-notehead
- c2 c' |
- b4 g8 a b4 c |
- c,2 a' |
+ c2 c' |
+ b4 g8 a b4 c |
+ c,2 a' |
g1 |
}
\addlyrics {