]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/keyboards.itely
dc53ba3db28adc65a73919ec77ccc3cb49e277ea
[lilypond.git] / Documentation / user / 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.  See TRANSLATION for details.
7 @end ignore
8
9 @c \version "2.11.61"
10
11 @node Keyboard and other multi-staff instruments
12 @section Keyboard and other multi-staff instruments
13
14 @lilypondfile[quote]{keyboard-headword.ly}
15
16 This section discusses several aspects of music notation that are
17 unique to keyboard instruments and other instruments notated on
18 many staves, such as harps and vibraphones.  For the purposes of
19 this section this entire group of multi-staff instruments is called
20 @qq{keyboards} for short, even though some of them do not have a
21 keyboard.
22
23 @menu
24 * Common notation for keyboards::
25 * Piano::
26 * Accordion::
27 * Harp::
28 @end menu
29
30 @node Common notation for keyboards
31 @subsection Common notation for keyboards
32
33 This section discusses notation issues that may arise for most
34 many-stringed instruments.
35
36 @menu
37 * References for keyboards::
38 * Changing staff manually::
39 * Changing staff automatically::
40 * Staff-change lines::
41 * Cross-staff stems::
42 @end menu
43
44 @node References for keyboards
45 @unnumberedsubsubsec References for keyboards
46
47 @cindex piano staves
48 @cindex staves, piano
49 @cindex staves, keyboard instruments
50 @cindex staves, keyed instruments
51 @cindex keyboard instrument staves
52 @cindex keyed instrument staves
53
54 @funindex PianoStaff
55
56 Keyboard instruments are usually notated with Piano staves.  These
57 are two or more normal staves coupled with a brace.  The same
58 notation is also used for other keyed instruments.
59 Organ music is normally written with two staves inside a
60 @code{PianoStaff} group and third, normal staff for the pedals.
61
62 The staves in keyboard music are largely independent, but
63 sometimes voices can cross between the two staves.  This
64 section discusses notation techniques particular to keyboard
65 music.
66
67 Several common issues in keyboard music are covered elsewhere:
68
69 @itemize
70
71 @item Keyboard music usually contains multiple voices and the
72 number of voices may change regularly; this is described in
73 @ref{Collision resolution}.
74
75 @item Keyboard music can be written in parallel, as described in
76 @ref{Writing music in parallel}.
77
78 @item Fingerings are indicated with @ref{Fingering instructions}.
79
80 @item Organ pedal indications are inserted as articulations, see
81 @ref{List of articulations}.
82
83 @item Vertical grid lines can be shown with @ref{Grid lines}.
84
85 @item Keyboard music often contains @notation{Laissez vibrer} ties
86 as well as ties on arpeggios and tremolos, described in
87 @ref{Ties}.
88
89 @item Placing arpeggios across multiple voices and staves is
90 covered in @ref{Arpeggio}.
91
92 @item Tremolo marks are described in @ref{Tremolo repeats}.
93
94 @item Several of the tweaks that can occur in keyboard music are
95 demonstrated in @rlearning{Real music example}.
96
97 @item Hidden notes can be used to produce ties that cross voices,
98 as shown in @rlearning{Other uses for tweaks}.
99
100 @end itemize
101
102 @seealso
103
104 Learning Manual:
105 @rlearning{Real music example},
106 @rlearning{Other uses for tweaks}.
107
108 Notation Reference:
109 @ref{Grouping staves},
110 @ref{Instrument names},
111 @ref{Collision resolution},
112 @ref{Writing music in parallel},
113 @ref{Fingering instructions},
114 @ref{List of articulations},
115 @ref{Grid lines},
116 @ref{Ties},
117 @ref{Arpeggio},
118 @ref{Tremolo repeats}.
119
120 Internals Reference:
121 @rinternals{PianoStaff}.
122
123 Snippets:
124 @rlsr{Keyboards}.
125
126 @knownissues
127
128 @cindex keyboard music, centering dynamics
129 @cindex dynamics, centered in keyboard music
130 @cindex piano music, centering dynamics
131 @cindex centered dynamics in piano music
132 @funindex staff-padding
133
134 Dynamics are not automatically centered, but workarounds do exist.  One
135 option is the @q{piano centered dynamics} template under
136 @rlearning{Piano templates}; another option is to increase the
137 @code{staff-padding} of dynamics as discussed in @rlearning{Moving
138 objects}.
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 Cross-staff notes are beamed automatically:
167
168 @lilypond[verbatim,quote]
169 \new PianoStaff <<
170   \new Staff = "up" {
171     <e' c'>8
172     \change Staff = "down"
173     g8 fis g
174     \change Staff = "up"
175     <g'' c''>8
176     \change Staff = "down"
177     e8 dis e
178     \change Staff = "up"
179   }
180   \new Staff = "down" {
181     \clef bass
182     % keep staff alive
183     s1
184   }
185 >>
186 @end lilypond
187
188 If the beaming needs to be tweaked, make any changes to the stem
189 directions first.  The beam positions are then measured from the
190 center of the staff that is closest to the beam.  For a simple
191 example of beam tweaking, see @rlearning{Fixing overlapping
192 notation}.
193
194 @seealso
195
196 Learning Manual:
197 @rlearning{Fixing overlapping notation}.
198
199 Notation Reference:
200 @ref{Stems},
201 @ref{Automatic beams}.
202
203 Snippets:
204 @rlsr{Keyboards}.
205
206 Internals Reference:
207 @rinternals{Beam},
208 @rinternals{ContextChange}.
209
210
211 @node Changing staff automatically
212 @unnumberedsubsubsec Changing staff automatically
213
214 @cindex changing staff automatically
215 @cindex automatic staff changes
216 @cindex staff changes, automatic
217
218 @funindex \autochange
219 @funindex autochange
220 @funindex PianoStaff
221
222 Voices can be made to switch automatically between the top and the
223 bottom staff.  The syntax for this is
224
225 @example
226 \autochange @dots{}@var{music}@dots{}
227 @end example
228
229 @noindent
230 This will create two staves inside the current staff group
231 (usually a @code{PianoStaff}), called @code{"up"} and
232 @code{"down"}.  The lower staff will be in the bass clef by default.
233 The autochanger switches on the basis of the pitch (middle@tie{}C is the
234 turning point), and it looks ahead skipping over rests to switch
235 in advance.
236
237 @lilypond[quote,verbatim]
238 \new PianoStaff {
239   \autochange {
240     g4 a b c'
241     d'4 r a g
242   }
243 }
244 @end lilypond
245
246 @cindex relative music and autochange
247 @cindex autochange and relative music
248
249 @funindex \relative
250 @funindex relative
251
252 A @code{\relative} section that is outside of @code{\autochange}
253 has no effect on the pitches of the music, so if necessary, put
254 @code{\relative} inside @code{\autochange}.
255
256 If additional control is needed over the individual staves, they
257 can be created manually with the names @code{"up"} and
258 @code{"down"}.  The @code{\autochange} command will then switch
259 its voice between the existing staves.  For example, this is
260 necessary to place a key signature in the lower staff:
261
262 @lilypond[quote,verbatim]
263 \new PianoStaff <<
264   \new Staff = "up" {
265     \new Voice = "melOne" {
266       \key g \major
267       \autochange \relative c' {
268         g8 b a c b d c e
269         d8 r fis, g a2
270       }
271     }
272   }
273   \new Staff = "down" {
274     \key g \major
275     \clef bass
276   }
277 >>
278 @end lilypond
279
280 @seealso
281
282 Notation Reference:
283 @ref{Changing staff manually}.
284
285 Snippets:
286 @rlsr{Keyboards}.
287
288 Internals Reference:
289 @rinternals{AutoChangeMusic}.
290
291 @knownissues
292
293 @cindex chords, splitting across staves with \autochange
294
295 The staff switches may not end up in optimal places.  For high
296 quality output, staff switches should be specified manually.
297
298 Chords will not be split across the staves; they will be assigned to a
299 staff based on the first note named in the chord construct.
300
301 @node Staff-change lines
302 @unnumberedsubsubsec Staff-change lines
303
304 @cindex staff-change line
305 @cindex staff change line
306 @cindex cross-staff line
307 @cindex cross staff line
308 @cindex line, staff-change follower
309 @cindex line, cross-staff
310 @cindex line, staff-change
311 @cindex follow voice
312 @cindex voice, following
313 @cindex staff switching
314 @cindex cross-staff
315
316 @funindex followVoice
317 @funindex \showStaffSwitch
318 @funindex showStaffSwitch
319 @funindex \hideStaffSwitch
320 @funindex hideStaffSwitch
321
322 Whenever a voice switches to another staff, a line connecting the
323 notes can be printed automatically:
324
325 @lilypond[quote,verbatim,relative=1]
326 \new PianoStaff <<
327   \new Staff = "one" {
328     \showStaffSwitch
329     c1
330     \change Staff = "two"
331     b2 a
332   }
333   \new Staff = "two" {
334     \clef bass
335     s1*2
336   }
337 >>
338 @end lilypond
339
340
341 @predefined
342 @code{\showStaffSwitch},
343 @code{\hideStaffSwitch}.
344 @endpredefined
345
346
347 @seealso
348
349 Snippets:
350 @rlsr{Keyboards}.
351
352 Internals Reference:
353 @rinternals{Note_head_line_engraver},
354 @rinternals{VoiceFollower}.
355
356
357 @node Cross-staff stems
358 @unnumberedsubsubsec Cross-staff stems
359
360 @cindex cross-staff notes
361 @cindex cross staff notes
362 @cindex notes, cross-staff
363 @cindex cross-staff stems
364 @cindex cross staff stems
365 @cindex stems, cross-staff
366 @cindex chords, cross-staff
367 @cindex cross-staff chords
368 @cindex cross staff chords
369
370 @funindex Stem
371 @funindex cross-staff
372 @funindex length
373 @funindex flag-style
374
375 Chords that cross staves may be produced:
376
377 @lilypond[verbatim,quote]
378 \new PianoStaff <<
379   \new Staff {
380     \relative c' {
381       f8 e4 d8 d f e4
382     }
383   }
384   \new Staff {
385     \relative c' {
386       << {
387         \clef bass
388         % stems may overlap the other staff
389         \override Stem #'cross-staff = ##t
390         % extend the stems to reach other other staff
391         \override Stem #'length = #12
392         % do not print extra flags
393         \override Stem #'flag-style = #'no-flag
394         % prevent beaming as needed
395         a8 g4 f8 f bes\noBeam g4
396       }
397       \\
398       {
399         f,2 bes4 c
400       } >>
401     }
402   }
403 >>
404 @end lilypond
405
406 @snippets
407 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
408 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
409
410 @seealso
411
412 Snippets:
413 @rlsr{Keyboards}.
414
415 Internals Reference:
416 @rinternals{Stem}.
417
418 @node Piano
419 @subsection Piano
420
421 This section discusses notation issues that relate most directly to the
422 piano.
423
424 @menu
425 * Piano pedals::
426 @end menu
427
428 @node Piano pedals
429 @unnumberedsubsubsec Piano pedals
430
431 @cindex piano pedals
432 @cindex pedals, piano
433 @cindex sustain pedal
434 @cindex pedal, sustain
435 @cindex sostenuto pedal
436 @cindex pedal, sostenuto
437 @cindex una corda
438 @cindex tre corde
439 @cindex sos.
440 @cindex U.C.
441
442 @funindex \sustainOn
443 @funindex sustainOn
444 @funindex \sustainOff
445 @funindex sustainOff
446 @funindex \sostenutoOn
447 @funindex sostenutoOn
448 @funindex \sostenutoOff
449 @funindex sostenutoOff
450 @funindex \unaCorda
451 @funindex unaCorda
452 @funindex \treCorde
453 @funindex treCorde
454
455 Pianos generally have three pedals that alter the way sound is
456 produced: @notation{sustain}, @notation{sostenuto}
457 (@notation{sos.}), and @notation{una corda} (@notation{U.C.}).
458 Sustain pedals are also found on vibraphones and celestas.
459
460 @lilypond[quote,verbatim,relative=2]
461 c4\sustainOn d e g
462 <c, f a>1\sustainOff
463 c4\sostenutoOn e g c,
464 <bes d f>1\sostenutoOff
465 c4\unaCorda d e g
466 <d fis a>1\treCorde
467 @end lilypond
468
469 @cindex pedal indication styles
470 @cindex pedal indication, text
471 @cindex pedal indication, bracket
472 @cindex pedal indication, mixed
473 @cindex pedal sustain style
474 @cindex sustain pedal style
475
476 @funindex pedalSustainStyle
477 @funindex mixed
478 @funindex bracket
479 @funindex text
480
481 There are three styles of pedal indications: text, bracket, and mixed.
482 The sustain pedal and the una corda pedal use the text style by default
483 while the sostenuto pedal uses mixed by default.
484
485 @lilypond[quote,verbatim,relative=2]
486 c4\sustainOn g c2\sustainOff
487 \set Staff.pedalSustainStyle = #'mixed
488 c4\sustainOn g c d
489 d\sustainOff\sustainOn g, c2\sustainOff
490 \set Staff.pedalSustainStyle = #'bracket
491 c4\sustainOn g c d
492 d\sustainOff\sustainOn g, c2
493 \bar "|."
494 @end lilypond
495
496 The placement of the pedal commands matches the physical movement of the
497 sustain pedal during piano performance.  Pedalling to the final bar line
498 is indicated by omitting the final pedal up command.
499
500 @seealso
501
502 Notation Reference:
503 @ref{Ties}.
504
505 Snippets:
506 @rlsr{Keyboards}.
507
508 Internals Reference:
509 @rinternals{SustainPedal},
510 @rinternals{SustainPedalLineSpanner},
511 @rinternals{SustainEvent},
512 @rinternals{SostenutoPedal},
513 @rinternals{SostenutoPedalLineSpanner},
514 @rinternals{SostenutoEvent},
515 @rinternals{UnaCordaPedal},
516 @rinternals{UnaCordaPedalLineSpanner},
517 @rinternals{UnaCordaEvent},
518 @rinternals{PianoPedalBracket},
519 @rinternals{Piano_pedal_engraver}.
520
521 @node Accordion
522 @subsection Accordion
523
524 @cindex accordion
525
526 This section discusses notation that is unique to the accordion.
527
528 @menu
529 * Discant symbols::
530 @end menu
531
532 @node Discant symbols
533 @unnumberedsubsubsec Discant symbols
534
535 @cindex accordion discant symbols
536 @cindex discant symbols, accordion
537 @cindex accordion shifts
538 @cindex accordion shift symbols
539
540 Accordions are often built with more than one set of reeds that may be
541 in unison with, an octave above, or an octave below the written pitch.
542 Each accordion maker has different names for the @notation{shifts} that
543 select the various reed combinations, such as @notation{oboe},
544 @notation{musette}, or @notation{bandonium}, so a system of symbols has
545 come into use to simplify the performance instructions.
546
547 @snippets
548
549 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
550 {accordion-discant-symbols.ly}
551
552 @seealso
553
554 Snippets:
555 @rlsr{Keyboards}.
556
557
558 @node Harp
559 @subsection Harp
560
561 TBC
562
563 @ignore
564 Some possibilities:
565 - glissandi
566 - tremolo (for bisbigliando)
567 - natural harmonics
568 - directional arpeggio and non-arpeggio
569 - workaroung for keeping both staves visible in an orchestral
570   score,
571 http://lists.gnu.org/archive/html/lilypond-user/2007-08/msg00386.html
572 and http://lsr.dsi.unimi.it/LSR/Item?u=1&id=312
573
574 An LSR snippet could be used to demonstrate the main items; in the
575 case of glissandi, it would be desirable to have a demonstration
576 of different styles.
577
578 @end ignore
579