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