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.
17 @subsection Piano sections
19 Piano staves are two normal staves coupled with a brace. The staves
20 are largely independent, but sometimes voices can cross between the
21 two staves. The same notation is also used for harps and other key
22 instruments. The @internalsref{PianoStaff} is especially built to
23 handle this cross-staffing behavior. In this section we discuss the
24 @internalsref{PianoStaff} and some other pianistic peculiarities.
27 * Automatic staff changes::
28 * Manual staff switches::
30 * Staff switch lines::
36 Dynamics are not centered, but workarounds do exist. See the
37 @q{piano centered dynamics} template in @rlearning{Piano templates}.
39 @cindex cross staff stem
40 @cindex stem, cross staff
41 @cindex distance between staves in piano music
44 @node Automatic staff changes
45 @unnumberedsubsubsec Automatic staff changes
46 @cindex Automatic staff changes
48 Voices can be made to switch automatically between the top and the bottom
49 staff. The syntax for this is
53 \autochange @dots{}@var{music}@dots{}
58 This will create two staves inside the current PianoStaff, called
59 @code{up} and @code{down}. The lower staff will be in bass clef by
62 A @code{\relative} section that is outside of @code{\autochange} has
63 no effect on the pitches of @var{music}, so, if necessary, put
64 @code{\relative} inside @code{\autochange} like
68 \autochange \relative @dots{} @dots{}
73 The autochanger switches on basis of the pitch (middle C is the turning
74 point), and it looks ahead skipping over rests to switch in
75 advance. Here is a practical example
77 @lilypond[quote,verbatim,ragged-right]
79 \autochange \relative c'
88 Notation Reference: @ref{Manual staff switches}.
90 Internals Reference: @internalsref{AutoChangeMusic}.
96 The staff switches may not end up in optimal places. For high
97 quality output, staff switches should be specified manually.
100 @code{\autochange} cannot be inside @code{\times}.
103 @node Manual staff switches
104 @unnumberedsubsubsec Manual staff switches
106 @cindex manual staff switches
107 @cindex staff switch, manual
109 Voices can be switched between staves manually, using the command
111 \change Staff = @var{staffname} @var{music}
115 The string @var{staffname} is the name of the staff. It switches the
116 current voice from its current staff to the Staff called
117 @var{staffname}. Typically @var{staffname} is @code{"up"} or
118 @code{"down"}. The @code{Staff} referred to must already exist, so
119 usually the setup for a score will start with a setup of the staves,
124 \skip 1 * 10 % @emph{keep staff alive}
126 \new Staff = "down" @{
127 \skip 1 * 10 % @emph{idem}
133 and the @code{Voice} is inserted afterwards
136 \context Staff = down
137 \new Voice @{ @dots{} \change Staff = up @dots{} @}
142 @unnumberedsubsubsec Pedals
145 Pianos have pedals that alter the way sound is produced. Generally, a
146 piano has three pedals, sustain, una corda, and sostenuto.
149 Piano pedal instruction can be expressed by attaching
150 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
151 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
154 @lilypond[quote,ragged-right,fragment,verbatim]
155 c'4\sustainDown c'4\sustainUp
158 What is printed can be modified by setting @code{pedal@var{X}Strings},
159 where @var{X} is one of the pedal types: @code{Sustain},
160 @code{Sostenuto} or @code{UnaCorda}. Refer to
161 @internalsref{SustainPedal} in the program reference for more
164 Pedals can also be indicated by a sequence of brackets, by setting the
165 @code{pedalSustainStyle} property to bracket objects
167 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
168 \set Staff.pedalSustainStyle = #'bracket
170 b\sustainUp\sustainDown
171 b g \sustainUp a \sustainDown \bar "|."
174 A third style of pedal notation is a mixture of text and brackets,
175 obtained by setting the @code{pedalSustainStyle} property to
178 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
179 \set Staff.pedalSustainStyle = #'mixed
181 b\sustainUp\sustainDown
182 b g \sustainUp a \sustainDown \bar "|."
185 The default @q{*Ped.} style for sustain and damper pedals corresponds to
186 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
189 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
190 c\sostenutoDown d e c, f g a\sostenutoUp
193 For fine-tuning the appearance of a pedal bracket, the properties
194 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
195 @code{PianoPedalBracket} objects (see
196 @internalsref{PianoPedalBracket} in the Internals Reference) can be
197 modified. For example, the bracket may be extended to the right edge
200 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
201 \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
202 c\sostenutoDown d e c, f g a\sostenutoUp
207 Notation Reference: @ref{Ties} (laissez vibrer).
209 @node Staff switch lines
210 @unnumberedsubsubsec Staff switch lines
214 @cindex staff switching
217 @funindex followVoice
219 Whenever a voice switches to another staff, a line connecting the notes
220 can be printed automatically. This is switched on by setting
221 @code{followVoice} to true
223 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
226 \set followVoice = ##t
231 \new Staff="two" { \clef bass \skip 1*2 }
237 Internals Reference: @internalsref{VoiceFollower}.
241 @funindex \showStaffSwitch
242 @code{\showStaffSwitch},
243 @funindex \hideStaffSwitch
244 @code{\hideStaffSwitch}.
247 @node Cross staff stems
248 @unnumberedsubsubsec Cross staff stems
250 Chords that cross staves may be produced by increasing the length
251 of the stem in the lower staff, so it reaches the stem in the upper
252 staff, or vice versa.
254 @lilypond[ragged-right,verbatim,quote]
256 \once \override Stem #'length = #10
257 \once \override Stem #'cross-staff = ##t
259 noFlag = \once \override Stem #'flag-style = #'no-flag
262 \stemDown \stemExtend