[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/development
lilypond.org/stable
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'' \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'' \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'1 e' g'>
       <e' g' c''>
       <e e' g' c''>
     }
     
     \score {
       <
         \context ChordNames \scheme
         \context Staff \scheme
       >
     }
     
[picture of music]

By default, a chord name system proposed by Harald Banter (See Literature) is used. The system is very regular and predictable. Typical American style chord names may be selected by setting the style property of the ChordNames.ChordName object to 'american. Similarly 'jazz selects Jazz chordnames.

Routines that determine the names to be printed are written in Scheme, and may be customized by the user. The code can be found in scm/chord-name.scm. Here's an example showing the differences in chord name styles:

     scheme = \chords {
       c1 c:5^3 c:4^3 c:5+
       c:m7+ c:m5-.7
       c:5-.7 c:5+.7
       c:9^7
     }
     
     \score {
       \notes <
         \context ChordNames = banter \scheme
         \context ChordNames = american {
           \property ChordNames.ChordName \override
             #'style = #'american \scheme }
         \context ChordNames = jazz {
           \property ChordNames.ChordName \override
             #'style = #'jazz \scheme }
         \context Staff \transpose c'' \scheme
       >
     }
     

[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.6.6 (stable-branch) by

<(address unknown)>, Thu Dec 26 14:15:44 2002 MSK.