Next: Rotating objects, Previous: Controlling visibility of objects, Up: Common properties
Some performance indications, e.g., rallentando and accelerando and trills are written as text and are extended over many measures with lines, sometimes dotted or wavy.
These all use the same routines as the glissando for drawing the
texts and the lines, and tuning their behavior is therefore also
done in the same way. It is done with a spanner, and the routine
responsible for drawing the spanners is
ly:line-interface::print
. This routine determines the
exact location of the two span points and draws a line in
between, in the style requested.
Here is an example of the different line styles available, and how to tune them.
d2 \glissando d'2 \once \override Glissando #'style = #'dashed-line d,2 \glissando d'2 \override Glissando #'style = #'dotted-line d,2 \glissando d'2 \override Glissando #'style = #'zigzag d,2 \glissando d'2 \override Glissando #'style = #'trill d,2 \glissando d'2
The information that determines the end-points is computed on-the-fly for every graphic object, but it is possible to override these.
e2 \glissando f \once \override Glissando #'bound-details #'right #'Y = #-2 e2 \glissando f
The Glissando
object, like any other using the
ly:line-interface::print
routine, carries a nested
association list. In the above statement, the value for Y
is set to -2
for the association list corresponding to the
right end point. Of course, it is also possible to adjust the
left side with left
instead of right
.
If Y
is not set, the value is computed from the vertical
position of right attachment point of the spanner.
In case of a line break, the values for the span-points are
extended with contents of the left-broken
and
right-broken
sublists, for example
\override Glissando #'breakable = ##T \override Glissando #'bound-details #'right-broken #'Y = #-3 c1 \glissando \break f1
The following properties can be used for the
Y
For horizontal spanners, such as text spanner and trill spanners,
it is hardcoded to 0.
attach-dir
-1
(or
LEFT
) makes the line start/end at the left side of the note
head it is attached to.
X
stencil
text
.
text
\override TextSpanner #'bound-details #'left #'text = \markup { \small \bold Slower } c2\startTextSpan b c a\stopTextSpan
stencil-align-dir-y
stencil-offset
X
and Y
sub properties.
Setting either stencil-align-dir-y
or stencil-offset
will move the symbol at the edge relative to the end point of the
line
\override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #DOWN \override TextSpanner #'bound-details #'right #'stencil-align-dir-y = #UP \override TextSpanner #'bound-details #'left #'text = #"gggg" \override TextSpanner #'bound-details #'right #'text = #"hhhh" c4^\startTextSpan c c c \stopTextSpan
arrow
#t
produce an arrowhead at the
end of the line.
padding
The music function \endSpanners terminates spanners and hairpins after exactly one note.
\endSpanners c2 \startTextSpan c2 c2 \< c2
When using \endSpanners it is not necessary to close \startTextSpan with \stopTextSpan, nor is it necessary to close hairpins with \!.
Internals Reference: TextSpanner,
Glissando, VoiceFollower,
TrillSpanner,
line-spanner-interface.
Next: Rotating objects, Previous: Controlling visibility of objects, Up: Common properties
This page is for LilyPond-2.11.57 (development-branch).
Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Your suggestions for the documentation are welcome.
Other languages: espaƱol.