]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/chords.itely
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / user / chords.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
12 @node Chord notation
13 @section Chord notation
14
15 Intro text.
16
17 @menu
18 * Chords sections::             
19 @end menu
20
21
22 @node Chords sections
23 @subsection Chords sections
24
25 @menu
26 * A lead sheet::                
27 * Introducing chord names::     
28 * Chords mode::                 
29 * Printing chord names::        
30 @end menu
31
32 @c really awkward; I just shoved this in here from the tutorial.
33 @node A lead sheet
34 @subsubsection A lead sheet
35
36 @cindex Lead sheets
37 @cindex chords
38 @cindex chord names
39
40 In popular music it is common to denote accompaniment with chord
41 names.  Such chords can be entered like notes,
42
43 @lilypond[verbatim,quote,ragged-right]
44 \chordmode { c2 f4. g8 }
45 @end lilypond
46
47 Now each pitch is read as the root of a chord instead of a note.
48 This mode is switched on with @code{\chordmode}.  Other chords can
49 be created by adding modifiers after a colon.  The following
50 example shows a few common modifiers:
51
52 @lilypond[verbatim,quote,ragged-right]
53 \chordmode { c2 f4:m g4:maj7 gis1:dim7 }
54 @end lilypond
55
56 For lead sheets, chords are not printed on staves, but as names on
57 a line for themselves.  This is achieved by using @code{\chords}
58 instead of @code{\chordmode}.  This uses the same syntax as
59 @code{\chordmode}, but renders the notes in a @code{ChordNames}
60 context, with the following result:
61
62 @lilypond[verbatim,quote,ragged-right]
63 \chords { c2 f4.:m g4.:maj7 gis8:dim7 }
64 @end lilypond
65
66 @cindex lead sheet
67 When put together, chord names, lyrics and a melody form a lead
68 sheet,
69
70 @lilypond[verbatim,quote,ragged-right]
71 <<
72   \chords { c2 g:sus4 f e }
73   \relative c'' {
74     a4 e c8 e r4
75     b2 c4( d)
76   }
77   \addlyrics { One day this shall be free __ }
78 >>
79 @end lilypond
80
81
82 @seealso
83 @quotation
84 A complete list of modifiers and other options for layout can be
85 found in @ruser{Chords}.
86 @end quotation
87
88
89 @node Introducing chord names
90 @subsubsection Introducing chord names
91 @cindex chord names
92
93 LilyPond has support for printing chord names.  Chords may be entered
94 in musical chord notation, i.e., @code{< .. >}, but they can also be
95 entered by name.  Internally, the chords are represented as a set of
96 pitches, so they can be transposed
97
98
99 @lilypond[quote,ragged-right,verbatim,ragged-right]
100 twoWays = \transpose c c' {
101   \chordmode {
102     c1 f:sus4 bes/f
103   }
104   <c e g>
105   <f bes c'>
106   <f bes d'>
107 }
108
109 << \new ChordNames \twoWays
110    \new Voice \twoWays >>
111 @end lilypond
112
113 This example also shows that the chord printing routines do not try to
114 be intelligent.  The last chord (@code{f bes d}) is not interpreted as
115 an inversion.
116
117 Note that the duration of chords must be specified outside the
118 @code{<>}.
119
120 @example
121 <c e g>2
122 @end example
123
124
125 @node Chords mode
126 @subsubsection Chords mode
127 @cindex Chords mode
128
129 In chord mode sets of pitches (chords) are entered with normal note
130 names.  A chord is entered by the root, which is entered like a
131 normal pitch
132
133 @lilypond[quote,ragged-right,fragment,verbatim]
134 \chordmode { es4. d8 c2 }
135 @end lilypond
136
137 @noindent
138 The mode is introduced by the keyword @code{\chordmode}.
139
140 @cindex chord entry
141 @cindex chord mode
142
143 Other chords may be entered by suffixing a colon and introducing a
144 modifier (which may include a number if desired)
145
146 @lilypond[quote,fragment,verbatim]
147 \chordmode { e1:m e1:7 e1:m7 }
148 @end lilypond
149
150 The first number following the root is taken to be the @q{type} of the
151 chord, thirds are added to the root until it reaches the specified
152 number.  The exception is @code{c:13}, for which the 11 is omitted.
153
154 @lilypond[quote,fragment,verbatim]
155 \chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 c:13 }
156 @end lilypond
157
158 @cindex root of chord
159 @cindex additions, in chords
160 @cindex removals, in chords
161
162 More complex chords may also be constructed adding separate steps
163 to a chord.  Additions are added after the number following
164 the colon and are separated by dots
165
166 @lilypond[quote,verbatim,fragment]
167 \chordmode { c:5.6 c:3.7.8 c:3.6.13 }
168 @end lilypond
169
170 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
171 to the number
172
173 @lilypond[quote,verbatim,fragment]
174 \chordmode { c:7+ c:5+.3- c:3-.5-.7- }
175 @end lilypond
176
177 Removals are specified similarly and are introduced by a caret.  They
178 must come after the additions
179
180 @lilypond[quote,verbatim,fragment]
181 \chordmode { c^3 c:7^5 c:9^3.5 }
182 @end lilypond
183
184 Modifiers can be used to change pitches.  The following modifiers are
185 supported
186
187 @table @code
188 @item m
189 The minor chord.  This modifier lowers the 3rd and (if present) the 7th step.
190
191 @item dim
192 The diminished chord.  This modifier lowers the 3rd, 5th and (if present)
193 the 7th step.
194
195 @item aug
196 The augmented chord.  This modifier raises the 5th step.
197
198 @item maj
199 The major 7th chord.  This modifier raises the 7th step if present.
200
201 @item sus
202 The suspended 4th or 2nd.  This modifier removes the 3rd
203 step.  Append either @code{2} or @code{4} to add the 2nd or 4th step to
204 the chord.
205 @end table
206
207 Modifiers can be mixed with additions
208 @lilypond[quote,verbatim,fragment]
209   \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
210 @end lilypond
211
212 @cindex modifiers, in chords.
213 @funindex aug
214 @funindex dim
215 @funindex maj
216 @funindex sus
217 @funindex m
218
219 Since an unaltered 11 does not sound good when combined with an
220 unaltered 13, the 11 is removed in this case (unless it is added
221 explicitly)
222 @lilypond[quote,ragged-right,fragment,verbatim]
223 \chordmode { c:13 c:13.11 c:m13 }
224 @end lilypond
225
226 @funindex /
227
228 An inversion (putting one pitch of the chord on the bottom), as well
229 as bass notes, can be specified by appending
230 @code{/}@var{pitch} to the chord
231 @lilypond[quote,ragged-right,fragment,verbatim]
232 \chordmode { c1 c/g c/f }
233 @end lilypond
234 @funindex /+
235
236 A bass note can be added instead of transposed out of the chord,
237 by using @code{/+}@var{pitch}.
238
239 @lilypond[quote,ragged-right,fragment,verbatim]
240 \chordmode { c1 c/+g c/+f }
241 @end lilypond
242
243 Chords is a mode similar to @code{\lyricmode}, etc.  Most
244 of the commands continue to work, for example, @code{r} and
245 @code{\skip} can be used to insert rests and spaces, and property
246 commands may be used to change various settings.
247
248
249
250 @knownissues
251
252 Each step can only be present in a chord once.  The following
253 simply produces the augmented chord, since @code{5+} is interpreted
254 last
255 @cindex clusters
256 @lilypond[quote,ragged-right,verbatim,fragment]
257 \chordmode { c:5.5-.5+ }
258 @end lilypond
259
260
261 @node Printing chord names
262 @subsubsection Printing chord names
263
264 @cindex printing chord names
265 @cindex chord names
266 @cindex chords
267
268 For displaying printed chord names, use the @internalsref{ChordNames} context.
269 The chords may be entered either using the notation
270 described above, or directly using @code{<} and @code{>}
271
272 @lilypond[quote,verbatim,ragged-right]
273 harmonies = {
274   \chordmode {a1 b c} <d' f' a'> <e' g' b'>
275 }
276 <<
277   \new ChordNames \harmonies
278   \new Staff \harmonies
279 >>
280 @end lilypond
281
282 You can make the chord changes stand out by setting
283 @internalsref{ChordNames}.@code{chordChanges} to true.  This will only
284 display chord names when there is a change in the chords scheme and at
285 the start of a new line
286
287 @lilypond[quote,verbatim,ragged-right]
288 harmonies = \chordmode {
289   c1:m c:m \break c:m c:m d
290 }
291 <<
292   \new ChordNames {
293     \set chordChanges = ##t
294     \harmonies }
295   \new Staff \transpose c c' \harmonies
296 >>
297 @end lilypond
298
299 The previous examples all show chords over a staff.  This is not
300 necessary.  Chords may also be printed separately.  It may be necessary
301 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
302 for showing repeats.
303
304 @lilypond[ragged-right,verbatim]
305 \new ChordNames \with {
306   \override BarLine #'bar-size = #4
307   \consists Bar_engraver
308   \consists "Volta_engraver"
309 }
310 \chordmode { \repeat volta 2 {
311   f1:maj7 f:7 bes:7
312   c:maj7
313 } \alternative {
314   es e
315 }
316 }
317 @end lilypond
318
319
320 The default chord name layout is a system for Jazz music, proposed by
321 Klaus Ignatzek (see @ref{Literature list}).  It can be tuned through the
322 following properties
323
324 @table @code
325 @funindex chordNameExceptions
326 @item chordNameExceptions
327 This is a list that contains the chords that have special formatting.
328
329 The exceptions list should be encoded as
330 @example
331 @{ <c f g bes>1 \markup @{ \super "7" "wahh" @} @}
332 @end example
333
334 To get this information into @code{chordNameExceptions} takes a little
335 maneuvering.  The following code transforms @code{chExceptionMusic}
336 (which is a sequential music) into a list of exceptions.
337 @example
338 (sequential-music-to-chord-exceptions chExceptionMusic #t)
339 @end example
340 Then,
341 @example
342 (append
343  (sequential-music-to-chord-exceptions chExceptionMusic #t)
344  ignatzekExceptions)
345 @end example
346 adds the new exceptions to the default ones, which are defined in
347 @file{ly/@/chord@/-modifier@/-init@/.ly}.
348
349 For an example of tuning this property, see also
350 @c @lsr{chords,chord@/-name@/-exceptions@/.ly}
351 @cindex exceptions, chord names.
352
353
354 @funindex majorSevenSymbol
355 @item majorSevenSymbol
356 This property contains the markup object used for the 7th step, when
357 it is major.  Predefined options are @code{whiteTriangleMarkup} and
358 @code{blackTriangleMarkup}.  See
359 @c @lsr{chords,chord@/-name@/-major7@/.ly} for an example.
360
361 @funindex chordNameSeparator
362 @item chordNameSeparator
363 Different parts of a chord name are normally separated by a
364 slash.  By setting @code{chordNameSeparator}, you can specify other
365 separators, e.g.,
366 @lilypond[quote,ragged-right,fragment,verbatim]
367 \new ChordNames \chordmode {
368   c:7sus4
369   \set chordNameSeparator
370     = \markup { \typewriter "|" }
371   c:7sus4
372 }
373 @end lilypond
374
375 @funindex chordRootNamer
376 @item chordRootNamer
377 The root of a chord is usually printed as a letter with an optional
378 alteration.  The transformation from pitch to letter is done by this
379 function.  Special note names (for example, the German @q{H} for a
380 B-chord) can be produced by storing a new function in this property.
381
382 @funindex chordNoteNamer
383 @item chordNoteNamer
384 The default is to print single pitch, e.g., the bass note, using the
385 @code{chordRootNamer}.  The @code{chordNoteNamer} property can be set
386 to a specialized function to change this behavior.  For example, the
387 base can be printed in lower case.
388
389 @funindex chordPrefixSpacer
390 @item chordPrefixSpacer
391 The @q{m} for minor chords is usually printed right after the root of
392 the chord.  By setting @code{chordPrefixSpacer}, you can fix a spacer
393 between the root and @q{m}.  The spacer is not used when the root
394 is altered.
395
396 @end table
397
398 The predefined variables @code{\germanChords},
399 @code{\semiGermanChords}, @code{\italianChords} and @code{\frenchChords}
400 set these variables.  The effect is
401 demonstrated here,
402
403 @lilypondfile[ragged-right]{chord-names-languages.ly}
404
405 There are also two other chord name schemes implemented: an alternate
406 Jazz chord notation, and a systematic scheme called Banter chords.  The
407 alternate Jazz notation is also shown on the chart in @ref{Chord name
408 chart}.  Turning on these styles is demonstrated in
409 @c @lsr{chords,chord-names-jazz.ly}.
410
411 @cindex Banter
412 @cindex jazz chords
413 @cindex chords, jazz
414
415
416 @predefined
417
418 @funindex \germanChords
419 @code{\germanChords},
420 @funindex \semiGermanChords
421 @code{\semiGermanChords}.
422 @funindex \italianChords
423 @code{\italianChords}.
424 @funindex \frenchChords
425 @code{\frenchChords}.
426
427
428
429
430 @seealso
431
432 Examples:
433 @c @lsrdir{chords}
434
435 Init files: @file{scm/@/chords@/-ignatzek@/.scm}, and
436 @file{scm/@/chord@/-entry@/.scm}.
437
438
439 @knownissues
440
441 Chord names are determined solely from the list of pitches.  Chord
442 inversions are not identified, and neither are added bass notes.  This
443 may result in strange chord names when chords are entered with the
444 @code{< .. >} syntax.
445
446