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.
19 @subsection Piano sections
21 Piano staves are two normal staves coupled with a brace. The staves
22 are largely independent, but sometimes voices can cross between the
23 two staves. The same notation is also used for harps and other key
24 instruments. The @internalsref{PianoStaff} is especially built to
25 handle this cross-staffing behavior. In this section we discuss the
26 @internalsref{PianoStaff} and some other pianistic peculiarities.
29 * Automatic staff changes::
30 * Manual staff switches::
32 * Staff switch lines::
38 Dynamics are not centered, but workarounds do exist. See the
39 @q{piano centered dynamics} template in @rlearning{Piano templates}.
41 @cindex cross staff stem
42 @cindex stem, cross staff
43 @cindex distance between staves in piano music
46 @node Automatic staff changes
47 @subsubsection Automatic staff changes
48 @cindex Automatic staff changes
50 Voices can be made to switch automatically between the top and the bottom
51 staff. The syntax for this is
55 \autochange @dots{}@var{music}@dots{}
60 This will create two staves inside the current PianoStaff, called
61 @code{up} and @code{down}. The lower staff will be in bass clef by
64 A @code{\relative} section that is outside of @code{\autochange} has
65 no effect on the pitches of @var{music}, so, if necessary, put
66 @code{\relative} inside @code{\autochange} like
70 \autochange \relative @dots{} @dots{}
75 The autochanger switches on basis of the pitch (middle C is the turning
76 point), and it looks ahead skipping over rests to switch in
77 advance. Here is a practical example
79 @lilypond[quote,verbatim,ragged-right]
81 \autochange \relative c'
90 Notation Reference: @ref{Manual staff switches}.
92 Internals Reference: @internalsref{AutoChangeMusic}.
98 The staff switches may not end up in optimal places. For high
99 quality output, staff switches should be specified manually.
102 @code{\autochange} cannot be inside @code{\times}.
105 @node Manual staff switches
106 @subsubsection Manual staff switches
108 @cindex manual staff switches
109 @cindex staff switch, manual
111 Voices can be switched between staves manually, using the command
113 \change Staff = @var{staffname} @var{music}
117 The string @var{staffname} is the name of the staff. It switches the
118 current voice from its current staff to the Staff called
119 @var{staffname}. Typically @var{staffname} is @code{"up"} or
120 @code{"down"}. The @code{Staff} referred to must already exist, so
121 usually the setup for a score will start with a setup of the staves,
126 \skip 1 * 10 % @emph{keep staff alive}
128 \new Staff = "down" @{
129 \skip 1 * 10 % @emph{idem}
135 and the @code{Voice} is inserted afterwards
138 \context Staff = down
139 \new Voice @{ @dots{} \change Staff = up @dots{} @}
144 @subsubsection Pedals
147 Pianos have pedals that alter the way sound is produced. Generally, a
148 piano has three pedals, sustain, una corda, and sostenuto.
151 Piano pedal instruction can be expressed by attaching
152 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
153 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
156 @lilypond[quote,ragged-right,fragment,verbatim]
157 c'4\sustainDown c'4\sustainUp
160 What is printed can be modified by setting @code{pedal@var{X}Strings},
161 where @var{X} is one of the pedal types: @code{Sustain},
162 @code{Sostenuto} or @code{UnaCorda}. Refer to
163 @internalsref{SustainPedal} in the program reference for more
166 Pedals can also be indicated by a sequence of brackets, by setting the
167 @code{pedalSustainStyle} property to bracket objects
169 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
170 \set Staff.pedalSustainStyle = #'bracket
172 b\sustainUp\sustainDown
173 b g \sustainUp a \sustainDown \bar "|."
176 A third style of pedal notation is a mixture of text and brackets,
177 obtained by setting the @code{pedalSustainStyle} property to
180 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
181 \set Staff.pedalSustainStyle = #'mixed
183 b\sustainUp\sustainDown
184 b g \sustainUp a \sustainDown \bar "|."
187 The default @q{*Ped.} style for sustain and damper pedals corresponds to
188 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
191 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
192 c\sostenutoDown d e c, f g a\sostenutoUp
195 For fine-tuning the appearance of a pedal bracket, the properties
196 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
197 @code{PianoPedalBracket} objects (see
198 @internalsref{PianoPedalBracket} in the Internals Reference) can be
199 modified. For example, the bracket may be extended to the right edge
202 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
203 \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
204 c\sostenutoDown d e c, f g a\sostenutoUp
209 Notation Reference: @ref{Ties} (laissez vibrer).
211 @node Staff switch lines
212 @subsubsection Staff switch lines
216 @cindex staff switching
219 @funindex followVoice
221 Whenever a voice switches to another staff, a line connecting the notes
222 can be printed automatically. This is switched on by setting
223 @code{followVoice} to true
225 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
228 \set followVoice = ##t
233 \new Staff="two" { \clef bass \skip 1*2 }
239 Internals Reference: @internalsref{VoiceFollower}.
243 @funindex \showStaffSwitch
244 @code{\showStaffSwitch},
245 @funindex \hideStaffSwitch
246 @code{\hideStaffSwitch}.
249 @node Cross staff stems
250 @subsubsection Cross staff stems
252 Chords that cross staves may be produced by increasing the length
253 of the stem in the lower staff, so it reaches the stem in the upper
254 staff, or vice versa.
256 @lilypond[ragged-right,verbatim,quote]
258 \once \override Stem #'length = #10
259 \once \override Stem #'cross-staff = ##t
261 noFlag = \once \override Stem #'flag-style = #'no-flag
264 \stemDown \stemExtend