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