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