]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/keyboards.itely
Issue 3951: Fix broken LSR links in docs.
[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.17.6"
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 @cindex relative music and autochange
293 @cindex autochange and relative music
294
295 @funindex \relative
296 @funindex relative
297
298 A @code{\relative} section that is outside of @code{\autochange}
299 has no effect on the pitches of the music, so if necessary, put
300 @code{\relative} inside @code{\autochange}.
301
302 If additional control is needed over the individual staves, they
303 can be created manually with the names @code{"up"} and
304 @code{"down"}.  The @code{\autochange} command will then switch
305 its voice between the existing staves.
306
307 @warning{If staves are created manually, they @emph{must} be named
308 @code{"up"} and @code{"down"}.}
309
310 For example, staves must be created manually in order to place a
311 key signature in the lower staff:
312
313 @lilypond[quote,verbatim]
314 \new PianoStaff <<
315   \new Staff = "up" {
316     \new Voice = "melOne" {
317       \key g \major
318       \autochange \relative c' {
319         g8 b a c b d c e
320         d8 r fis, g a2
321       }
322     }
323   }
324   \new Staff = "down" {
325     \key g \major
326     \clef bass
327   }
328 >>
329 @end lilypond
330
331 @seealso
332 Notation Reference:
333 @ref{Changing staff manually}.
334
335 Snippets:
336 @rlsr{Keyboards}.
337
338 Internals Reference:
339 @rinternals{AutoChangeMusic}.
340
341
342 @knownissues
343 @cindex chords, splitting across staves with \autochange
344
345 The staff switches may not end up in optimal places.  For high
346 quality output, staff switches should be specified manually.
347
348 Chords will not be split across the staves; they will be assigned to a
349 staff based on the first note named in the chord construct.
350
351
352 @node Staff-change lines
353 @unnumberedsubsubsec Staff-change lines
354
355 @cindex staff-change line
356 @cindex staff change line
357 @cindex cross-staff line
358 @cindex cross staff line
359 @cindex line, staff-change follower
360 @cindex line, cross-staff
361 @cindex line, staff-change
362 @cindex follow voice
363 @cindex voice, following
364 @cindex staff switching
365 @cindex cross-staff
366
367 @funindex followVoice
368 @funindex \showStaffSwitch
369 @funindex showStaffSwitch
370 @funindex \hideStaffSwitch
371 @funindex hideStaffSwitch
372
373 Whenever a voice switches to another staff, a line connecting the
374 notes can be printed automatically:
375
376 @lilypond[quote,verbatim,relative=1]
377 \new PianoStaff <<
378   \new Staff = "one" {
379     \showStaffSwitch
380     c1
381     \change Staff = "two"
382     b2 a
383   }
384   \new Staff = "two" {
385     \clef bass
386     s1*2
387   }
388 >>
389 @end lilypond
390
391
392 @predefined
393 @code{\showStaffSwitch},
394 @code{\hideStaffSwitch}.
395 @endpredefined
396
397 @seealso
398 Snippets:
399 @rlsr{Keyboards}.
400
401 Internals Reference:
402 @rinternals{Note_head_line_engraver},
403 @rinternals{VoiceFollower}.
404
405
406 @node Cross-staff stems
407 @unnumberedsubsubsec Cross-staff stems
408
409 @cindex cross-staff notes
410 @cindex cross staff notes
411 @cindex notes, cross-staff
412 @cindex cross-staff stems
413 @cindex cross staff stems
414 @cindex stems, cross-staff
415 @cindex chords, cross-staff
416 @cindex cross-staff chords
417 @cindex cross staff chords
418
419 @funindex Stem
420 @funindex \crossStaff
421 @funindex \autoBeamOff
422 @funindex Span_stem_engraver
423
424 Chords that cross staves may be produced using the
425 @code{Span_stem_engraver}. Care must be taken to ensure that
426 automatic beams do not beam the notes on one staff when it’s not
427 required on the other.
428
429 @lilypondfile[verbatim,quote]
430 {cross-staff-stems.ly}
431
432 For the time being, this engraver can not be specified by its name in
433 double quotes, but rather prefixing its name with a hash symbol
434 @code{#}, due to the way it is implemented.
435
436 @snippets
437 @lilypondfile[verbatim,quote,texidoc,doctitle]
438 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
439
440 @seealso
441 Snippets:
442 @rlsr{Keyboards}.
443
444 Internals Reference:
445 @rinternals{Stem}.
446
447
448 @node Piano
449 @subsection Piano
450
451 This section discusses notation issues that relate most directly to the
452 piano.
453
454 @menu
455 * Piano pedals::
456 @end menu
457
458 @node Piano pedals
459 @unnumberedsubsubsec Piano pedals
460
461 @cindex piano pedals
462 @cindex pedals, piano
463 @cindex sustain pedal
464 @cindex pedal, sustain
465 @cindex sostenuto pedal
466 @cindex pedal, sostenuto
467 @cindex una corda
468 @cindex tre corde
469 @cindex sos.
470 @cindex U.C.
471
472 @funindex \sustainOn
473 @funindex sustainOn
474 @funindex \sustainOff
475 @funindex sustainOff
476 @funindex \sostenutoOn
477 @funindex sostenutoOn
478 @funindex \sostenutoOff
479 @funindex sostenutoOff
480 @funindex \unaCorda
481 @funindex unaCorda
482 @funindex \treCorde
483 @funindex treCorde
484
485 Pianos generally have three pedals that alter the way sound is
486 produced: @notation{sustain}, @notation{sostenuto}
487 (@notation{sos.}), and @notation{una corda} (@notation{U.C.}).
488 Sustain pedals are also found on vibraphones and celestas.
489
490 @lilypond[quote,verbatim,relative=2]
491 c4\sustainOn d e g
492 <c, f a>1\sustainOff
493 c4\sostenutoOn e g c,
494 <bes d f>1\sostenutoOff
495 c4\unaCorda d e g
496 <d fis a>1\treCorde
497 @end lilypond
498
499 @cindex pedal indication styles
500 @cindex pedal indication, text
501 @cindex pedal indication, bracket
502 @cindex pedal indication, mixed
503 @cindex pedal sustain style
504 @cindex sustain pedal style
505
506 @funindex pedalSustainStyle
507 @funindex mixed
508 @funindex bracket
509 @funindex text
510
511 There are three styles of pedal indications: text, bracket, and mixed.
512 The sustain pedal and the una corda pedal use the text style by default
513 while the sostenuto pedal uses mixed by default.
514
515 @lilypond[quote,verbatim,relative=2]
516 c4\sustainOn g c2\sustainOff
517 \set Staff.pedalSustainStyle = #'mixed
518 c4\sustainOn g c d
519 d\sustainOff\sustainOn g, c2\sustainOff
520 \set Staff.pedalSustainStyle = #'bracket
521 c4\sustainOn g c d
522 d\sustainOff\sustainOn g, c2
523 \bar "|."
524 @end lilypond
525
526 The placement of the pedal commands matches the physical movement of the
527 sustain pedal during piano performance.  Pedalling to the final bar line
528 is indicated by omitting the final pedal off command.
529
530 Pedal indications may be placed in a @code{Dynamics} context,
531 which aligns them on a horizontal line.
532
533 @seealso
534 Notation Reference:
535 @ref{Ties}.
536
537 Snippets:
538 @rlsr{Keyboards}.
539
540 Internals Reference:
541 @rinternals{SustainPedal},
542 @rinternals{SustainPedalLineSpanner},
543 @rinternals{SustainEvent},
544 @rinternals{SostenutoPedal},
545 @rinternals{SostenutoPedalLineSpanner},
546 @rinternals{SostenutoEvent},
547 @rinternals{UnaCordaPedal},
548 @rinternals{UnaCordaPedalLineSpanner},
549 @rinternals{UnaCordaEvent},
550 @rinternals{PianoPedalBracket},
551 @rinternals{Piano_pedal_engraver}.
552
553
554 @node Accordion
555 @subsection Accordion
556
557 @cindex accordion
558
559 This section discusses notation that is unique to the accordion.
560
561 @menu
562 * Discant symbols::
563 @end menu
564
565 @node Discant symbols
566 @unnumberedsubsubsec Discant symbols
567
568 @cindex accordion discant symbols
569 @cindex discant symbols, accordion
570 @cindex accordion shifts
571 @cindex accordion shift symbols
572
573 Accordions are often built with more than one set of reeds that may be
574 in unison with, an octave above, or an octave below the written pitch.
575 Each accordion maker has different names for the @notation{shifts} that
576 select the various reed combinations, such as @notation{oboe},
577 @notation{musette}, or @notation{bandonium}, so a system of symbols has
578 come into use to simplify the performance instructions.
579
580 @snippets
581
582 @lilypondfile[verbatim,quote,texidoc,doctitle]
583 {accordion-registers.ly}
584
585 @seealso
586 Snippets:
587 @rlsr{Keyboards}.
588
589
590 @node Harp
591 @subsection Harp
592
593 This section discusses notation issues that are unique to the harp.
594
595 @menu
596 * References for harps::
597 * Harp pedals::
598 @end menu
599
600 @node References for harps
601 @unnumberedsubsubsec References for harps
602 @cindex harps
603 @cindex bisbiglando
604
605 Some common characteristics of harp music are covered elsewhere:
606
607 @itemize
608
609 @item The glissando is the most characteristic harp technique,
610 @ref{Glissando}.
611
612 @item A @notation{bisbigliando} is written as a tremelo @ref{Tremolo
613 repeats}.
614
615 @item Natural harmonics are covered under @ref{Harmonics}.
616
617 @item For directional arpeggios and non-arpeggios, see @ref{Arpeggio}.
618
619 @end itemize
620
621 @seealso
622 Notation Reference:
623 @ref{Tremolo repeats},
624 @ref{Glissando},
625 @ref{Arpeggio},
626 @ref{Harmonics}.
627
628
629 @node Harp pedals
630 @unnumberedsubsubsec Harp pedals
631
632 @cindex harp pedals
633 @cindex harp pedal diagrams
634 @cindex pedals, harp
635 @cindex pedal diagrams, harp
636
637 Harps have seven strings per octave that may be sounded at the natural,
638 flattened, or sharpened pitch.  In lever harps, each string is adjusted
639 individually, but in pedal harps every string with the same pitch name
640 is controlled by a single pedal.  From the player's left to right, the
641 pedals are D, C, and B on the left and E, F, G, and A on the right.
642 The position of the pedals may be indicated with text marks:
643
644 @lilypond[quote,verbatim,relative=2]
645 \textLengthOn
646 cis1_\markup \concat \vcenter {
647   [D \flat C \sharp B|E \sharp F \sharp G A \flat] }
648 c!1_\markup \concat \vcenter {
649   [ C \natural ] }
650 @end lilypond
651
652 or pedal diagrams:
653
654 @lilypond[quote,verbatim,relative=2]
655 \textLengthOn
656 cis1_\markup { \harp-pedal #"^v-|vv-^" }
657 c!1_\markup { \harp-pedal #"^o--|vv-^" }
658 @end lilypond
659
660 The @code{\harp-pedal} command accepts a string of characters, where
661 @code{^} is the highest pedal position (flattened pitch), @code{-} is
662 the middle pedal position (natural pitch), @code{v} is the lowest pedal
663 position (sharpened pitch), and @code{|} is the divider.  A prefixed
664 @code{o} will circle the following pedal symbol.
665
666 @seealso
667 Notation Reference:
668 @ref{Text scripts},
669 @ref{Instrument Specific Markup}.