]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/keyboards.itely
Other half of Keyboard update from Andrew.
[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.38"
10
11 @c "I have finished the first draft." -AH
12
13 @node Keyboard instruments
14 @section Keyboard instruments
15
16 @lilypondfile[quote]{keyboard-headword.ly}
17
18 FIXME add sentence
19
20 @menu
21 * Common notation for keyboards::
22 * Piano::
23 * Accordion::
24 @end menu
25
26 @node Common notation for keyboards
27 @subsection Common notation for keyboards
28
29 FIXME add sentence
30
31 @menu
32 * References for keyboards::
33 * Changing staff manually::
34 * Changing staff automatically::
35 * Staff-change lines::
36 * Cross-staff stems::
37 @end menu
38
39 @node References for keyboards
40 @subsubsection References for keyboards
41
42 Keyboard instruments are usually notated with Piano staves.  These
43 are two or more normal staves coupled with a brace.  The same
44 notation is also used for harps and other keyed instruments.
45 Organ music is normally written with two staves inside a
46 @code{PianoStaff} group and third, normal staff for the pedals.
47
48 The staves in keyboard music are largely independent, but
49 sometimes voices can cross between the two staves.  In this
50 section we discuss some notation techniques particular to keyboard
51 music.
52
53 Several common issues in keyboard music are covered elsewhere:
54
55 @itemize
56 @item Keyboard music usually contains multiple voices and the
57 number of voices may change regularly; this is described in
58 @ref{Collision resolution}.
59
60 @item Keyboard music can be written in parallel, as described in
61 @ref{Writing music in parallel}.
62
63 @item Fingerings are indicated with @ref{Fingering instructions}.
64
65 @item Organ pedal indications are inserted as articulations, see
66 @ref{List of articulations}.
67
68 @item Vertical grid lines can be shown with @ref{Grid lines}.
69
70 @item Keyboard music often contains @notation{Laissez vibrer} ties
71 as well as ties on arpeggios and tremelos, described in
72 @ref{Ties}.
73
74 @item Placing arpeggios across multiple voices and staves is
75 covered in @ref{Arpeggio}.
76
77 @item Tremolo marks are described in @ref{Tremolo repeats}.
78
79 @item Several of the tweaks that can occur in keyboard music are
80 demonstrated in @rlearning{Real music example}.
81
82 @item Hidden notes can be used to produce ties that cross voices,
83 as shown in @rlearning{Other uses for tweaks}.
84
85 @end itemize
86
87 @c @snippets
88 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
89 @c {creating-slurs-across-voices.ly}
90
91 @seealso
92
93 Learning Manual:
94 @rlearning{Real music example},
95 @rlearning{Other uses for tweaks}.
96
97 Notation Reference:
98 @ref{Grouping staves},
99 @ref{Instrument names},
100 @ref{Writing music in parallel},
101 @ref{Fingering instructions},
102 @ref{Grid lines},
103 @ref{Ties},
104 @ref{Arpeggio},
105 @ref{Tremolo repeats},
106 @ref{List of articulations}.
107
108 Internals Reference:
109 @rinternals{PianoStaff}.
110
111 Snippets:
112 @rlsr{Keyboards}.
113
114 @knownissues
115
116 Dynamics are not automatically centered, but workarounds do exist.  One
117 option is the @q{piano centered dynamics} template under
118 @rlearning{Piano templates}; another option is to add dynamics
119 normally and then increase their staff-paddingm as discussed in
120 @rlearning{Moving objects}.
121
122 @node Changing staff manually
123 @subsubsection Changing staff manually
124
125 @cindex changing staff manually
126 @cindex manual staff changes
127 @cindex staff changes, manual
128 @cindex cross-staff notes
129 @cindex notes, cross-staff
130 @cindex cross-staff beams
131 @cindex beams, cross-staff
132 @funindex \change
133
134 Voices can be switched between staves manually, using the command
135
136 @example
137 \change Staff = @var{staffname}
138 @end example
139
140 @noindent
141 The string @var{staffname} is the name of the staff.  It switches
142 the current voice from its current staff to the Staff called
143 @var{staffname}.  Typical values for @var{staffname} are
144 @code{"up"} and @code{"down"}, or @code{"RH"} and @code{"LH"}.
145
146 Cross-staff notes are beamed automatically:
147
148 @lilypond[verbatim,quote,ragged-right]
149 \new PianoStaff <<
150   \new Staff = "up" {
151     <e' c'>8
152     \change Staff = down
153     g fis g
154     \change Staff = up
155     <g'' c''>8
156     \change Staff = down
157     e dis e
158     \change Staff = up
159   }
160   \new Staff = "down" {
161     \clef bass
162     s1 % keep staff alive
163   }
164 >>
165 @end lilypond
166
167 If the beaming needs to be tweaked, make any changes to the stem
168 directions first.  The beam positions are then measured from the
169 center of the staff that is closest to the beam.  For a simple
170 example of beam tweaking, see @rlearning{Fixing overlapping
171 notation}.
172
173 @seealso
174
175 Learning Manual:
176 @rlearning{Fixing overlapping notation}.
177
178 Notation Reference:
179 @ruser{Stems},
180 @ruser{Automatic beams}.
181
182 Snippets:
183 @rlsr{Keyboards}.
184
185 Internals Reference:
186 @rinternals{Beam}.
187
188
189 @node Changing staff automatically
190 @subsubsection Changing staff automatically
191
192 @cindex changing staff automatically
193 @cindex automatic staff changes
194 @cindex staff changes, automatic
195 @funindex \autochange
196
197 Voices can be made to switch automatically between the top and the
198 bottom staff.  The syntax for this is
199
200 @example
201 \autochange @dots{}@var{music}@dots{}
202 @end example
203
204 @noindent
205 This will create two staves inside the current staff group
206 (usually a @code{PianoStaff}), called @code{"up"} and
207 @code{"down"}.  The lower staff will be in bass clef by default.
208 The autochanger switches on basis of the pitch (middle C is the
209 turning point), and it looks ahead skipping over rests to switch
210 in advance.
211
212 @lilypond[quote,verbatim,ragged-right]
213 \new PianoStaff {
214   \autochange {
215     g4 a b c' d' r4 a g
216   }
217 }
218 @end lilypond
219
220 A @code{\relative} section that is outside of @code{\autochange}
221 has no effect on the pitches of the music, so if necessary, put
222 @code{\relative} inside @code{\autochange}.
223
224 If additional control is needed over the individual staves, they
225 can be created manually with the names @code{"up"} and
226 @code{"down"}.  The @code{\autochange} command will then switch
227 its voice between the existing staves.  For example, this is
228 necessary to place a key signature in the lower staff:
229
230 @lilypond[quote,verbatim,ragged-right]
231 \new PianoStaff <<
232   \new Staff = "up" {
233     \new Voice = "melOne" {
234       \key g \major
235       \autochange \relative c' {
236         g8 b a c b d c e
237         d r fis, g a2
238       }
239     }
240   }
241   \new Staff = "down" {
242     \key g \major
243     \clef bass
244   }
245 >>
246 @end lilypond
247
248 @seealso
249
250 Notation Reference:
251 @ref{Changing staff manually}.
252
253 Snippets:
254 @rlsr{Keyboards}.
255
256 Internals Reference:
257 @rinternals{AutoChangeMusic}.
258
259 @knownissues
260
261 The staff switches may not end up in optimal places.  For high
262 quality output, staff switches should be specified manually.
263
264 Chords will not be split across the staves; the staff will be
265 chosen by the first note named in the chord.
266
267
268 @node Staff-change lines
269 @subsubsection Staff-change lines
270
271 @cindex staff-change lines
272 @cindex cross-staff lines
273 @cindex lines, staff-change follower
274 @cindex follow voice
275 @cindex staff switching
276 @cindex cross-staff
277 @funindex followVoice
278
279 Whenever a voice switches to another staff, a line connecting the
280 notes can be printed automatically:
281
282 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
283 \new PianoStaff <<
284   \new Staff = "one" {
285     \showStaffSwitch
286     c1
287     \change Staff=two
288     b2 a
289   }
290   \new Staff = "two" { \clef bass s1*2 }
291 >>
292 @end lilypond
293
294 @predefined
295
296 @funindex \showStaffSwitch
297 @funindex \hideStaffSwitch
298 @code{\showStaffSwitch}, @code{\hideStaffSwitch}.
299
300 @seealso
301
302 Snippets:
303 @rlsr{Keyboards}.
304
305 Internals Reference:
306 @rinternals{VoiceFollower}.
307
308
309 @node Cross-staff stems
310 @subsubsection Cross-staff stems
311
312 @cindex cross-staff notes
313 @cindex notes, cross-staff
314 @cindex cross-staff stems
315 @cindex stems, cross-staff
316
317 Chords that cross staves may be produced by increasing the length
318 of the stem in the lower staff, so it reaches the stem in the upper
319 staff, or vice versa.
320
321 @lilypond[ragged-right,verbatim,quote]
322 \new PianoStaff <<
323   \new Staff \relative c' {
324     f8 e4 d8 <f bes,>2
325   }
326   \new Staff \relative c' {
327     << {
328       \clef bass
329       \stemUp
330       \override Stem #'length = #12
331       \override Stem #'cross-staff = ##t
332       \override Stem #'flag-style = #'no-flag
333       a8 g4 f8
334     } \\
335     { f,2 d' }
336     >>
337   }
338 >>
339 @end lilypond
340
341 @snippets
342 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
343 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
344
345 @seealso
346
347 Snippets:
348 @rlsr{Keyboards}.
349
350 Internals Reference:
351 @rinternals{Stem}
352
353 @node Piano
354 @subsection Piano
355
356 @menu
357 * Piano pedals::
358 @end menu
359
360 @node Piano pedals
361 @subsubsection Piano pedals
362 @cindex piano pedals
363 @cindex pedals, piano
364 @cindex sustain pedal
365 @cindex sostenuto pedal
366 @cindex una corde
367 @cindex tre corde
368 @funindex \sustainDown
369 @funindex \sustainUp
370 @funindex \sostenutoDown
371 @funindex \sostenutoUp
372 @funindex \unaCorda
373 @funindex \treCorde
374
375 Pianos generally have three pedals that alter the way sound is
376 produced: @notation{sustain}, @notation{sostenuto}
377 (@notation{sos.}), and @notation{una corde} (@notation{U.C.}).
378 Sustain pedals are also found on vibraphones and celestas.
379
380 FIXME: see policy for allowed lilypond[] options.
381 (ie use [relative=2])
382
383 @lilypond[quote,ragged-right,fragment,verbatim]
384 \relative c' {
385   c4\sustainDown d e g
386   <c, f a>1\sustainUp
387   c4\sostenutoDown e g c,
388   <bes d f>1\sostenutoUp
389   c4\unaCorda d e g
390   <d fis a>1\treCorde
391 }
392 @end lilypond
393
394 There are three styles of pedal indications: text, bracket, and mixed.
395 The sustain pedal and the una corda pedal use the text style by default
396 while the sostenuto pedal uses mixed by default.
397
398 @lilypond[quote,ragged-right,fragment,verbatim]
399 \relative c'' {
400   c4\sustainDown g c2\sustainUp
401   \set Staff.pedalSustainStyle = #'mixed
402   c4\sustainDown g c d
403   d\sustainUp\sustainDown g, c2\sustainUp
404   \set Staff.pedalSustainStyle = #'bracket
405   c4\sustainDown g c d
406   d\sustainUp\sustainDown g, c2
407   \bar "|."
408 }
409 @end lilypond
410
411 The placement of the pedal commands matches the physical movement of the
412 sustain pedal during piano performance.  Pedalling to the final barline
413 is indicated by omitting the final pedal up command.
414
415 @seealso
416
417 Notation Reference:
418 @ref{Ties}.
419
420 Snippets:
421 @rlsr{Keyboards}.
422
423 Internals Reference:
424 @rinternals{SustainPedal},
425 @rinternals{SustainPedalLineSpanner},
426 @rinternals{SostenutoPedal},
427 @rinternals{SostenutoPedalLineSpanner},
428 @rinternals{UnaCordaPedal},
429 @rinternals{UnaCordaPedalLineSpanner},
430 @rinternals{PianoPedalBracket},
431 @rinternals{Piano_pedal_engraver}.
432
433 @node Accordion
434 @subsection Accordion
435
436 FIXME add sentence
437
438 @menu
439 * Discant symbols::
440 @end menu
441
442 @node Discant symbols
443 @subsubsection Discant symbols
444 @cindex accordion discant symbols
445 @cindex discant symbols, accordion
446 @cindex accordion shifts
447
448 @c FIXME: use @notation, not @q.
449 @c FIXME: you might want to submit some of these terms to the MG.
450 @c    If so, send an email to Kurt about this.
451
452 Accordions are often built with more than one set of reeds that may be
453 in unison with, an octave above, or an octave below the written pitch.
454 Each accordian maker has different names for the @q{shifts} that
455 select the various reed combinations, such as @q{oboe}, @q{musette}, or
456 @q{bandonium}, so a system of symbols has come into use to simplify
457 the performance instructions.
458
459 @snippets
460
461 @c FIXME: invalid snippet name.  Check the GDP snippet list.
462 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
463 @c {accordion-discant-symbols.ly}
464
465 @seealso
466
467 Snippets:
468 @rlsr{Keyboards}.