[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Writing parts ] | [ Up : Writing parts ] | [ Quoting other voices > ] |
Instrument names
Instrument names can be printed on the left side of staves in the
Staff
, PianoStaff
, StaffGroup
, GrandStaff
and ChoirStaff
contexts. The value of
instrumentName
is used for the first staff, and the value
of shortInstrumentName
is used for all succeeding staves.
\new Staff \with { instrumentName = "Violin " shortInstrumentName = "Vln. " } \relative { c'4.. g'16 c4.. g'16 \break | c1 | }
\markup
can be used to create more complex instrument names:
\new Staff \with { instrumentName = \markup { \column { "Clarinetti" \line { "in B" \smaller \flat } } } } \relative { c''4 c,16 d e f g2 }
When two or more staff contexts are grouped together, the instrument
names and short instrument names are centered by default. To center
multi-line instrument names, \center-column
must be used:
<< \new Staff \with { instrumentName = "Flute" } \relative { f''2 g4 f } \new Staff \with { instrumentName = \markup { \center-column { "Clarinet" \line { "in B" \smaller \flat } } } } \relative { c''4 b c2 } >>
However, if the instrument names are longer, the instrument names in a
staff group may not be centered unless the indent
and
short-indent
settings are increased. For details about these
settings, see \paper
variables for shifts and indents.
<< \new Staff \with { instrumentName = "Alto Flute in G" shortInstrumentName = "Flt." } \relative { f''2 g4 f \break g4 f g2 } \new Staff \with { instrumentName = "Clarinet" shortInstrumentName = "Clar." } \relative { c''4 b c2 \break c2 b4 c } >> \layout { indent = 3.0\cm short-indent = 1.5\cm }
To add instrument names to other contexts (such as ChordNames
or
FiguredBass
), Instrument_name_engraver
must be added to
that context. For details, see Modifying context plug-ins.
The shortInstrumentName
may be changed in the middle of a piece,
along with other settings as needed for the new instrument.
However, only the first instance of instrumentName
will be
printed and subsequent changes will be ignored:
prepPiccolo = <>^\markup \italic { muta in Piccolo } prepFlute = <>^\markup \italic { muta in Flauto } setPiccolo = { <>^\markup \bold { Piccolo } \transposition c'' } setFlute = { <>^\markup \bold { Flute } \transposition c' } \new Staff \with { instrumentName = "Flute" shortInstrumentName = "Flt." } \relative { g'1 g g g \break g1 g \prepPiccolo R R \break \set Staff.instrumentName = "Piccolo" \set Staff.shortInstrumentName = "Picc." \setPiccolo g1 g g g \break g1 g \prepFlute R R \break \set Staff.instrumentName = "Flute" \set Staff.shortInstrumentName = "Flt." \setFlute g1 g g g }
See also
Notation Reference:
\paper
variables for shifts and indents,
Modifying context plug-ins.
Snippets: Staff notation.
Internals Reference: InstrumentName, PianoStaff, Staff.
[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Writing parts ] | [ Up : Writing parts ] | [ Quoting other voices > ] |