]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/keyboards.itely
ac09c8fab8f66c2caac2eeb49e2bc2d2dea40ebf
[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 @ref{Stems},
194 @ref{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 d f e4
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         % prevent beaming as needed
380         a8 g4 f8 f bes\noBeam g4
381       }
382       \\
383       {
384         f,2 bes4 c
385       } >>
386     }
387   }
388 >>
389 @end lilypond
390
391 @snippets
392 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
393 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
394
395 @seealso
396
397 Snippets:
398 @rlsr{Keyboards}.
399
400 Internals Reference:
401 @rinternals{Stem}.
402
403 @node Piano
404 @subsection Piano
405
406 This section discusses notation issues that relate most directly to the
407 piano.
408
409 @menu
410 * Piano pedals::
411 @end menu
412
413 @node Piano pedals
414 @unnumberedsubsubsec Piano pedals
415
416 @cindex piano pedals
417 @cindex pedals, piano
418 @cindex sustain pedal
419 @cindex sostenuto pedal
420 @cindex una corda
421 @cindex tre corde
422 @cindex sos.
423 @cindex U.C.
424 @funindex \sustainOn
425 @funindex sustainOn
426 @funindex \sustainOff
427 @funindex sustainOff
428 @funindex \sostenutoOn
429 @funindex sostenutoOn
430 @funindex \sostenutoOff
431 @funindex sostenutoOff
432 @funindex \unaCorda
433 @funindex unaCorda
434 @funindex \treCorde
435 @funindex treCorde
436
437 Pianos generally have three pedals that alter the way sound is
438 produced: @notation{sustain}, @notation{sostenuto}
439 (@notation{sos.}), and @notation{una corda} (@notation{U.C.}).
440 Sustain pedals are also found on vibraphones and celestas.
441
442 @lilypond[quote,verbatim,relative=2]
443 c4\sustainOn d e g
444 <c, f a>1\sustainOff
445 c4\sostenutoOn e g c,
446 <bes d f>1\sostenutoOff
447 c4\unaCorda d e g
448 <d fis a>1\treCorde
449 @end lilypond
450
451 @cindex pedal indication styles
452 @cindex pedal indication, text
453 @cindex pedal indication, bracket
454 @cindex pedal indication, mixed
455 @cindex pedal sustain style
456 @cindex sustain pedal style
457 @funindex pedalSustainStyle
458 @funindex mixed
459 @funindex bracket
460 @funindex text
461
462 There are three styles of pedal indications: text, bracket, and mixed.
463 The sustain pedal and the una corda pedal use the text style by default
464 while the sostenuto pedal uses mixed by default.
465
466 @lilypond[quote,verbatim,relative=2]
467 c4\sustainOn g c2\sustainOff
468 \set Staff.pedalSustainStyle = #'mixed
469 c4\sustainOn g c d
470 d\sustainOff\sustainOn g, c2\sustainOff
471 \set Staff.pedalSustainStyle = #'bracket
472 c4\sustainOn g c d
473 d\sustainOff\sustainOn g, c2
474 \bar "|."
475 @end lilypond
476
477 The placement of the pedal commands matches the physical movement of the
478 sustain pedal during piano performance.  Pedalling to the final bar line
479 is indicated by omitting the final pedal up command.
480
481 @seealso
482
483 Notation Reference:
484 @ref{Ties}.
485
486 Snippets:
487 @rlsr{Keyboards}.
488
489 Internals Reference:
490 @rinternals{SustainPedal},
491 @rinternals{SustainPedalLineSpanner},
492 @rinternals{SustainEvent},
493 @rinternals{SostenutoPedal},
494 @rinternals{SostenutoPedalLineSpanner},
495 @rinternals{SostenutoEvent},
496 @rinternals{UnaCordaPedal},
497 @rinternals{UnaCordaPedalLineSpanner},
498 @rinternals{UnaCordaEvent},
499 @rinternals{PianoPedalBracket},
500 @rinternals{Piano_pedal_engraver}.
501
502 @node Accordion
503 @subsection Accordion
504
505 @cindex accordion
506
507 This section discusses notation that is unique to the accordion.
508
509 @menu
510 * Discant symbols::
511 @end menu
512
513 @node Discant symbols
514 @unnumberedsubsubsec Discant symbols
515 @cindex accordion discant symbols
516 @cindex discant symbols, accordion
517 @cindex accordion shifts
518 @cindex accordion shift symbols
519
520 Accordions are often built with more than one set of reeds that may be
521 in unison with, an octave above, or an octave below the written pitch.
522 Each accordion maker has different names for the @notation{shifts} that
523 select the various reed combinations, such as @notation{oboe},
524 @notation{musette}, or @notation{bandonium}, so a system of symbols has
525 come into use to simplify the performance instructions.
526
527 @snippets
528
529 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
530 {accordion-discant-symbols.ly}
531
532 @seealso
533
534 Snippets:
535 @rlsr{Keyboards}.