]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/keyboards.itely
bcd955b28e20a5df6e9375e61aaed82195d4cb5c
[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 @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 @seealso
233 Learning Manual:
234 @rlearning{Fixing overlapping notation}.
235
236 Notation Reference:
237 @ref{Stems},
238 @ref{Automatic beams},
239 @ref{Keeping contexts alive}.
240
241 Snippets:
242 @rlsr{Keyboards}.
243
244 Internals Reference:
245 @rinternals{Beam},
246 @rinternals{ContextChange}.
247
248 @knownissues
249 Beam collision avoidance does not work for automatic beams that end
250 right before a change in staff.  In this case use manual beams.
251
252
253 @node Changing staff automatically
254 @unnumberedsubsubsec Changing staff automatically
255
256 @cindex changing staff automatically
257 @cindex automatic staff changes
258 @cindex staff changes, automatic
259
260 @funindex \autochange
261 @funindex autochange
262 @funindex PianoStaff
263
264 Voices can be made to switch automatically between the top and the
265 bottom staff.  The syntax for this is
266
267 @example
268 \autochange @dots{}@var{music}@dots{}
269 @end example
270
271 @noindent
272 This will create two staves inside the current staff group
273 (usually a @code{PianoStaff}), called @code{"up"} and
274 @code{"down"}.  The lower staff will be in the bass clef by default.
275 The autochanger switches on the basis of the pitch (middle@tie{}C is the
276 turning point), and it looks ahead skipping over rests to switch
277 in advance.
278
279 @lilypond[quote,verbatim]
280 \new PianoStaff {
281   \autochange {
282     g4 a b c'
283     d'4 r a g
284   }
285 }
286 @end lilypond
287
288 @cindex relative music and autochange
289 @cindex autochange and relative music
290
291 @funindex \relative
292 @funindex relative
293
294 A @code{\relative} section that is outside of @code{\autochange}
295 has no effect on the pitches of the music, so if necessary, put
296 @code{\relative} inside @code{\autochange}.
297
298 If additional control is needed over the individual staves, they
299 can be created manually with the names @code{"up"} and
300 @code{"down"}.  The @code{\autochange} command will then switch
301 its voice between the existing staves.
302
303 @warning{If staves are created manually, they @emph{must} be named
304 @code{"up"} and @code{"down"}.}
305
306 For example, staves must be created manually in order to place a
307 key signature in the lower staff:
308
309 @lilypond[quote,verbatim]
310 \new PianoStaff <<
311   \new Staff = "up" {
312     \new Voice = "melOne" {
313       \key g \major
314       \autochange \relative c' {
315         g8 b a c b d c e
316         d8 r fis, g a2
317       }
318     }
319   }
320   \new Staff = "down" {
321     \key g \major
322     \clef bass
323   }
324 >>
325 @end lilypond
326
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
341 @cindex chords, splitting across staves with \autochange
342
343 The staff switches may not end up in optimal places.  For high
344 quality output, staff switches should be specified manually.
345
346 Chords will not be split across the staves; they will be assigned to a
347 staff based on the first note named in the chord construct.
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
395 @seealso
396 Snippets:
397 @rlsr{Keyboards}.
398
399 Internals Reference:
400 @rinternals{Note_head_line_engraver},
401 @rinternals{VoiceFollower}.
402
403
404 @node Cross-staff stems
405 @unnumberedsubsubsec Cross-staff stems
406
407 @cindex cross-staff notes
408 @cindex cross staff notes
409 @cindex notes, cross-staff
410 @cindex cross-staff stems
411 @cindex cross staff stems
412 @cindex stems, cross-staff
413 @cindex chords, cross-staff
414 @cindex cross-staff chords
415 @cindex cross staff chords
416
417 @funindex Stem
418 @funindex cross-staff
419 @funindex length
420 @funindex flag-style
421
422 Chords that cross staves may be produced:
423
424 @lilypond[verbatim,quote]
425 \new PianoStaff <<
426   \new Staff {
427     \relative c' {
428       f8 e4 d8 d f e4
429     }
430   }
431   \new Staff {
432     \relative c' {
433       << {
434         \clef bass
435         % stems may overlap the other staff
436         \override Stem #'cross-staff = ##t
437         % extend the stems to reach the other staff
438         \override Stem #'length = #12
439         % do not print extra flags
440         \override Flag #'style = #'no-flag
441         % prevent beaming as needed
442         a8 g4 f8 f bes\noBeam g4
443       }
444       \\
445       {
446         f,2 bes4 c
447       } >>
448     }
449   }
450 >>
451 @end lilypond
452
453 @snippets
454 @lilypondfile[verbatim,quote,texidoc,doctitle]
455 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
456
457
458 @seealso
459 Snippets:
460 @rlsr{Keyboards}.
461
462 Internals Reference:
463 @rinternals{Stem}.
464
465
466 @node Piano
467 @subsection Piano
468
469 This section discusses notation issues that relate most directly to the
470 piano.
471
472 @menu
473 * Piano pedals::
474 @end menu
475
476 @node Piano pedals
477 @unnumberedsubsubsec Piano pedals
478
479 @cindex piano pedals
480 @cindex pedals, piano
481 @cindex sustain pedal
482 @cindex pedal, sustain
483 @cindex sostenuto pedal
484 @cindex pedal, sostenuto
485 @cindex una corda
486 @cindex tre corde
487 @cindex sos.
488 @cindex U.C.
489
490 @funindex \sustainOn
491 @funindex sustainOn
492 @funindex \sustainOff
493 @funindex sustainOff
494 @funindex \sostenutoOn
495 @funindex sostenutoOn
496 @funindex \sostenutoOff
497 @funindex sostenutoOff
498 @funindex \unaCorda
499 @funindex unaCorda
500 @funindex \treCorde
501 @funindex treCorde
502
503 Pianos generally have three pedals that alter the way sound is
504 produced: @notation{sustain}, @notation{sostenuto}
505 (@notation{sos.}), and @notation{una corda} (@notation{U.C.}).
506 Sustain pedals are also found on vibraphones and celestas.
507
508 @lilypond[quote,verbatim,relative=2]
509 c4\sustainOn d e g
510 <c, f a>1\sustainOff
511 c4\sostenutoOn e g c,
512 <bes d f>1\sostenutoOff
513 c4\unaCorda d e g
514 <d fis a>1\treCorde
515 @end lilypond
516
517 @cindex pedal indication styles
518 @cindex pedal indication, text
519 @cindex pedal indication, bracket
520 @cindex pedal indication, mixed
521 @cindex pedal sustain style
522 @cindex sustain pedal style
523
524 @funindex pedalSustainStyle
525 @funindex mixed
526 @funindex bracket
527 @funindex text
528
529 There are three styles of pedal indications: text, bracket, and mixed.
530 The sustain pedal and the una corda pedal use the text style by default
531 while the sostenuto pedal uses mixed by default.
532
533 @lilypond[quote,verbatim,relative=2]
534 c4\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 @end lilypond
543
544 The placement of the pedal commands matches the physical movement of the
545 sustain pedal during piano performance.  Pedalling to the final bar line
546 is indicated by omitting the final pedal off command.
547
548 Pedal indications may be placed in a @code{Dynamics} context,
549 which aligns them on a horizontal line.
550
551 @seealso
552 Notation Reference:
553 @ref{Ties}.
554
555 Snippets:
556 @rlsr{Keyboards}.
557
558 Internals Reference:
559 @rinternals{SustainPedal},
560 @rinternals{SustainPedalLineSpanner},
561 @rinternals{SustainEvent},
562 @rinternals{SostenutoPedal},
563 @rinternals{SostenutoPedalLineSpanner},
564 @rinternals{SostenutoEvent},
565 @rinternals{UnaCordaPedal},
566 @rinternals{UnaCordaPedalLineSpanner},
567 @rinternals{UnaCordaEvent},
568 @rinternals{PianoPedalBracket},
569 @rinternals{Piano_pedal_engraver}.
570
571
572 @node Accordion
573 @subsection Accordion
574
575 @cindex accordion
576
577 This section discusses notation that is unique to the accordion.
578
579 @menu
580 * Discant symbols::
581 @end menu
582
583 @node Discant symbols
584 @unnumberedsubsubsec Discant symbols
585
586 @cindex accordion discant symbols
587 @cindex discant symbols, accordion
588 @cindex accordion shifts
589 @cindex accordion shift symbols
590
591 Accordions are often built with more than one set of reeds that may be
592 in unison with, an octave above, or an octave below the written pitch.
593 Each accordion maker has different names for the @notation{shifts} that
594 select the various reed combinations, such as @notation{oboe},
595 @notation{musette}, or @notation{bandonium}, so a system of symbols has
596 come into use to simplify the performance instructions.
597
598 @snippets
599
600 @lilypondfile[verbatim,quote,texidoc,doctitle]
601 {accordion-discant-symbols.ly}
602
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 @node Harp pedals
648 @unnumberedsubsubsec Harp pedals
649
650 @cindex harp pedals
651 @cindex harp pedal diagrams
652 @cindex pedals, harp
653 @cindex pedal diagrams, harp
654
655 Harps have seven strings per octave that may be sounded at the natural,
656 flattened, or sharpened pitch.  In lever harps, each string is adjusted
657 individually, but in pedal harps every string with the same pitch name
658 is controlled by a single pedal.  From the player's left to right, the
659 pedals are D, C, and B on the left and E, F, G, and A on the right.
660 The position of the pedals may be indicated with text marks:
661
662 @lilypond[quote,verbatim,relative=2]
663 \textLengthOn
664 cis1_\markup \concat \vcenter {
665   [D \flat C \sharp B|E \sharp F \sharp G A \flat] }
666 c!1_\markup \concat \vcenter {
667   [ C \natural ] }
668 @end lilypond
669
670 or pedal diagrams:
671
672 @lilypond[quote,verbatim,relative=2]
673 \textLengthOn
674 cis1_\markup { \harp-pedal #"^v-|vv-^" }
675 c!1_\markup { \harp-pedal #"^o--|vv-^" }
676 @end lilypond
677
678 The @code{\harp-pedal} command accepts a string of characters, where
679 @code{^} is the highest pedal position (flattened pitch), @code{-} is
680 the middle pedal position (natural pitch), @code{v} is the lowest pedal
681 position (sharpened pitch), and @code{|} is the divider.  A prefixed
682 @code{o} will circle the following pedal symbol.
683
684 @seealso
685 Notation Reference:
686 @ref{Text scripts},
687 @ref{Instrument Specific Markup}.