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