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