]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/keyboards.itely
3d2919edc7391fe85ffc49991ba85c6d4ae1dca6
[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.19.25"
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.di.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 = #4
210     e''2\p\< d''\>
211     c''1\!
212   }
213   \new Staff = "down" <<
214     {
215       \clef bass
216       s4. e,8\rest g,2\rest
217       c1
218     } \\ {
219       c8\( g c'
220       \change Staff = "up"
221       e' g' b'-3 a' g'\)
222       f'1
223     }
224   >>
225 >>
226 @end lilypond
227
228 The stem and slur overlap the intervening line of dynamics
229 because automatic collision resolution is suspended for beams, slurs
230 and other spanners that connect notes on different staves,
231 as well as for stems and articulations if their placement is
232 affected by a cross-staff spanner.
233 The resulting collisions must be resolved manually, where necessary,
234 using the methods in @rlearning{Fixing overlapping notation}.
235
236 @seealso
237 Learning Manual:
238 @rlearning{Fixing overlapping notation}.
239
240 Notation Reference:
241 @ref{Stems},
242 @ref{Automatic beams},
243 @ref{Keeping contexts alive}.
244
245 Snippets:
246 @rlsr{Keyboards}.
247
248 Internals Reference:
249 @rinternals{Beam},
250 @rinternals{ContextChange}.
251
252 @knownissues
253 Beam collision avoidance does not work for automatic beams that end
254 right before a change in staff.  In this case use manual beams.
255
256
257 @node Changing staff automatically
258 @unnumberedsubsubsec Changing staff automatically
259
260 @cindex changing staff automatically
261 @cindex automatic staff changes
262 @cindex staff changes, automatic
263
264 @funindex \autochange
265 @funindex autochange
266 @funindex PianoStaff
267
268 Voices can be made to switch automatically between the top and the
269 bottom staff.  The syntax for this is
270
271 @example
272 \autochange @dots{}@var{music}@dots{}
273 @end example
274
275 @noindent
276 This will create two staves inside the current staff group
277 (usually a @code{PianoStaff}), called @code{"up"} and
278 @code{"down"}.  The lower staff will be in the bass clef by default.
279 The autochanger switches on the basis of the pitch (middle@tie{}C is the
280 turning point), and it looks ahead skipping over rests to switch
281 in advance.
282
283 @lilypond[quote,verbatim]
284 \new PianoStaff {
285   \autochange {
286     g4 a b c'
287     d'4 r a g
288   }
289 }
290 @end lilypond
291
292 @noindent
293 It is possible to specify other pitches for the turning point.
294 If the staves are not instantiated explicitly, other clefs may be used.
295
296 @lilypond[quote,verbatim]
297 music = {
298   g8 b a c' b8 d' c'8 e'
299   d'8 r f' g' a'2
300 }
301
302 \autochange d' \music
303 \autochange b \with { \clef soprano } \music
304 \autochange d' \with { \clef alto } \with { \clef tenor } \music
305 @end lilypond
306
307 @cindex relative music and autochange
308 @cindex autochange and relative music
309
310 @funindex \relative
311 @funindex relative
312
313 A @code{\relative} section that is outside of @code{\autochange}
314 has no effect on the pitches of the music, so if necessary, put
315 @code{\relative} inside @code{\autochange}.
316
317 If additional control is needed over the individual staves, they
318 can be created manually with the names @code{"up"} and
319 @code{"down"}.  The @code{\autochange} command will then switch
320 its voice between the existing staves.
321
322 @warning{If staves are created manually, they @emph{must} be named
323 @code{"up"} and @code{"down"}.}
324
325 For example, staves must be created manually in order to place a
326 key signature in the lower staff:
327
328 @lilypond[quote,verbatim]
329 \new PianoStaff <<
330   \new Staff = "up" {
331     \new Voice = "melOne" {
332       \key g \major
333       \autochange \relative {
334         g8 b a c b d c e
335         d8 r fis, g a2
336       }
337     }
338   }
339   \new Staff = "down" {
340     \key g \major
341     \clef bass
342   }
343 >>
344 @end lilypond
345
346 @seealso
347 Notation Reference:
348 @ref{Changing staff manually}.
349
350 Snippets:
351 @rlsr{Keyboards}.
352
353 Internals Reference:
354 @rinternals{AutoChangeMusic}.
355
356
357 @knownissues
358 @cindex chords, splitting across staves with \autochange
359
360 The staff switches may not end up in optimal places.  For high
361 quality output, staff switches should be specified manually.
362
363 Chords will not be split across the staves; they will be assigned to a
364 staff based on the first note named in the chord construct.
365
366
367 @node Staff-change lines
368 @unnumberedsubsubsec Staff-change lines
369
370 @cindex staff-change line
371 @cindex staff change line
372 @cindex cross-staff line
373 @cindex cross staff line
374 @cindex line, staff-change follower
375 @cindex line, cross-staff
376 @cindex line, staff-change
377 @cindex follow voice
378 @cindex voice, following
379 @cindex staff switching
380 @cindex cross-staff
381
382 @funindex followVoice
383 @funindex \showStaffSwitch
384 @funindex showStaffSwitch
385 @funindex \hideStaffSwitch
386 @funindex hideStaffSwitch
387
388 Whenever a voice switches to another staff, a line connecting the
389 notes can be printed automatically:
390
391 @lilypond[quote,verbatim]
392 \new PianoStaff <<
393   \new Staff = "one" {
394     \showStaffSwitch
395     c'1
396     \change Staff = "two"
397     b2 a
398   }
399   \new Staff = "two" {
400     \clef bass
401     s1*2
402   }
403 >>
404 @end lilypond
405
406
407 @predefined
408 @code{\showStaffSwitch},
409 @code{\hideStaffSwitch}.
410 @endpredefined
411
412 @seealso
413 Snippets:
414 @rlsr{Keyboards}.
415
416 Internals Reference:
417 @rinternals{Note_head_line_engraver},
418 @rinternals{VoiceFollower}.
419
420
421 @node Cross-staff stems
422 @unnumberedsubsubsec Cross-staff stems
423
424 @cindex cross-staff notes
425 @cindex cross staff notes
426 @cindex notes, cross-staff
427 @cindex cross-staff stems
428 @cindex cross staff stems
429 @cindex stems, cross-staff
430 @cindex chords, cross-staff
431 @cindex cross-staff chords
432 @cindex cross staff chords
433
434 @funindex Stem
435 @funindex \crossStaff
436 @funindex \autoBeamOff
437 @funindex Span_stem_engraver
438
439 Chords that cross staves may be produced using the
440 @code{Span_stem_engraver}. Care must be taken to ensure that
441 automatic beams do not beam the notes on one staff when it’s not
442 required on the other.
443
444 @lilypondfile[verbatim,quote]
445 {cross-staff-stems.ly}
446
447 For the time being, this engraver can not be specified by its name in
448 double quotes, but rather prefixing its name with a hash symbol
449 @code{#}, due to the way it is implemented.
450
451 @snippets
452 @lilypondfile[verbatim,quote,texidoc,doctitle]
453 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
454
455 @seealso
456 Snippets:
457 @rlsr{Keyboards}.
458
459 Internals Reference:
460 @rinternals{Stem}.
461
462
463 @node Piano
464 @subsection Piano
465
466 This section discusses notation issues that relate most directly to the
467 piano.
468
469 @menu
470 * Piano pedals::
471 @end menu
472
473 @node Piano pedals
474 @unnumberedsubsubsec Piano pedals
475
476 @cindex piano pedals
477 @cindex pedals, piano
478 @cindex sustain pedal
479 @cindex pedal, sustain
480 @cindex sostenuto pedal
481 @cindex pedal, sostenuto
482 @cindex una corda
483 @cindex tre corde
484 @cindex sos.
485 @cindex U.C.
486
487 @funindex \sustainOn
488 @funindex sustainOn
489 @funindex \sustainOff
490 @funindex sustainOff
491 @funindex \sostenutoOn
492 @funindex sostenutoOn
493 @funindex \sostenutoOff
494 @funindex sostenutoOff
495 @funindex \unaCorda
496 @funindex unaCorda
497 @funindex \treCorde
498 @funindex treCorde
499
500 Pianos generally have three pedals that alter the way sound is
501 produced: @notation{sustain}, @notation{sostenuto}
502 (@notation{sos.}), and @notation{una corda} (@notation{U.C.}).
503 Sustain pedals are also found on vibraphones and celestas.
504
505 @lilypond[quote,verbatim]
506 \relative {
507   c''4\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 }
514 @end lilypond
515
516 @cindex pedal indication styles
517 @cindex pedal indication, text
518 @cindex pedal indication, bracket
519 @cindex pedal indication, mixed
520 @cindex pedal sustain style
521 @cindex sustain pedal style
522
523 @funindex pedalSustainStyle
524 @funindex mixed
525 @funindex bracket
526 @funindex text
527
528 There are three styles of pedal indications: text, bracket, and mixed.
529 The sustain pedal and the una corda pedal use the text style by default
530 while the sostenuto pedal uses mixed by default.
531
532 @lilypond[quote,verbatim]
533 \relative {
534   c''4\sustainOn g c2\sustainOff
535   \set Staff.pedalSustainStyle = #'mixed
536   c4\sustainOn g c d
537   d\sustainOff\sustainOn g, c2\sustainOff
538   \set Staff.pedalSustainStyle = #'bracket
539   c4\sustainOn g c d
540   d\sustainOff\sustainOn g, c2
541   \bar "|."
542 }
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,quote,texidoc,doctitle]
602 {accordion-register-symbols.ly}
603
604 @seealso
605 Snippets:
606 @rlsr{Keyboards}.
607
608
609 @node Harp
610 @subsection Harp
611
612 This section discusses notation issues that are unique to the harp.
613
614 @menu
615 * References for harps::
616 * Harp pedals::
617 @end menu
618
619 @node References for harps
620 @unnumberedsubsubsec References for harps
621 @cindex harps
622 @cindex bisbiglando
623
624 Some common characteristics of harp music are covered elsewhere:
625
626 @itemize
627
628 @item The glissando is the most characteristic harp technique,
629 @ref{Glissando}.
630
631 @item A @notation{bisbigliando} is written as a tremelo @ref{Tremolo
632 repeats}.
633
634 @item Natural harmonics are covered under @ref{Harmonics}.
635
636 @item For directional arpeggios and non-arpeggios, see @ref{Arpeggio}.
637
638 @end itemize
639
640 @seealso
641 Notation Reference:
642 @ref{Tremolo repeats},
643 @ref{Glissando},
644 @ref{Arpeggio},
645 @ref{Harmonics}.
646
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,fragment]
664 \textLengthOn
665 cis''1_\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,fragment]
674 \textLengthOn
675 cis''1_\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}.