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