]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/keyboards.itely
e323958e52436d551eb9cfe2f2a94b27cc0b9509
[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,quote,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
141 @node Changing staff manually
142 @unnumberedsubsubsec Changing staff manually
143
144 @cindex changing staff manually
145 @cindex manual staff changes
146 @cindex staff changes, manual
147 @cindex cross-staff notes
148 @cindex notes, cross-staff
149 @cindex cross-staff beams
150 @cindex beams, cross-staff
151
152 @funindex \change
153 @funindex change
154
155 Voices can be switched between staves manually, using the command
156
157 @example
158 \change Staff = @var{staffname}
159 @end example
160
161 @noindent
162 The string @var{staffname} is the name of the staff.  It switches
163 the current voice from its current staff to the staff called
164 @var{staffname}.  Typical values for @var{staffname} are
165 @code{"up"} and @code{"down"}, or @code{"RH"} and @code{"LH"}.
166
167 The staff to which the voice is being switched must exist at the
168 time of the switch.  If necessary, staves should be @qq{kept alive},
169 see @ref{Keeping contexts alive}.
170
171 Cross-staff notes are beamed automatically:
172
173 @lilypond[verbatim,quote]
174 \new PianoStaff <<
175   \new Staff = "up" {
176     <e' c'>8
177     \change Staff = "down"
178     g8 fis g
179     \change Staff = "up"
180     <g'' c''>8
181     \change Staff = "down"
182     e8 dis e
183     \change Staff = "up"
184   }
185   \new Staff = "down" {
186     \clef bass
187     % keep staff alive
188     s1
189   }
190 >>
191 @end lilypond
192
193 If the beaming needs to be tweaked, make any changes to the stem
194 directions first.  The beam positions are then measured from the
195 center of the staff that is closest to the beam.  For a simple
196 example of beam tweaking, see @rlearning{Fixing overlapping
197 notation}.
198
199 @cindex cross-staff collisions
200 @cindex collisions, cross-staff voices
201
202 Overlapping notation can result when voices cross staves:
203
204 @lilypond[verbatim,quote]
205 \new PianoStaff <<
206   \new Staff = "up" {
207     \voiceOne
208     % Make space for fingering in the cross-staff voice
209     \once\override DynamicLineSpanner #'staff-padding = #3.4
210     e''2\p\< d''\> s1*0\!
211   }
212   \new Staff = "down" <<
213     {
214       \clef bass
215       s4. e,8\rest g,2\rest
216     } \\ {
217       c8\( g c'
218       \change Staff = "up"
219       e' g' b'-3 a' g'\)
220     }
221   >>
222 >>
223 @end lilypond
224
225 The stem and slur overlap the intervening line of dynamics
226 because automatic collision resolution is suspended for beams, slurs
227 and other spanners that connect notes on different staves,
228 as well as for stems and articulations if their placement is
229 affected by a cross-staff spanner.
230 The resulting collisions must be resolved manually, where necessary,
231 using the methods in @rlearning{Fixing overlapping notation}.
232
233 @seealso
234 Learning Manual:
235 @rlearning{Fixing overlapping notation}.
236
237 Notation Reference:
238 @ref{Stems},
239 @ref{Automatic beams},
240 @ref{Keeping contexts alive}.
241
242 Snippets:
243 @rlsr{Keyboards}.
244
245 Internals Reference:
246 @rinternals{Beam},
247 @rinternals{ContextChange}.
248
249 @knownissues
250 Beam collision avoidance does not work for automatic beams that end
251 right before a change in staff.  In this case use manual beams.
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 @seealso
329 Notation Reference:
330 @ref{Changing staff manually}.
331
332 Snippets:
333 @rlsr{Keyboards}.
334
335 Internals Reference:
336 @rinternals{AutoChangeMusic}.
337
338
339 @knownissues
340 @cindex chords, splitting across staves with \autochange
341
342 The staff switches may not end up in optimal places.  For high
343 quality output, staff switches should be specified manually.
344
345 Chords will not be split across the staves; they will be assigned to a
346 staff based on the first note named in the chord construct.
347
348
349 @node Staff-change lines
350 @unnumberedsubsubsec Staff-change lines
351
352 @cindex staff-change line
353 @cindex staff change line
354 @cindex cross-staff line
355 @cindex cross staff line
356 @cindex line, staff-change follower
357 @cindex line, cross-staff
358 @cindex line, staff-change
359 @cindex follow voice
360 @cindex voice, following
361 @cindex staff switching
362 @cindex cross-staff
363
364 @funindex followVoice
365 @funindex \showStaffSwitch
366 @funindex showStaffSwitch
367 @funindex \hideStaffSwitch
368 @funindex hideStaffSwitch
369
370 Whenever a voice switches to another staff, a line connecting the
371 notes can be printed automatically:
372
373 @lilypond[quote,verbatim,relative=1]
374 \new PianoStaff <<
375   \new Staff = "one" {
376     \showStaffSwitch
377     c1
378     \change Staff = "two"
379     b2 a
380   }
381   \new Staff = "two" {
382     \clef bass
383     s1*2
384   }
385 >>
386 @end lilypond
387
388
389 @predefined
390 @code{\showStaffSwitch},
391 @code{\hideStaffSwitch}.
392 @endpredefined
393
394 @seealso
395 Snippets:
396 @rlsr{Keyboards}.
397
398 Internals Reference:
399 @rinternals{Note_head_line_engraver},
400 @rinternals{VoiceFollower}.
401
402
403 @node Cross-staff stems
404 @unnumberedsubsubsec Cross-staff stems
405
406 @cindex cross-staff notes
407 @cindex cross staff notes
408 @cindex notes, cross-staff
409 @cindex cross-staff stems
410 @cindex cross staff stems
411 @cindex stems, cross-staff
412 @cindex chords, cross-staff
413 @cindex cross-staff chords
414 @cindex cross staff chords
415
416 @funindex Stem
417 @funindex cross-staff
418 @funindex length
419 @funindex flag-style
420
421 Chords that cross staves may be produced:
422
423 @lilypond[verbatim,quote]
424 \new PianoStaff <<
425   \new Staff {
426     \relative c' {
427       f8 e4 d8 d f e4
428     }
429   }
430   \new Staff {
431     \relative c' {
432       << {
433         \clef bass
434         % stems may overlap the other staff
435         \override Stem #'cross-staff = ##t
436         % extend the stems to reach the other staff
437         \override Stem #'length = #12
438         % do not print extra flags
439         \override Flag #'style = #'no-flag
440         % prevent beaming as needed
441         a8 g4 f8 f bes\noBeam g4
442       }
443       \\
444       {
445         f,2 bes4 c
446       } >>
447     }
448   }
449 >>
450 @end lilypond
451
452 @snippets
453 @lilypondfile[verbatim,quote,texidoc,doctitle]
454 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
455
456 @seealso
457 Snippets:
458 @rlsr{Keyboards}.
459
460 Internals Reference:
461 @rinternals{Stem}.
462
463
464 @node Piano
465 @subsection Piano
466
467 This section discusses notation issues that relate most directly to the
468 piano.
469
470 @menu
471 * Piano pedals::
472 @end menu
473
474 @node Piano pedals
475 @unnumberedsubsubsec Piano pedals
476
477 @cindex piano pedals
478 @cindex pedals, piano
479 @cindex sustain pedal
480 @cindex pedal, sustain
481 @cindex sostenuto pedal
482 @cindex pedal, sostenuto
483 @cindex una corda
484 @cindex tre corde
485 @cindex sos.
486 @cindex U.C.
487
488 @funindex \sustainOn
489 @funindex sustainOn
490 @funindex \sustainOff
491 @funindex sustainOff
492 @funindex \sostenutoOn
493 @funindex sostenutoOn
494 @funindex \sostenutoOff
495 @funindex sostenutoOff
496 @funindex \unaCorda
497 @funindex unaCorda
498 @funindex \treCorde
499 @funindex treCorde
500
501 Pianos generally have three pedals that alter the way sound is
502 produced: @notation{sustain}, @notation{sostenuto}
503 (@notation{sos.}), and @notation{una corda} (@notation{U.C.}).
504 Sustain pedals are also found on vibraphones and celestas.
505
506 @lilypond[quote,verbatim,relative=2]
507 c4\sustainOn d e g
508 <c, f a>1\sustainOff
509 c4\sostenutoOn e g c,
510 <bes d f>1\sostenutoOff
511 c4\unaCorda d e g
512 <d fis a>1\treCorde
513 @end lilypond
514
515 @cindex pedal indication styles
516 @cindex pedal indication, text
517 @cindex pedal indication, bracket
518 @cindex pedal indication, mixed
519 @cindex pedal sustain style
520 @cindex sustain pedal style
521
522 @funindex pedalSustainStyle
523 @funindex mixed
524 @funindex bracket
525 @funindex text
526
527 There are three styles of pedal indications: text, bracket, and mixed.
528 The sustain pedal and the una corda pedal use the text style by default
529 while the sostenuto pedal uses mixed by default.
530
531 @lilypond[quote,verbatim,relative=2]
532 c4\sustainOn g c2\sustainOff
533 \set Staff.pedalSustainStyle = #'mixed
534 c4\sustainOn g c d
535 d\sustainOff\sustainOn g, c2\sustainOff
536 \set Staff.pedalSustainStyle = #'bracket
537 c4\sustainOn g c d
538 d\sustainOff\sustainOn g, c2
539 \bar "|."
540 @end lilypond
541
542 The placement of the pedal commands matches the physical movement of the
543 sustain pedal during piano performance.  Pedalling to the final bar line
544 is indicated by omitting the final pedal off command.
545
546 Pedal indications may be placed in a @code{Dynamics} context,
547 which aligns them on a horizontal line.
548
549 @seealso
550 Notation Reference:
551 @ref{Ties}.
552
553 Snippets:
554 @rlsr{Keyboards}.
555
556 Internals Reference:
557 @rinternals{SustainPedal},
558 @rinternals{SustainPedalLineSpanner},
559 @rinternals{SustainEvent},
560 @rinternals{SostenutoPedal},
561 @rinternals{SostenutoPedalLineSpanner},
562 @rinternals{SostenutoEvent},
563 @rinternals{UnaCordaPedal},
564 @rinternals{UnaCordaPedalLineSpanner},
565 @rinternals{UnaCordaEvent},
566 @rinternals{PianoPedalBracket},
567 @rinternals{Piano_pedal_engraver}.
568
569
570 @node Accordion
571 @subsection Accordion
572
573 @cindex accordion
574
575 This section discusses notation that is unique to the accordion.
576
577 @menu
578 * Discant symbols::
579 @end menu
580
581 @node Discant symbols
582 @unnumberedsubsubsec Discant symbols
583
584 @cindex accordion discant symbols
585 @cindex discant symbols, accordion
586 @cindex accordion shifts
587 @cindex accordion shift symbols
588
589 Accordions are often built with more than one set of reeds that may be
590 in unison with, an octave above, or an octave below the written pitch.
591 Each accordion maker has different names for the @notation{shifts} that
592 select the various reed combinations, such as @notation{oboe},
593 @notation{musette}, or @notation{bandonium}, so a system of symbols has
594 come into use to simplify the performance instructions.
595
596 @snippets
597
598 @lilypondfile[verbatim,quote,texidoc,doctitle]
599 {accordion-discant-symbols.ly}
600
601 @seealso
602 Snippets:
603 @rlsr{Keyboards}.
604
605
606 @node Harp
607 @subsection Harp
608
609 This section discusses notation issues that are unique to the harp.
610
611 @menu
612 * References for harps::
613 * Harp pedals::
614 @end menu
615
616 @node References for harps
617 @unnumberedsubsubsec References for harps
618 @cindex harps
619 @cindex bisbiglando
620
621 Some common characteristics of harp music are covered elsewhere:
622
623 @itemize
624
625 @item The glissando is the most characteristic harp technique,
626 @ref{Glissando}.
627
628 @item A @notation{bisbigliando} is written as a tremelo @ref{Tremolo
629 repeats}.
630
631 @item Natural harmonics are covered under @ref{Harmonics}.
632
633 @item For directional arpeggios and non-arpeggios, see @ref{Arpeggio}.
634
635 @end itemize
636
637 @seealso
638 Notation Reference:
639 @ref{Tremolo repeats},
640 @ref{Glissando},
641 @ref{Arpeggio},
642 @ref{Harmonics}.
643
644
645 @node Harp pedals
646 @unnumberedsubsubsec Harp pedals
647
648 @cindex harp pedals
649 @cindex harp pedal diagrams
650 @cindex pedals, harp
651 @cindex pedal diagrams, harp
652
653 Harps have seven strings per octave that may be sounded at the natural,
654 flattened, or sharpened pitch.  In lever harps, each string is adjusted
655 individually, but in pedal harps every string with the same pitch name
656 is controlled by a single pedal.  From the player's left to right, the
657 pedals are D, C, and B on the left and E, F, G, and A on the right.
658 The position of the pedals may be indicated with text marks:
659
660 @lilypond[quote,verbatim,relative=2]
661 \textLengthOn
662 cis1_\markup \concat \vcenter {
663   [D \flat C \sharp B|E \sharp F \sharp G A \flat] }
664 c!1_\markup \concat \vcenter {
665   [ C \natural ] }
666 @end lilypond
667
668 or pedal diagrams:
669
670 @lilypond[quote,verbatim,relative=2]
671 \textLengthOn
672 cis1_\markup { \harp-pedal #"^v-|vv-^" }
673 c!1_\markup { \harp-pedal #"^o--|vv-^" }
674 @end lilypond
675
676 The @code{\harp-pedal} command accepts a string of characters, where
677 @code{^} is the highest pedal position (flattened pitch), @code{-} is
678 the middle pedal position (natural pitch), @code{v} is the lowest pedal
679 position (sharpened pitch), and @code{|} is the divider.  A prefixed
680 @code{o} will circle the following pedal symbol.
681
682 @seealso
683 Notation Reference:
684 @ref{Text scripts},
685 @ref{Instrument Specific Markup}.