1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
11 @node Keyboard instruments
12 @section Keyboard instruments
14 @c@section Piano music
21 @subsection Piano sections
23 Piano staves are two normal staves coupled with a brace. The staves
24 are largely independent, but sometimes voices can cross between the
25 two staves. The same notation is also used for harps and other key
26 instruments. The @internalsref{PianoStaff} is especially built to
27 handle this cross-staffing behavior. In this section we discuss the
28 @internalsref{PianoStaff} and some other pianistic peculiarities.
31 * Automatic staff changes::
32 * Manual staff switches::
34 * Staff switch lines::
40 Dynamics are not centered, but workarounds do exist. See the
41 @q{piano centered dynamics} template in @rlearning{Piano templates}.
43 @cindex cross staff stem
44 @cindex stem, cross staff
45 @cindex distance between staves in piano music
48 @node Automatic staff changes
49 @subsubsection Automatic staff changes
50 @cindex Automatic staff changes
52 Voices can be made to switch automatically between the top and the bottom
53 staff. The syntax for this is
57 \autochange @dots{}@var{music}@dots{}
62 This will create two staves inside the current PianoStaff, called
63 @code{up} and @code{down}. The lower staff will be in bass clef by
66 A @code{\relative} section that is outside of @code{\autochange} has
67 no effect on the pitches of @var{music}, so, if necessary, put
68 @code{\relative} inside @code{\autochange} like
72 \autochange \relative @dots{} @dots{}
77 The autochanger switches on basis of the pitch (middle C is the turning
78 point), and it looks ahead skipping over rests to switch in
79 advance. Here is a practical example
81 @lilypond[quote,verbatim,ragged-right]
83 \autochange \relative c'
92 Notation Reference: @ref{Manual staff switches}.
94 Internals Reference: @internalsref{AutoChangeMusic}.
100 The staff switches may not end up in optimal places. For high
101 quality output, staff switches should be specified manually.
104 @code{\autochange} cannot be inside @code{\times}.
107 @node Manual staff switches
108 @subsubsection Manual staff switches
110 @cindex manual staff switches
111 @cindex staff switch, manual
113 Voices can be switched between staves manually, using the command
115 \change Staff = @var{staffname} @var{music}
119 The string @var{staffname} is the name of the staff. It switches the
120 current voice from its current staff to the Staff called
121 @var{staffname}. Typically @var{staffname} is @code{"up"} or
122 @code{"down"}. The @code{Staff} referred to must already exist, so
123 usually the setup for a score will start with a setup of the staves,
128 \skip 1 * 10 % @emph{keep staff alive}
130 \new Staff = "down" @{
131 \skip 1 * 10 % @emph{idem}
137 and the @code{Voice} is inserted afterwards
140 \context Staff = down
141 \new Voice @{ @dots{} \change Staff = up @dots{} @}
146 @subsubsection Pedals
149 Pianos have pedals that alter the way sound is produced. Generally, a
150 piano has three pedals, sustain, una corda, and sostenuto.
153 Piano pedal instruction can be expressed by attaching
154 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
155 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
158 @lilypond[quote,ragged-right,fragment,verbatim]
159 c'4\sustainDown c'4\sustainUp
162 What is printed can be modified by setting @code{pedal@var{X}Strings},
163 where @var{X} is one of the pedal types: @code{Sustain},
164 @code{Sostenuto} or @code{UnaCorda}. Refer to
165 @internalsref{SustainPedal} in the program reference for more
168 Pedals can also be indicated by a sequence of brackets, by setting the
169 @code{pedalSustainStyle} property to bracket objects
171 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
172 \set Staff.pedalSustainStyle = #'bracket
174 b\sustainUp\sustainDown
175 b g \sustainUp a \sustainDown \bar "|."
178 A third style of pedal notation is a mixture of text and brackets,
179 obtained by setting the @code{pedalSustainStyle} property to
182 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
183 \set Staff.pedalSustainStyle = #'mixed
185 b\sustainUp\sustainDown
186 b g \sustainUp a \sustainDown \bar "|."
189 The default @q{*Ped.} style for sustain and damper pedals corresponds to
190 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
193 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
194 c\sostenutoDown d e c, f g a\sostenutoUp
197 For fine-tuning the appearance of a pedal bracket, the properties
198 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
199 @code{PianoPedalBracket} objects (see
200 @internalsref{PianoPedalBracket} in the Internals Reference) can be
201 modified. For example, the bracket may be extended to the right edge
204 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
205 \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
206 c\sostenutoDown d e c, f g a\sostenutoUp
211 Notation Reference: @ref{Ties} (laissez vibrer).
213 @node Staff switch lines
214 @subsubsection Staff switch lines
218 @cindex staff switching
221 @funindex followVoice
223 Whenever a voice switches to another staff, a line connecting the notes
224 can be printed automatically. This is switched on by setting
225 @code{followVoice} to true
227 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
230 \set followVoice = ##t
235 \new Staff="two" { \clef bass \skip 1*2 }
241 Internals Reference: @internalsref{VoiceFollower}.
245 @funindex \showStaffSwitch
246 @code{\showStaffSwitch},
247 @funindex \hideStaffSwitch
248 @code{\hideStaffSwitch}.
251 @node Cross staff stems
252 @subsubsection Cross staff stems
254 Chords that cross staves may be produced by increasing the length
255 of the stem in the lower staff, so it reaches the stem in the upper
256 staff, or vice versa.
258 @lilypond[ragged-right,verbatim,quote]
260 \once \override Stem #'length = #10
261 \once \override Stem #'cross-staff = ##t
263 noFlag = \once \override Stem #'flag-style = #'no-flag
266 \stemDown \stemExtend