]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/keyboards.itely
Merge easy parts of Keyboard.
[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 centered, but workarounds do exist.  See the
117 @q{piano centered dynamics} template in @rlearning{Piano templates}.
118
119 @c TODO Find out status of the dynamics engravers
120
121 @node Changing staff manually
122 @subsubsection Changing staff manually
123
124 @cindex changing staff manually
125 @cindex manual staff changes
126 @cindex staff changes, manual
127 @cindex cross-staff notes
128 @cindex notes, cross-staff
129 @cindex cross-staff beams
130 @cindex beams, cross-staff
131 @funindex \change
132
133 Voices can be switched between staves manually, using the command
134
135 @example
136 \change Staff = @var{staffname}
137 @end example
138
139 @noindent
140 The string @var{staffname} is the name of the staff.  It switches
141 the current voice from its current staff to the Staff called
142 @var{staffname}.  Typical values for @var{staffname} are
143 @code{"up"} and @code{"down"}, or @code{"RH"} and @code{"LH"}.
144
145 Cross-staff notes are beamed automatically:
146
147 @lilypond[verbatim,quote,ragged-right]
148 \new PianoStaff <<
149   \new Staff = "up" {
150     <e' c'>8
151     \change Staff = down
152     g fis g
153     \change Staff = up
154     <g'' c''>8
155     \change Staff = down
156     e dis e
157     \change Staff = up
158   }
159   \new Staff = "down" {
160     \clef bass
161     s1 % keep staff alive
162   }
163 >>
164 @end lilypond
165
166 If the beaming needs to be tweaked, make any changes to the stem
167 directions first.  The beam positions are then measured from the
168 center of the staff that is closest to the beam.  For a simple
169 example of beam tweaking, see @rlearning{Fixing overlapping
170 notation}.
171
172 @seealso
173
174 Learning Manual:
175 @rlearning{Fixing overlapping notation}.
176
177 Notation Reference:
178 @ruser{Stems},
179 @ruser{Automatic beams}.
180
181 Snippets:
182 @rlsr{Keyboards}.
183
184 Internals Reference:
185 @rinternals{Beam}.
186
187
188 @node Changing staff automatically
189 @subsubsection Changing staff automatically
190
191 @cindex changing staff automatically
192 @cindex automatic staff changes
193 @cindex staff changes, automatic
194 @funindex \autochange
195
196 Voices can be made to switch automatically between the top and the
197 bottom staff.  The syntax for this is
198
199 @example
200 \autochange @dots{}@var{music}@dots{}
201 @end example
202
203 @noindent
204 This will create two staves inside the current staff group
205 (usually a @code{PianoStaff}), called @code{"up"} and
206 @code{"down"}.  The lower staff will be in bass clef by default.
207 The autochanger switches on basis of the pitch (middle C is the
208 turning point), and it looks ahead skipping over rests to switch
209 in advance.
210
211 @lilypond[quote,verbatim,ragged-right]
212 \new PianoStaff {
213   \autochange {
214     g4 a b c' d' r4 a g
215   }
216 }
217 @end lilypond
218
219 A @code{\relative} section that is outside of @code{\autochange}
220 has no effect on the pitches of the music, so if necessary, put
221 @code{\relative} inside @code{\autochange}.
222
223 If additional control is needed over the individual staves, they
224 can be created manually with the names @code{"up"} and
225 @code{"down"}.  The @code{\autochange} command will then switch
226 its voice between the existing staves.  For example, this is
227 necessary to place a key signature in the lower staff:
228
229 @lilypond[quote,verbatim,ragged-right]
230 \new PianoStaff <<
231   \new Staff = "up" {
232     \new Voice = "melOne" {
233       \key g \major
234       \autochange \relative c' {
235         g8 b a c b d c e
236         d r fis, g a2
237       }
238     }
239   }
240   \new Staff = "down" {
241     \key g \major
242     \clef bass
243   }
244 >>
245 @end lilypond
246
247 @seealso
248
249 Notation Reference:
250 @ref{Changing staff manually}.
251
252 Snippets:
253 @rlsr{Keyboards}.
254
255 Internals Reference:
256 @rinternals{AutoChangeMusic}.
257
258 @knownissues
259
260 The staff switches may not end up in optimal places.  For high
261 quality output, staff switches should be specified manually.
262
263 Chords will not be split across the staves; the staff will be
264 chosen by the first note named in the chord.
265
266
267 @node Staff-change lines
268 @subsubsection Staff-change lines
269
270 @cindex staff-change lines
271 @cindex cross-staff lines
272 @cindex lines, staff-change follower
273 @cindex follow voice
274 @cindex staff switching
275 @cindex cross-staff
276 @funindex followVoice
277
278 Whenever a voice switches to another staff, a line connecting the
279 notes can be printed automatically:
280
281 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
282 \new PianoStaff <<
283   \new Staff = "one" {
284     \showStaffSwitch
285     c1
286     \change Staff=two
287     b2 a
288   }
289   \new Staff = "two" { \clef bass s1*2 }
290 >>
291 @end lilypond
292
293 @predefined
294
295 @funindex \showStaffSwitch
296 @funindex \hideStaffSwitch
297 @code{\showStaffSwitch}, @code{\hideStaffSwitch}.
298
299 @seealso
300
301 Snippets:
302 @rlsr{Keyboards}.
303
304 Internals Reference:
305 @rinternals{VoiceFollower}.
306
307
308 @node Cross-staff stems
309 @subsubsection Cross-staff stems
310
311 @cindex cross-staff notes
312 @cindex notes, cross-staff
313 @cindex cross-staff stems
314 @cindex stems, cross-staff
315
316 Chords that cross staves may be produced by increasing the length
317 of the stem in the lower staff, so it reaches the stem in the upper
318 staff, or vice versa.
319
320 @lilypond[ragged-right,verbatim,quote]
321 \new PianoStaff <<
322   \new Staff \relative c' {
323     f8 e4 d8 <f bes,>2
324   }
325   \new Staff \relative c' {
326     << {
327       \clef bass
328       \stemUp
329       \override Stem #'length = #12
330       \override Stem #'cross-staff = ##t
331       \override Stem #'flag-style = #'no-flag
332       a8 g4 f8
333     } \\
334     { f,2 d' }
335     >>
336   }
337 >>
338 @end lilypond
339
340 @snippets
341 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
342 {indicating-cross-staff-chords-with-arpeggio-bracket.ly}
343
344 @seealso
345
346 Snippets:
347 @rlsr{Keyboards}.
348
349 Internals Reference:
350 @rinternals{Stem}
351
352 @node Piano
353 @subsection Piano
354
355 FIXME add sentence
356
357 @menu
358 * Piano pedals::
359 @end menu
360
361 @node Piano pedals
362 @subsubsection Piano pedals
363 @cindex Pedals
364
365 Pianos have pedals that alter the way sound is produced.  Generally, a
366 piano has three pedals, sustain, una corda, and sostenuto.
367
368
369 Piano pedal instruction can be expressed by attaching
370 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
371 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
372 note or chord
373
374 @lilypond[quote,ragged-right,fragment,verbatim]
375 c'4\sustainDown c'4\sustainUp
376 @end lilypond
377
378 What is printed can be modified by setting @code{pedal@var{X}Strings},
379 where @var{X} is one of the pedal types: @code{Sustain},
380 @code{Sostenuto} or @code{UnaCorda}.  Refer to
381 @rinternals{SustainPedal} in the program reference for more
382 information.
383
384 Pedals can also be indicated by a sequence of brackets, by setting the
385 @code{pedalSustainStyle} property to bracket objects
386
387 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
388 \set Staff.pedalSustainStyle = #'bracket
389 c\sustainDown d e
390 b\sustainUp\sustainDown
391 b g \sustainUp a \sustainDown \bar "|."
392 @end lilypond
393
394 A third style of pedal notation is a mixture of text and brackets,
395 obtained by setting the @code{pedalSustainStyle} property to
396 @code{mixed}
397
398 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
399 \set Staff.pedalSustainStyle = #'mixed
400 c\sustainDown d e
401 b\sustainUp\sustainDown
402 b g \sustainUp a \sustainDown \bar "|."
403 @end lilypond
404
405 The default @q{*Ped.} style for sustain and damper pedals corresponds to
406 style @code{#'text}.  The sostenuto pedal uses @code{mixed} style by
407 default.
408
409 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
410 c\sostenutoDown d e c, f g a\sostenutoUp
411 @end lilypond
412
413 For fine-tuning the appearance of a pedal bracket, the properties
414 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
415 @code{PianoPedalBracket} objects (see
416 @rinternals{PianoPedalBracket} in the Internals Reference) can be
417 modified.  For example, the bracket may be extended to the right edge
418 of the note head
419
420 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
421 \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
422 c\sostenutoDown d e c, f g a\sostenutoUp
423 @end lilypond
424
425 @noindent
426 Note that overrides must be placed before the note at which the 
427 pedal bracket starts.
428
429 @c TODO Check relative positions of the sustain pedal and
430 @c      dynamics are correct (they collided in 2.11.44).
431 @c      Give example showing this.
432
433 @seealso
434
435 Notation Reference: @ref{Ties} (laissez vibrer).
436
437 @node Accordion
438 @subsection Accordion
439
440 FIXME add sentence
441
442 @menu
443 * Discant symbols::
444 @end menu
445
446 @node Discant symbols
447 @subsubsection Discant symbols
448 @cindex accordion discant symbols
449 @cindex discant symbols, accordion
450 @cindex accordion shifts
451
452 @c FIXME: use @notation, not @q.
453
454 Accordions are often built with more than one set of reeds that may be
455 in unison with, an octave above, or an octave below the written pitch.
456 Each accordian maker has different names for the @q{shifts} that
457 select the various reed combinations, such as @q{oboe}, @q{musette}, or
458 @q{bandonium}, so a system of symbols has come into use to simplify
459 the performance instructions.
460
461 @snippets
462
463 @c FIXME: invalid snippet name.  Check the GDP snippet list.
464 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
465 @c {accordion-discant-symbols.ly}
466
467 @seealso
468
469 Snippets:
470 @rlsr{Keyboards}.