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