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... :(
20 * Introducing chord names::
22 * Printing chord names::
25 @node Introducing chord names
26 @unnumberedsubsubsec Introducing chord names
29 LilyPond has support for printing chord names. Chords may be entered
30 in musical chord notation, i.e., @code{< .. >}, but they can also be
31 entered by name. Internally, the chords are represented as a set of
32 pitches, so they can be transposed
35 @lilypond[quote,ragged-right,verbatim,ragged-right]
36 twoWays = \transpose c c' {
45 << \new ChordNames \twoWays
46 \new Voice \twoWays >>
49 This example also shows that the chord printing routines do not try to
50 be intelligent. The last chord (@code{f bes d}) is not interpreted as
53 Note that the duration of chords must be specified outside the
62 @unnumberedsubsubsec Chords mode
65 In chord mode sets of pitches (chords) are entered with normal note
66 names. A chord is entered by the root, which is entered like a
69 @lilypond[quote,ragged-right,fragment,verbatim]
70 \chordmode { es4. d8 c2 }
74 The mode is introduced by the keyword @code{\chordmode}.
79 Other chords may be entered by suffixing a colon and introducing a
80 modifier (which may include a number if desired)
82 @lilypond[quote,fragment,verbatim]
83 \chordmode { e1:m e1:7 e1:m7 }
86 The first number following the root is taken to be the @q{type} of the
87 chord, thirds are added to the root until it reaches the specified
88 number. The exception is @code{c:13}, for which the 11 is omitted.
90 @lilypond[quote,fragment,verbatim]
91 \chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 c:13 }
95 @cindex additions, in chords
96 @cindex removals, in chords
98 More complex chords may also be constructed adding separate steps
99 to a chord. Additions are added after the number following
100 the colon and are separated by dots
102 @lilypond[quote,verbatim,fragment]
103 \chordmode { c:5.6 c:3.7.8 c:3.6.13 }
106 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
109 @lilypond[quote,verbatim,fragment]
110 \chordmode { c:7+ c:5+.3- c:3-.5-.7- }
113 Removals are specified similarly and are introduced by a caret. They
114 must come after the additions
116 @lilypond[quote,verbatim,fragment]
117 \chordmode { c^3 c:7^5 c:9^3.5 }
120 Modifiers can be used to change pitches. The following modifiers are
125 The minor chord. This modifier lowers the 3rd and (if present) the 7th step.
128 The diminished chord. This modifier lowers the 3rd, 5th and (if present)
132 The augmented chord. This modifier raises the 5th step.
135 The major 7th chord. This modifier raises the 7th step if present.
138 The suspended 4th or 2nd. This modifier removes the 3rd
139 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
143 Modifiers can be mixed with additions
144 @lilypond[quote,verbatim,fragment]
145 \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
148 @cindex modifiers, in chords.
155 Since an unaltered 11 does not sound good when combined with an
156 unaltered 13, the 11 is removed in this case (unless it is added
158 @lilypond[quote,ragged-right,fragment,verbatim]
159 \chordmode { c:13 c:13.11 c:m13 }
164 An inversion (putting one pitch of the chord on the bottom), as well
165 as bass notes, can be specified by appending
166 @code{/}@var{pitch} to the chord
167 @lilypond[quote,ragged-right,fragment,verbatim]
168 \chordmode { c1 c/g c/f }
172 A bass note can be added instead of transposed out of the chord,
173 by using @code{/+}@var{pitch}.
175 @lilypond[quote,ragged-right,fragment,verbatim]
176 \chordmode { c1 c/+g c/+f }
179 Chords is a mode similar to @code{\lyricmode}, etc. Most
180 of the commands continue to work, for example, @code{r} and
181 @code{\skip} can be used to insert rests and spaces, and property
182 commands may be used to change various settings.
188 Each step can only be present in a chord once. The following
189 simply produces the augmented chord, since @code{5+} is interpreted
192 @lilypond[quote,ragged-right,verbatim,fragment]
193 \chordmode { c:5.5-.5+ }
197 @node Printing chord names
198 @unnumberedsubsubsec Printing chord names
200 @cindex printing chord names
204 For displaying printed chord names, use the @internalsref{ChordNames} context.
205 The chords may be entered either using the notation
206 described above, or directly using @code{<} and @code{>}
208 @lilypond[quote,verbatim,ragged-right]
210 \chordmode {a1 b c} <d' f' a'> <e' g' b'>
213 \new ChordNames \harmonies
214 \new Staff \harmonies
218 You can make the chord changes stand out by setting
219 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
220 display chord names when there is a change in the chords scheme and at
221 the start of a new line
223 @lilypond[quote,verbatim,ragged-right]
224 harmonies = \chordmode {
225 c1:m c:m \break c:m c:m d
229 \set chordChanges = ##t
231 \new Staff \transpose c c' \harmonies
235 The previous examples all show chords over a staff. This is not
236 necessary. Chords may also be printed separately. It may be necessary
237 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
240 @lilypond[ragged-right,verbatim]
241 \new ChordNames \with {
242 \override BarLine #'bar-size = #4
243 \consists Bar_engraver
244 \consists "Volta_engraver"
246 \chordmode { \repeat volta 2 {
256 The default chord name layout is a system for Jazz music, proposed by
257 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
261 @funindex chordNameExceptions
262 @item chordNameExceptions
263 This is a list that contains the chords that have special formatting.
265 The exceptions list should be encoded as
267 @{ <c f g bes>1 \markup @{ \super "7" "wahh" @} @}
270 To get this information into @code{chordNameExceptions} takes a little
271 manoeuvring. The following code transforms @code{chExceptionMusic}
272 (which is a sequential music) into a list of exceptions.
274 (sequential-music-to-chord-exceptions chExceptionMusic #t)
279 (sequential-music-to-chord-exceptions chExceptionMusic #t)
282 adds the new exceptions to the default ones, which are defined in
283 @file{ly/@/chord@/-modifier@/-init@/.ly}.
285 For an example of tuning this property, see also
286 @lsr{chords,chord@/-name@/-exceptions@/.ly}
287 @cindex exceptions, chord names.
290 @funindex majorSevenSymbol
291 @item majorSevenSymbol
292 This property contains the markup object used for the 7th step, when
293 it is major. Predefined options are @code{whiteTriangleMarkup} and
294 @code{blackTriangleMarkup}. See
295 @lsr{chords,chord@/-name@/-major7@/.ly} for an example.
297 @funindex chordNameSeparator
298 @item chordNameSeparator
299 Different parts of a chord name are normally separated by a
300 slash. By setting @code{chordNameSeparator}, you can specify other
302 @lilypond[quote,ragged-right,fragment,verbatim]
303 \new ChordNames \chordmode {
305 \set chordNameSeparator
306 = \markup { \typewriter "|" }
311 @funindex chordRootNamer
313 The root of a chord is usually printed as a letter with an optional
314 alteration. The transformation from pitch to letter is done by this
315 function. Special note names (for example, the German @q{H} for a
316 B-chord) can be produced by storing a new function in this property.
318 @funindex chordNoteNamer
320 The default is to print single pitch, e.g., the bass note, using the
321 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
322 to a specialized function to change this behavior. For example, the
323 base can be printed in lower case.
325 @funindex chordPrefixSpacer
326 @item chordPrefixSpacer
327 The @q{m} for minor chords is usually printed right after the root of
328 the chord. By setting @code{chordPrefixSpacer}, you can fix a spacer
329 between the root and @q{m}. The spacer is not used when the root
334 The predefined variables @code{\germanChords},
335 @code{\semiGermanChords}, @code{\italianChords} and @code{\frenchChords}
336 set these variables. The effect is
339 @lilypondfile[ragged-right]{chord-names-languages.ly}
341 There are also two other chord name schemes implemented: an alternate
342 Jazz chord notation, and a systematic scheme called Banter chords. The
343 alternate Jazz notation is also shown on the chart in @ref{Chord name
344 chart}. Turning on these styles is demonstrated in
345 @lsr{chords,chord-names-jazz.ly}.
354 @funindex \germanChords
355 @code{\germanChords},
356 @funindex \semiGermanChords
357 @code{\semiGermanChords}.
358 @funindex \italianChords
359 @code{\italianChords}.
360 @funindex \frenchChords
361 @code{\frenchChords}.
371 Init files: @file{scm/@/chords@/-ignatzek@/.scm}, and
372 @file{scm/@/chord@/-entry@/.scm}.
377 Chord names are determined solely from the list of pitches. Chord
378 inversions are not identified, and neither are added bass notes. This
379 may result in strange chord names when chords are entered with the
380 @code{< .. >} syntax.