Previous: Chords mode, Up: Chord names


7.2.3 Printing chord names

For displaying printed chord names, use the ChordNames context. The chords may be entered either using the notation described above, or directly using < and >

     
     harmonies = {
       \chordmode {a1 b c} <d' f' a'> <e' g' b'>
     }
     <<
       \new ChordNames \harmonies
       \new Staff \harmonies
     >>

[image of music]

You can make the chord changes stand out by setting ChordNames.chordChanges to true. This will only display chord names when there is a change in the chords scheme and at the start of a new line

     
     harmonies = \chordmode {
       c1:m c:m \break c:m c:m d
     }
     <<
       \new ChordNames {
         \set chordChanges = ##t
         \harmonies }
       \new Staff \transpose c c' \harmonies
     >>

[image of music]

The previous examples all show chords over a staff. This is not necessary. Chords may also be printed separately. It may be necessary to add Volta_engraver and Bar_engraver for showing repeats.

\new ChordNames \with {
  \override BarLine #'bar-size = #4
  voltaOnThisStaff = ##t
  \consists Bar_engraver
  \consists "Volta_engraver"
}
\chordmode { \repeat volta 2 {
  f1:maj7 f:7 bes:7
  c:maj7
} \alternative {
  es e
}
}

[image of music]

The default chord name layout is a system for Jazz music, proposed by Klaus Ignatzek (see Literature list). It can be tuned through the following properties

chordNameExceptions
This is a list that contains the chords that have special formatting.

The exceptions list should be encoded as

     { <c f g bes>1 \markup { \super "7" "wahh" } }

To get this information into chordNameExceptions takes a little manoeuvring. The following code transforms chExceptionMusic (which is a sequential music) into a list of exceptions.

     (sequential-music-to-chord-exceptions chExceptionMusic #t)

Then,

     (append
      (sequential-music-to-chord-exceptions chExceptionMusic #t)
      ignatzekExceptions)

adds the new exceptions to the default ones, which are defined in ly/chord-modifier-init.ly.

For an example of tuning this property, see also input/regression/chord-name-exceptions.ly.


majorSevenSymbol
This property contains the markup object used for the 7th step, when it is major. Predefined options are whiteTriangleMarkup and blackTriangleMarkup. See input/regression/chord-name-major7.ly for an example.


chordNameSeparator
Different parts of a chord name are normally separated by a slash. By setting chordNameSeparator, you can specify other separators, e.g.,
          
          \new ChordNames \chordmode {
            c:7sus4
            \set chordNameSeparator
              = \markup { \typewriter "|" }
            c:7sus4
          }
     

[image of music]


chordRootNamer
The root of a chord is usually printed as a letter with an optional alteration. The transformation from pitch to letter is done by this function. Special note names (for example, the German “H” for a B-chord) can be produced by storing a new function in this property.


chordNoteNamer
The default is to print single pitch, e.g., the bass note, using the chordRootNamer. The chordNoteNamer property can be set to a specialized function to change this behavior. For example, the base can be printed in lower case.


chordPrefixSpacer
The “m” for minor chords is usually printed right after the root of the chord. By setting chordPrefixSpacer, you can fix a spacer between the root and “m”. The spacer is not used when the root is altered.

The predefined variables \germanChords, \semiGermanChords, \italianChords and \frenchChords set these variables. The effect is demonstrated here,

[image of music]

There are also two other chord name schemes implemented: an alternate Jazz chord notation, and a systematic scheme called Banter chords. The alternate Jazz notation is also shown on the chart in Chord name chart. Turning on these styles is described in the input file input/test/chord-names-jazz.ly.

Predefined commands

\germanChords, \semiGermanChords. \italianChords. \frenchChords.

See also

Examples: input/regression/chord-name-major7.ly, input/regression/chord-name-exceptions.ly, input/test/chord-names-jazz.ly.

Init files: scm/chords-ignatzek.scm, and scm/chord-entry.scm.

Bugs

Chord names are determined solely from the list of pitches. Chord inversions are not identified, and neither are added bass notes. This may result in strange chord names when chords are entered with the < .. > syntax.


Previous: Chords mode, Up: Chord names

This page is for LilyPond-2.10.33 (stable-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.