[icon]

GNU LilyPond

-- --

What is LilyPond
Home
Examples
Templates
Download
GNU/Linux binaries
Windows binaries
Source code
Documentation
Tutorial
Manual
Glossary
Index

Support
Mailing lists
Search
WikiWiki

External sites
lilypond.org/stable
lilypond.org/development
savannah.gnu.org
ftp.lilypond.org
Mutopia
Other music online

Printing named chords

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

     scheme = \notes {
       \chords {a1 b c} <<d f g>>  <<e g b>>
     }
     \score {
       \notes<
         \context ChordNames \scheme
         \context Staff \transpose c c' \scheme
       >
     }
     
[picture of music]

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

     scheme = \chords {
       c1:m c:m \break c:m c:m d
     }
     \score {
       \notes <
         \context ChordNames {
             \property ChordNames.chordChanges = ##t
             \scheme }
         \context Staff \transpose c c' \scheme
       >
     \paper{linewidth= 9.\cm}
     }
     
[picture of music]

LilyPond examines chords specified as lists of notes to determine a name to give the chord. LilyPond will not try to identify chord inversions or an added bass note, which may result in strange chord names when chords are entered as a list of pitches:

     scheme = \notes {
       <<c' e' g'>>1
       <<e' g' c''>>
       <<e e' g' c''>>
     }
     
     \score {
       <
         \context ChordNames \scheme
         \context Staff \scheme
       >
     }
     
[picture of music]

The default chord name layout is a system for Jazz music, proposed by Klaus Ignatzek (See Literature).

[TODO: add description for banter other jazz.]

The Ignatzek chord name formatting can be tuned in a number of ways through the following properties:

chordNameExceptions
This is a list that contains the chords that have special formatting. For example.
          chExceptionMusic = \notes { <<c f g bes>>1-\markup { \super "7" "wahh" }}
          chExceptions = #(append
            (sequential-music-to-chord-exceptions chExceptionMusic)
            ignatzekExceptions)
          
          \score {   \context ChordNames
              \chords {
                c:7sus4 c:dim7
                \property ChordNames.chordNameExceptions = #chExceptions
                c:7sus4 c:dim7 } }
          
[picture of music]

Putting the exceptions list encoded as

           \notes { <<c f g bes>>1-\markup { \super "7" "wahh" } }
          
into the property 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)
          
Then,
          #(append
            ... ignatzekExceptions)
          
adds the new exceptions to the default ones, which are defined in ly/chord-modifier-init.ly.
majorSevenSymbol
This property contains the markup object used for the 7th step, when it is major. Predefined options are whiteTriangleMarkup, blackTriangleMarkup. The following uses another popular shorthand.
          \context ChordNames \chords {
                c:7
                \property ChordNames.majorSevenSymbol = \markup { "j7" }
                c:7 }
          
[picture of music]

chordNameSeparator
Different parts of a chord name are normally separated by a slash. By setting chordNameSeparator, you can specify other separators, e.g.
          \context ChordNames \chords {
                c:7sus4
                \property ChordNames.chordNameSeparator = \markup { "|" }
                c:7sus4 }
          
[picture of music]
Go back to index of LilyPond.

Please send GNU LilyPond questions and comments to lilypond-user@gnu.org.

Please send comments on these web pages to (address unknown)

Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from LilyPond-1.7.14 (development-branch) by

Buchan Milne <(address unknown)>, Thu Mar 6 21:11:35 2003 CET.