#'break-visibility = #begin-of-line-invisible
\override Score.RehearsalMark #'self-alignment-X = #right
- \set Staff.instrument = \markup{ \column{ Alto solo } }
+ \set Staff.instrumentName = \markup{ \column{ Alto solo } }
c2^\markup{ don't be \flat }
\override TextSpanner #'edge-text = #(cons (markup #:italic "rit" ) "")
b2\startTextSpan
In an orchestral score, instrument names are printed at the left side
of the staves.
-This can be achieved by setting @internalsref{Staff}.@code{instrument}
-and @internalsref{Staff}.@code{instr}. This will print a string before
-the start of the staff. For the first staff, @code{instrument} is
-used, for the following ones, @code{instr} is used.
+This can be achieved by setting @internalsref{Staff}.@code{instrumentName}
+and @internalsref{Staff}.@code{shortInstrumentName}, or
+@internalsref{PianoStaff}.@code{instrumentName} and
+@internalsref{PianoStaff}.@code{shortInstrumentName}. This will
+print text before
+the start of the staff. For the first staff, @code{instrumentName} is
+used, for the following ones, @code{shortInstrumentName} is used.
@lilypond[quote,verbatim,ragged-right,relative=1,fragment]
-\set Staff.instrument = "Ploink "
-\set Staff.instr = "Plk "
+\set Staff.instrumentName = "Ploink "
+\set Staff.shortInstrumentName = "Plk "
c1
\break
c''
names, for example
@lilypond[quote,fragment,verbatim,ragged-right]
-\set Staff.instrument = \markup {
+\set Staff.instrumentName = \markup {
\column { "Clarinetti"
\line { "in B" \smaller \flat } } }
c''1
@lilypond[quote,verbatim,ragged-right]
{ <<
\new Staff {
- \set Staff.instrument = \markup {
+ \set Staff.instrumentName = \markup {
\center-align { "Clarinetti"
\line { "in B" \smaller \flat } } }
c''1
}
\new Staff {
- \set Staff.instrument = \markup{ \center-align { Vibraphone }}
+ \set Staff.instrumentName = \markup{ \center-align { Vibraphone }}
c''1
}
>>
\new StaffGroup \relative
<<
\new Staff {
- \set Staff.instrument
- = \markup { \hcenter-in #10 "blabla" }
+ \set Staff.instrumentName = \markup { \hcenter-in #10 "blabla" }
c1 c1
}
\new Staff {
- \set Staff.instrument
- = \markup { \hcenter-in #10 "blo" }
+ \set Staff.instrumentName = \markup { \hcenter-in #10 "blo" }
c1 c1
}
>>
@end lilypond
+To add instrument names to other contexts (such as @code{GrandStaff},
+@code{ChoirStaff}, or @code{StaffGroup}), the engraver must
+be added to that context.
-@seealso
+@example
+\layout@{
+ \context @{\GrandStaff \consists "Instrument_name_engraver"@}
+@}
+@end example
-Program reference: @internalsref{InstrumentName}.
+@noindent
+More information about adding and removing engravers can
+be found in @ref{Modifying context plug-ins}.
-@refbugs
-When you put a name on a grand staff or piano staff, the width of the
-brace is not taken into account. The following property setting can be
-used to move the instrument names to the left, in such situations.
+@seealso
+
+Program reference: @internalsref{InstrumentName}.
-@example
-\override Score.InstrumentName #'padding = #2.0
-@end example
@node Instrument transpositions
@node Feathered beams
@subsection Feathered beams
-Feathered beams are not supported natively, but they can be faked by
-forcing two beams to overlap. Here is an example,
+Feathered beams are printed by setting the @code{grow-direction}
+property of a @code{Beam}. The @code{\featherDurations} function
+can be used to adjust note durations.
-@c don't change relative setting witout changing positions!
@lilypond[ragged-right,relative=1,fragment,verbatim,quote]
-\new Staff <<
- \new Voice
- {
- \stemUp
- \once \override Voice.Beam #'positions = #'(0 . 0.5)
- c8[ c c c c ]
- }
- \new Voice {
- \stemUp
- \once \override Voice.Beam #'positions = #'(0 . -0.5)
- c[ c c c c]
- }
->>
+\featherDurations #(ly:make-moment 5 4)
+{
+ \override Beam #'grow-direction = #LEFT
+ c16[ c c c c c c]
+}
@end lilypond
+@refbugs
+
+The @code{\featherDuration} command only works with very short
+music snippets.
@node Improvisation
@subsection Improvisation
The following example demonstrates its use.
@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
-\applyOutput #'Voice
- #(add-balloon-text 'NoteHead "heads, or tails?"
- '(1 . -3))
- c8
+\new Voice \with { \consists "Balloon_engraver" }
+{
+ \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" }
+ <c-\balloonText #'(-2 . -2) \markup { Hello } >8
+}
@end lilypond
@noindent
-The function @code{add-balloon-text} takes the name of a grob, the
-label to print, and the position where to put the label relative to
-the object. In the above example, the text ``heads or tails?'' ends
-3 spaces below and 1 space to the right of the marked head.
+There are two music functions, @code{balloonText} and
+@code{balloonGrobText}. The latter takes the name of the grob to
+adorn, while the former may be used as an articulation on a note.
+The other arguments are the offset and the text of the label.
@cindex balloon
@cindex notation, explaining
@lilypond[quote,ragged-right,verbatim]
{
\override Staff.StaffSymbol #'color = #(x11-color 'SlateBlue2)
- \set Staff.instrument = \markup {
+ \set Staff.instrumentName = \markup {
\with-color #(x11-color 'navy) "Clarinet"
}
\time 2/4