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