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