]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/keyboards.itely
Update.
[lilypond.git] / Documentation / user / keyboards.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9 @c \version "2.11.51"
10
11 @node Keyboard instruments
12 @section Keyboard instruments
13
14 @lilypondfile[quote]{keyboard-headword.ly}
15
16 This section discusses several aspects of music notation that are unique
17 to keyboard instruments.
18
19 @menu
20 * Common notation for keyboards::
21 * Piano::
22 * Accordion::
23 @end menu
24
25 @node Common notation for keyboards
26 @subsection Common notation for keyboards
27
28 This section discusses notation issues that may arise for most keyboard
29 instruments.
30
31 @menu
32 * References for keyboards::
33 * Changing staff manually::
34 * Changing staff automatically::
35 * Staff-change lines::
36 * Cross-staff stems::
37 @end menu
38
39 @node References for keyboards
40 @unnumberedsubsubsec References for keyboards
41
42 Keyboard instruments are usually notated with Piano staves.  These
43 are two or more normal staves coupled with a brace.  The same
44 notation is also used for harps and other keyed instruments.
45 Organ music is normally written with two staves inside a
46 @code{PianoStaff} group and third, normal staff for the pedals.
47
48 The staves in keyboard music are largely independent, but
49 sometimes voices can cross between the two staves.  In this
50 section we discuss some notation techniques particular to keyboard
51 music.
52
53 Several common issues in keyboard music are covered elsewhere:
54
55 @itemize
56 @item Keyboard music usually contains multiple voices and the
57 number of voices may change regularly; this is described in
58 @ref{Collision resolution}.
59
60 @item Keyboard music can be written in parallel, as described in
61 @ref{Writing music in parallel}.
62
63 @item Fingerings are indicated with @ref{Fingering instructions}.
64
65 @item Organ pedal indications are inserted as articulations, see
66 @ref{List of articulations}.
67
68 @item Vertical grid lines can be shown with @ref{Grid lines}.
69
70 @item Keyboard music often contains @notation{Laissez vibrer} ties
71 as well as ties on arpeggios and tremolos, described in
72 @ref{Ties}.
73
74 @item Placing arpeggios across multiple voices and staves is
75 covered in @ref{Arpeggio}.
76
77 @item Tremolo marks are described in @ref{Tremolo repeats}.
78
79 @item Several of the tweaks that can occur in keyboard music are
80 demonstrated in @rlearning{Real music example}.
81
82 @item Hidden notes can be used to produce ties that cross voices,
83 as shown in @rlearning{Other uses for tweaks}.
84
85 @end itemize
86
87 @seealso
88
89 Learning Manual:
90 @rlearning{Real music example},
91 @rlearning{Other uses for tweaks}.
92
93 Notation Reference:
94 @ref{Grouping staves},
95 @ref{Instrument names},
96 @ref{Writing music in parallel},
97 @ref{Fingering instructions},
98 @ref{Grid lines},
99 @ref{Ties},
100 @ref{Arpeggio},
101 @ref{Tremolo repeats},
102 @ref{List of articulations}.
103
104 Internals Reference:
105 @rinternals{PianoStaff}.
106
107 Snippets:
108 @rlsr{Keyboards}.
109
110 @knownissues
111
112 Dynamics are not automatically centered, but workarounds do exist.  One
113 option is the @q{piano centered dynamics} template under
114 @rlearning{Piano templates}; another option is to increase the
115 @code{staff-padding} of dynamics as discussed in @rlearning{Moving
116 objects}.
117
118 @node Changing staff manually
119 @unnumberedsubsubsec Changing staff manually
120
121 @cindex changing staff manually
122 @cindex manual staff changes
123 @cindex staff changes, manual
124 @cindex cross-staff notes
125 @cindex notes, cross-staff
126 @cindex cross-staff beams
127 @cindex beams, cross-staff
128 @funindex \change
129
130 Voices can be switched between staves manually, using the command
131
132 @example
133 \change Staff = @var{staffname}
134 @end example
135
136 @noindent
137 The string @var{staffname} is the name of the staff.  It switches
138 the current voice from its current staff to the Staff called
139 @var{staffname}.  Typical values for @var{staffname} are
140 @code{"up"} and @code{"down"}, or @code{"RH"} and @code{"LH"}.
141
142 Cross-staff notes are beamed automatically:
143
144 @lilypond[verbatim,quote,ragged-right]
145 \new PianoStaff <<
146   \new Staff = "up" {
147     <e' c'>8
148     \change Staff = down
149     g fis g
150     \change Staff = up
151     <g'' c''>8
152     \change Staff = down
153     e dis e
154     \change Staff = up
155   }
156   \new Staff = "down" {
157     \clef bass
158     s1 % keep staff alive
159   }
160 >>
161 @end lilypond
162
163 If the beaming needs to be tweaked, make any changes to the stem
164 directions first.  The beam positions are then measured from the
165 center of the staff that is closest to the beam.  For a simple
166 example of beam tweaking, see @rlearning{Fixing overlapping
167 notation}.
168
169 @seealso
170
171 Learning Manual:
172 @rlearning{Fixing overlapping notation}.
173
174 Notation Reference:
175 @ruser{Stems},
176 @ruser{Automatic beams}.
177
178 Snippets:
179 @rlsr{Keyboards}.
180
181 Internals Reference:
182 @rinternals{Beam}.
183
184
185 @node Changing staff automatically
186 @unnumberedsubsubsec Changing staff automatically
187
188 @cindex changing staff automatically
189 @cindex automatic staff changes
190 @cindex staff changes, automatic
191 @funindex \autochange
192
193 Voices can be made to switch automatically between the top and the
194 bottom staff.  The syntax for this is
195
196 @example
197 \autochange @dots{}@var{music}@dots{}
198 @end example
199
200 @noindent
201 This will create two staves inside the current staff group
202 (usually a @code{PianoStaff}), called @code{"up"} and
203 @code{"down"}.  The lower staff will be in bass clef by default.
204 The autochanger switches on basis of the pitch (middle C is the
205 turning point), and it looks ahead skipping over rests to switch
206 in advance.
207
208 @lilypond[quote,verbatim,ragged-right]
209 \new PianoStaff {
210   \autochange {
211     g4 a b c' d' r4 a g
212   }
213 }
214 @end lilypond
215
216 A @code{\relative} section that is outside of @code{\autochange}
217 has no effect on the pitches of the music, so if necessary, put
218 @code{\relative} inside @code{\autochange}.
219
220 If additional control is needed over the individual staves, they
221 can be created manually with the names @code{"up"} and
222 @code{"down"}.  The @code{\autochange} command will then switch
223 its voice between the existing staves.  For example, this is
224 necessary to place a key signature in the lower staff:
225
226 @lilypond[quote,verbatim,ragged-right]
227 \new PianoStaff <<
228   \new Staff = "up" {
229     \new Voice = "melOne" {
230       \key g \major
231       \autochange \relative c' {
232         g8 b a c b d c e
233         d r fis, g a2
234       }
235     }
236   }
237   \new Staff = "down" {
238     \key g \major
239     \clef bass
240   }
241 >>
242 @end lilypond
243
244 @seealso
245
246 Notation Reference:
247 @ref{Changing staff manually}.
248
249 Snippets:
250 @rlsr{Keyboards}.
251
252 Internals Reference:
253 @rinternals{AutoChangeMusic}.
254
255 @knownissues
256
257 The staff switches may not end up in optimal places.  For high
258 quality output, staff switches should be specified manually.
259
260 Chords will not be split across the staves; they will be assigned to a
261 staff based on the first note named in the chord construct.
262
263 @node Staff-change lines
264 @unnumberedsubsubsec Staff-change lines
265
266 @cindex staff-change lines
267 @cindex cross-staff lines
268 @cindex lines, staff-change follower
269 @cindex follow voice
270 @cindex staff switching
271 @cindex cross-staff
272 @funindex followVoice
273
274 Whenever a voice switches to another staff, a line connecting the
275 notes can be printed automatically:
276
277 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
278 \new PianoStaff <<
279   \new Staff = "one" {
280     \showStaffSwitch
281     c1
282     \change Staff=two
283     b2 a
284   }
285   \new Staff = "two" { \clef bass s1*2 }
286 >>
287 @end lilypond
288
289 @predefined
290
291 @funindex \showStaffSwitch
292 @funindex \hideStaffSwitch
293 @code{\showStaffSwitch}, @code{\hideStaffSwitch}.
294
295 @seealso
296
297 Snippets:
298 @rlsr{Keyboards}.
299
300 Internals Reference:
301 @rinternals{VoiceFollower}.
302
303
304 @node Cross-staff stems
305 @unnumberedsubsubsec Cross-staff stems
306
307 @cindex cross-staff notes
308 @cindex notes, cross-staff
309 @cindex cross-staff stems
310 @cindex stems, cross-staff
311
312 Chords that cross staves may be produced:
313
314 @lilypond[ragged-right,verbatim,quote]
315 \new PianoStaff <<
316   \new Staff \relative c' {
317     f8 e4 d8 <f bes,>2
318   }
319   \new Staff \relative c' {
320     << {
321       \clef bass
322       \stemUp
323       % stems may overlap the other staff
324       \override Stem #'cross-staff = ##t
325       % extend the stems to reach other other staff
326       \override Stem #'length = #12
327       % do not print extra flags
328       \override Stem #'flag-style = #'no-flag
329       a8 g4 f8
330     } \\ {
331       f,2 d'
332     }
333     >>
334   }
335 >>
336 @end lilypond
337
338 @snippets
339 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
340 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
341
342 @seealso
343
344 Snippets:
345 @rlsr{Keyboards}.
346
347 Internals Reference:
348 @rinternals{Stem}
349
350 @node Piano
351 @subsection Piano
352
353 This section discusses notation issues that relate most directly to the
354 piano.
355
356 @menu
357 * Piano pedals::
358 @end menu
359
360 @node Piano pedals
361 @unnumberedsubsubsec Piano pedals
362 @cindex piano pedals
363 @cindex pedals, piano
364 @cindex sustain pedal
365 @cindex sostenuto pedal
366 @cindex una corde
367 @cindex tre corde
368 @funindex \sustainOn
369 @funindex \sustainOff
370 @funindex \sostenutoOn
371 @funindex \sostenutoOff
372 @funindex \unaCorda
373 @funindex \treCorde
374
375 Pianos generally have three pedals that alter the way sound is
376 produced: @notation{sustain}, @notation{sostenuto}
377 (@notation{sos.}), and @notation{una corde} (@notation{U.C.}).
378 Sustain pedals are also found on vibraphones and celestas.
379
380 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
381 c4\sustainOn d e g
382 <c, f a>1\sustainOff
383 c4\sostenutoOn e g c,
384 <bes d f>1\sostenutoOff
385 c4\unaCorda d e g
386 <d fis a>1\treCorde
387 @end lilypond
388
389 There are three styles of pedal indications: text, bracket, and mixed.
390 The sustain pedal and the una corda pedal use the text style by default
391 while the sostenuto pedal uses mixed by default.
392
393 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
394 c4\sustainOn g c2\sustainOff
395 \set Staff.pedalSustainStyle = #'mixed
396 c4\sustainOn g c d
397 d\sustainOff\sustainOn g, c2\sustainOff
398 \set Staff.pedalSustainStyle = #'bracket
399 c4\sustainOn g c d
400 d\sustainOff\sustainOn g, c2
401 \bar "|."
402 @end lilypond
403
404 The placement of the pedal commands matches the physical movement of the
405 sustain pedal during piano performance.  Pedalling to the final bar line
406 is indicated by omitting the final pedal up command.
407
408 @seealso
409
410 Notation Reference:
411 @ref{Ties}.
412
413 Snippets:
414 @rlsr{Keyboards}.
415
416 Internals Reference:
417 @rinternals{SustainPedal},
418 @rinternals{SustainPedalLineSpanner},
419 @rinternals{SostenutoPedal},
420 @rinternals{SostenutoPedalLineSpanner},
421 @rinternals{UnaCordaPedal},
422 @rinternals{UnaCordaPedalLineSpanner},
423 @rinternals{PianoPedalBracket},
424 @rinternals{Piano_pedal_engraver}.
425
426 @node Accordion
427 @subsection Accordion
428
429 This section discusses notation that is unique to the accordion.
430
431 @menu
432 * Discant symbols::
433 @end menu
434
435 @node Discant symbols
436 @unnumberedsubsubsec Discant symbols
437 @cindex accordion discant symbols
438 @cindex discant symbols, accordion
439 @cindex accordion shifts
440
441 Accordions are often built with more than one set of reeds that may be
442 in unison with, an octave above, or an octave below the written pitch.
443 Each accordion maker has different names for the @notation{shifts} that
444 select the various reed combinations, such as @notation{oboe},
445 @notation{musette}, or @notation{bandonium}, so a system of symbols has
446 come into use to simplify the performance instructions.
447
448 @snippets
449
450 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
451 {accordion-discant-symbols.ly}
452
453 @seealso
454
455 Snippets:
456 @rlsr{Keyboards}.