]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/keyboards.itely
Merge branch 'lilypond/translation' of ssh://trettig@git.sv.gnu.org/srv/git/lilypond...
[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 Andrew's TODO List
12 @c references - started
13 @c piano staff - deleted, material moved to 'references'
14 @c manual changes - started
15 @c automatic changes
16 @c staff-chagne lines
17 @c cross-staff stems
18 @c pedals
19 @c discant symbols
20
21 @node Keyboard instruments
22 @section Keyboard instruments
23
24 @menu
25 * Common notation for keyboards::
26 * Piano::
27 * Accordion::
28 @end menu
29
30 @node Common notation for keyboards
31 @subsection Common notation for keyboards
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 @subsubsection References for keyboards
43
44 Keyboard instruments are usually notated with Piano staves. These are
45 two or more normal staves coupled with a brace. The same notation is
46 also used for harps and other keyed instruments. Organ music is normally
47 written with two staves inside a @code{PianoStaff} group and third,
48 normal staff for the pedals.
49
50 The staves in keyboard music are largely independent, but sometimes
51 voices can cross between the two staves.  In this section we discuss
52 some notation techniques particular to keyboard music.
53
54 Several common issues in keyboard music are covered elsewhere:
55 @itemize
56 @item Keyboard music can be written in parallel with @ref{Writing music
57 in parallel}.
58 @item Fingerings are indicated with @ref{Fingering instructions}.
59 @item Organ pedal indications are inserted as articulations, see
60 @ref{List of articulations}.
61 @item Vertical grid lines can be shown with @ref{Grid lines}.
62 @item Keyboard music often contains @notation{Laissez vibrer} ties as
63 well as ties on arpeggios and tremelos, described in @ref{Ties}.
64 @item Arpeggio can be placed across multiple voices and staves with
65 @ref{Arpeggio}.
66 @item Tremolo marks are created with @ref{Tremolo repeats}.
67 @item Several of the tweaks that can occur in keyboard music are
68 demonstrated in @rlearning{Real music example}.
69 @item Hidden notes can be used to produce ties that cross voices, as
70 shown in @rlearning{Other uses for tweaks}.
71 @end itemize
72
73 @snippets
74 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
75 @c {creating-slurs-across-voices.ly}
76
77 @seealso
78
79 Learning Manual:
80 @rlearning{Real music example},
81 @rlearning{Other uses for tweaks}.
82
83 Notation Reference:
84 @ref{Grouping staves},
85 @ref{Instrument names},
86 @ref{Writing music in parallel},
87 @ref{Fingering instructions},
88 @ref{Grid lines},
89 @ref{Ties},
90 @ref{Arpeggio},
91 @ref{Tremolo repeats},
92 @ref{List of articulations}.
93
94 Internals Reference:
95 @rinternals{PianoStaff}.
96
97 Snippets:
98 @rlsr{Keyboards}.
99
100 @knownissues
101 Dynamics are not centered, but workarounds do exist.  See the
102 @q{piano centered dynamics} template in @rlearning{Piano templates}.
103
104 @node Changing staff manually
105 @subsubsection Changing staff manually
106
107 @cindex changing staff manually
108 @cindex manual staff changes
109 @cindex staff changes, manual
110 @cindex cross-staff notes
111 @cindex notes, cross-staff
112 @cindex cross-staff beams
113 @cindex beams, cross-staff
114 @funindex \change
115
116 Voices can be switched between staves manually, using the command
117 @example
118 \change Staff = @var{staffname}
119 @end example
120
121 @noindent
122 The string @var{staffname} is the name of the staff.  It switches the
123 current voice from its current staff to the Staff called
124 @var{staffname}.  Typical values for @var{staffname} are @code{"up"}
125 and @code{"down"}, or @code{"RH"} and @code{"LH"}.
126
127 Cross-staff notes are beamed automatically:
128
129 @lilypond[verbatim,quote,ragged-right]
130 \new PianoStaff <<
131   \new Staff = "up" {
132     <e' c'>8
133     \change Staff = down
134     g fis g
135     \change Staff = up
136     <g'' c''>8
137     \change Staff = down
138     e dis e
139     \change Staff = up
140   }
141   \new Staff = "down" {
142     \clef "bass"
143     s1 % keep staff alive
144   }
145 >>
146 @end lilypond
147
148 If the beaming needs to be tweaked, make any changes to the stem
149 directions first. The beam positions are then measured from the center
150 of the staff that is closest to the beam. For a simple example of beam
151 tweaking, see @rlearning{Fixing overlapping notation}.
152
153 @seealso
154 Learning Manual:
155 @rlearning{Fixing overlapping notation}.
156
157 Notation Reference:
158 @ref{Stems},
159 @ref{Automatic beams}.
160
161 Snippets:
162 @rlsr{Keyboards}.
163
164 Internals Reference:
165 @rinternals{Beam}.
166
167 @node Changing staff automatically
168 @subsubsection Changing staff automatically
169 @cindex automatic staff changes
170 @cindex staff changes, automatic
171
172 Voices can be made to switch automatically between the top and the bottom
173 staff.  The syntax for this is
174
175 @quotation
176 @example
177 \autochange @dots{}@var{music}@dots{}
178 @end example
179 @end quotation
180
181 @noindent
182 This will create two staves inside the current PianoStaff, called
183 @code{up} and @code{down}.  The lower staff will be in bass clef by
184 default.
185
186 A @code{\relative} section that is outside of @code{\autochange} has
187 no effect on the pitches of @var{music}, so, if necessary, put
188 @code{\relative} inside @code{\autochange} like
189
190 @quotation
191 @example
192 \autochange \relative @dots{} @dots{}
193 @end example
194 @end quotation
195
196
197 The autochanger switches on basis of the pitch (middle C is the turning
198 point), and it looks ahead skipping over rests to switch in
199 advance.  Here is a practical example
200
201 @lilypond[quote,verbatim,ragged-right]
202 \new PianoStaff
203   \autochange \relative c'
204   {
205     g4 a b c d r4 a g
206   }
207 @end lilypond
208
209
210 @seealso
211
212 Notation Reference: @ref{Changing staff manually}.
213
214 Internals Reference: @rinternals{AutoChangeMusic}.
215
216
217
218 @knownissues
219
220 The staff switches may not end up in optimal places.  For high
221 quality output, staff switches should be specified manually.
222
223
224 @code{\autochange} cannot be inside @code{\times}.
225
226 @node Staff-change lines
227 @subsubsection Staff-change lines
228
229
230 @cindex follow voice
231 @cindex staff switching
232 @cindex cross-staff
233
234 @funindex followVoice
235
236 Whenever a voice switches to another staff, a line connecting the notes
237 can be printed automatically.  This is switched on by setting
238 @code{followVoice} to true
239
240 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
241 \new PianoStaff <<
242   \new Staff="one" {
243     \set followVoice = ##t
244     c1
245     \change Staff=two
246     b2 a
247   }
248   \new Staff="two" { \clef bass \skip 1*2 }
249 >>
250 @end lilypond
251
252 @seealso
253
254 Internals Reference: @rinternals{VoiceFollower}.
255
256 @predefined
257
258 @funindex \showStaffSwitch
259 @code{\showStaffSwitch},
260 @funindex \hideStaffSwitch
261 @code{\hideStaffSwitch}.
262
263 @node Cross-staff stems
264 @subsubsection Cross-staff stems
265
266 Chords that cross staves may be produced by increasing the length
267 of the stem in the lower staff, so it reaches the stem in the upper
268 staff, or vice versa.
269
270 @lilypond[ragged-right,verbatim,quote]
271 stemExtend = {
272   \once \override Stem #'length = #10
273   \once \override Stem #'cross-staff = ##t
274 }
275 noFlag = \once \override Stem #'flag-style = #'no-flag
276 \new PianoStaff <<
277   \new Staff {
278     \stemDown \stemExtend
279     f'4
280     \stemExtend \noFlag
281     f'8
282   }
283   \new Staff {
284     \clef bass
285     a4 a8
286   }
287 >>
288 @end lilypond
289
290 @node Piano
291 @subsection Piano
292
293 @menu
294 * Piano pedals::
295 @end menu
296
297 @node Piano pedals
298 @subsubsection Piano pedals
299 @cindex Pedals
300
301 Pianos have pedals that alter the way sound is produced.  Generally, a
302 piano has three pedals, sustain, una corda, and sostenuto.
303
304
305 Piano pedal instruction can be expressed by attaching
306 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
307 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
308 note or chord
309
310 @lilypond[quote,ragged-right,fragment,verbatim]
311 c'4\sustainDown c'4\sustainUp
312 @end lilypond
313
314 What is printed can be modified by setting @code{pedal@var{X}Strings},
315 where @var{X} is one of the pedal types: @code{Sustain},
316 @code{Sostenuto} or @code{UnaCorda}.  Refer to
317 @rinternals{SustainPedal} in the program reference for more
318 information.
319
320 Pedals can also be indicated by a sequence of brackets, by setting the
321 @code{pedalSustainStyle} property to bracket objects
322
323 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
324 \set Staff.pedalSustainStyle = #'bracket
325 c\sustainDown d e
326 b\sustainUp\sustainDown
327 b g \sustainUp a \sustainDown \bar "|."
328 @end lilypond
329
330 A third style of pedal notation is a mixture of text and brackets,
331 obtained by setting the @code{pedalSustainStyle} property to
332 @code{mixed}
333
334 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
335 \set Staff.pedalSustainStyle = #'mixed
336 c\sustainDown d e
337 b\sustainUp\sustainDown
338 b g \sustainUp a \sustainDown \bar "|."
339 @end lilypond
340
341 The default @q{*Ped.} style for sustain and damper pedals corresponds to
342 style @code{#'text}.  The sostenuto pedal uses @code{mixed} style by
343 default.
344
345 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
346 c\sostenutoDown d e c, f g a\sostenutoUp
347 @end lilypond
348
349 For fine-tuning the appearance of a pedal bracket, the properties
350 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
351 @code{PianoPedalBracket} objects (see
352 @rinternals{PianoPedalBracket} in the Internals Reference) can be
353 modified.  For example, the bracket may be extended to the right edge
354 of the note head
355
356 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
357 \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
358 c\sostenutoDown d e c, f g a\sostenutoUp
359 @end lilypond
360
361 @noindent
362 Note that overrides must be placed before the note at which the 
363 pedal bracket starts.
364
365 @c TODO Check relative positions of the sustain pedal and
366 @c      dynamics are correct (they collided in 2.11.44).
367 @c      Give example showing this.
368
369 @seealso
370
371 Notation Reference: @ref{Ties} (laissez vibrer).
372
373 @node Accordion
374 @subsection Accordion
375
376 @menu
377 * Discant symbols::
378 @end menu
379
380 @node Discant symbols
381 @subsubsection Discant symbols
382
383 @c TODO Add text from -user and lsr 194
384 TBC