1 @c -*- coding: utf-8; mode: texinfo; -*-
14 @subsection TODO chords fix
17 @c awkward name; awkward section name.
18 @c still, the Basic "chords" seems like a good name... :(
21 * Introducing chord names::
23 * Printing chord names::
26 @c really awkward; I just shoved this in here from the tutorial.
28 @unnumberedsubsubsec A lead sheet
34 In popular music it is common to denote accompaniment with chord
35 names. Such chords can be entered like notes,
37 @lilypond[verbatim,quote,ragged-right]
38 \chordmode { c2 f4. g8 }
41 Now each pitch is read as the root of a chord instead of a note.
42 This mode is switched on with @code{\chordmode}. Other chords can
43 be created by adding modifiers after a colon. The following
44 example shows a few common modifiers:
46 @lilypond[verbatim,quote,ragged-right]
47 \chordmode { c2 f4:m g4:maj7 gis1:dim7 }
50 For lead sheets, chords are not printed on staves, but as names on
51 a line for themselves. This is achieved by using @code{\chords}
52 instead of @code{\chordmode}. This uses the same syntax as
53 @code{\chordmode}, but renders the notes in a @code{ChordNames}
54 context, with the following result:
56 @lilypond[verbatim,quote,ragged-right]
57 \chords { c2 f4.:m g4.:maj7 gis8:dim7 }
61 When put together, chord names, lyrics and a melody form a lead
64 @lilypond[verbatim,quote,ragged-right]
66 \chords { c2 g:sus4 f e }
71 \addlyrics { One day this shall be free __ }
78 A complete list of modifiers and other options for layout can be
79 found in @ruser{Chords}.
83 @node Introducing chord names
84 @unnumberedsubsubsec Introducing chord names
87 LilyPond has support for printing chord names. Chords may be entered
88 in musical chord notation, i.e., @code{< .. >}, but they can also be
89 entered by name. Internally, the chords are represented as a set of
90 pitches, so they can be transposed
93 @lilypond[quote,ragged-right,verbatim,ragged-right]
94 twoWays = \transpose c c' {
103 << \new ChordNames \twoWays
104 \new Voice \twoWays >>
107 This example also shows that the chord printing routines do not try to
108 be intelligent. The last chord (@code{f bes d}) is not interpreted as
111 Note that the duration of chords must be specified outside the
120 @unnumberedsubsubsec Chords mode
123 In chord mode sets of pitches (chords) are entered with normal note
124 names. A chord is entered by the root, which is entered like a
127 @lilypond[quote,ragged-right,fragment,verbatim]
128 \chordmode { es4. d8 c2 }
132 The mode is introduced by the keyword @code{\chordmode}.
137 Other chords may be entered by suffixing a colon and introducing a
138 modifier (which may include a number if desired)
140 @lilypond[quote,fragment,verbatim]
141 \chordmode { e1:m e1:7 e1:m7 }
144 The first number following the root is taken to be the @q{type} of the
145 chord, thirds are added to the root until it reaches the specified
146 number. The exception is @code{c:13}, for which the 11 is omitted.
148 @lilypond[quote,fragment,verbatim]
149 \chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 c:13 }
152 @cindex root of chord
153 @cindex additions, in chords
154 @cindex removals, in chords
156 More complex chords may also be constructed adding separate steps
157 to a chord. Additions are added after the number following
158 the colon and are separated by dots
160 @lilypond[quote,verbatim,fragment]
161 \chordmode { c:5.6 c:3.7.8 c:3.6.13 }
164 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
167 @lilypond[quote,verbatim,fragment]
168 \chordmode { c:7+ c:5+.3- c:3-.5-.7- }
171 Removals are specified similarly and are introduced by a caret. They
172 must come after the additions
174 @lilypond[quote,verbatim,fragment]
175 \chordmode { c^3 c:7^5 c:9^3.5 }
178 Modifiers can be used to change pitches. The following modifiers are
183 The minor chord. This modifier lowers the 3rd and (if present) the 7th step.
186 The diminished chord. This modifier lowers the 3rd, 5th and (if present)
190 The augmented chord. This modifier raises the 5th step.
193 The major 7th chord. This modifier raises the 7th step if present.
196 The suspended 4th or 2nd. This modifier removes the 3rd
197 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
201 Modifiers can be mixed with additions
202 @lilypond[quote,verbatim,fragment]
203 \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
206 @cindex modifiers, in chords.
213 Since an unaltered 11 does not sound good when combined with an
214 unaltered 13, the 11 is removed in this case (unless it is added
216 @lilypond[quote,ragged-right,fragment,verbatim]
217 \chordmode { c:13 c:13.11 c:m13 }
222 An inversion (putting one pitch of the chord on the bottom), as well
223 as bass notes, can be specified by appending
224 @code{/}@var{pitch} to the chord
225 @lilypond[quote,ragged-right,fragment,verbatim]
226 \chordmode { c1 c/g c/f }
230 A bass note can be added instead of transposed out of the chord,
231 by using @code{/+}@var{pitch}.
233 @lilypond[quote,ragged-right,fragment,verbatim]
234 \chordmode { c1 c/+g c/+f }
237 Chords is a mode similar to @code{\lyricmode}, etc. Most
238 of the commands continue to work, for example, @code{r} and
239 @code{\skip} can be used to insert rests and spaces, and property
240 commands may be used to change various settings.
246 Each step can only be present in a chord once. The following
247 simply produces the augmented chord, since @code{5+} is interpreted
250 @lilypond[quote,ragged-right,verbatim,fragment]
251 \chordmode { c:5.5-.5+ }
255 @node Printing chord names
256 @unnumberedsubsubsec Printing chord names
258 @cindex printing chord names
262 For displaying printed chord names, use the @internalsref{ChordNames} context.
263 The chords may be entered either using the notation
264 described above, or directly using @code{<} and @code{>}
266 @lilypond[quote,verbatim,ragged-right]
268 \chordmode {a1 b c} <d' f' a'> <e' g' b'>
271 \new ChordNames \harmonies
272 \new Staff \harmonies
276 You can make the chord changes stand out by setting
277 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
278 display chord names when there is a change in the chords scheme and at
279 the start of a new line
281 @lilypond[quote,verbatim,ragged-right]
282 harmonies = \chordmode {
283 c1:m c:m \break c:m c:m d
287 \set chordChanges = ##t
289 \new Staff \transpose c c' \harmonies
293 The previous examples all show chords over a staff. This is not
294 necessary. Chords may also be printed separately. It may be necessary
295 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
298 @lilypond[ragged-right,verbatim]
299 \new ChordNames \with {
300 \override BarLine #'bar-size = #4
301 \consists Bar_engraver
302 \consists "Volta_engraver"
304 \chordmode { \repeat volta 2 {
314 The default chord name layout is a system for Jazz music, proposed by
315 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
319 @funindex chordNameExceptions
320 @item chordNameExceptions
321 This is a list that contains the chords that have special formatting.
323 The exceptions list should be encoded as
325 @{ <c f g bes>1 \markup @{ \super "7" "wahh" @} @}
328 To get this information into @code{chordNameExceptions} takes a little
329 manoeuvring. The following code transforms @code{chExceptionMusic}
330 (which is a sequential music) into a list of exceptions.
332 (sequential-music-to-chord-exceptions chExceptionMusic #t)
337 (sequential-music-to-chord-exceptions chExceptionMusic #t)
340 adds the new exceptions to the default ones, which are defined in
341 @file{ly/@/chord@/-modifier@/-init@/.ly}.
343 For an example of tuning this property, see also
344 @lsr{chords,chord@/-name@/-exceptions@/.ly}
345 @cindex exceptions, chord names.
348 @funindex majorSevenSymbol
349 @item majorSevenSymbol
350 This property contains the markup object used for the 7th step, when
351 it is major. Predefined options are @code{whiteTriangleMarkup} and
352 @code{blackTriangleMarkup}. See
353 @lsr{chords,chord@/-name@/-major7@/.ly} for an example.
355 @funindex chordNameSeparator
356 @item chordNameSeparator
357 Different parts of a chord name are normally separated by a
358 slash. By setting @code{chordNameSeparator}, you can specify other
360 @lilypond[quote,ragged-right,fragment,verbatim]
361 \new ChordNames \chordmode {
363 \set chordNameSeparator
364 = \markup { \typewriter "|" }
369 @funindex chordRootNamer
371 The root of a chord is usually printed as a letter with an optional
372 alteration. The transformation from pitch to letter is done by this
373 function. Special note names (for example, the German @q{H} for a
374 B-chord) can be produced by storing a new function in this property.
376 @funindex chordNoteNamer
378 The default is to print single pitch, e.g., the bass note, using the
379 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
380 to a specialized function to change this behavior. For example, the
381 base can be printed in lower case.
383 @funindex chordPrefixSpacer
384 @item chordPrefixSpacer
385 The @q{m} for minor chords is usually printed right after the root of
386 the chord. By setting @code{chordPrefixSpacer}, you can fix a spacer
387 between the root and @q{m}. The spacer is not used when the root
392 The predefined variables @code{\germanChords},
393 @code{\semiGermanChords}, @code{\italianChords} and @code{\frenchChords}
394 set these variables. The effect is
397 @lilypondfile[ragged-right]{chord-names-languages.ly}
399 There are also two other chord name schemes implemented: an alternate
400 Jazz chord notation, and a systematic scheme called Banter chords. The
401 alternate Jazz notation is also shown on the chart in @ref{Chord name
402 chart}. Turning on these styles is demonstrated in
403 @lsr{chords,chord-names-jazz.ly}.
412 @funindex \germanChords
413 @code{\germanChords},
414 @funindex \semiGermanChords
415 @code{\semiGermanChords}.
416 @funindex \italianChords
417 @code{\italianChords}.
418 @funindex \frenchChords
419 @code{\frenchChords}.
429 Init files: @file{scm/@/chords@/-ignatzek@/.scm}, and
430 @file{scm/@/chord@/-entry@/.scm}.
435 Chord names are determined solely from the list of pitches. Chord
436 inversions are not identified, and neither are added bass notes. This
437 may result in strange chord names when chords are entered with the
438 @code{< .. >} syntax.