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