Next: Keyboards, Previous: Vocal music, Up: Top
These snippets illustrate the Notation Reference, section Chord notation.
When writing a figured bass, here's a way to specify if you want your
figures to be placed above or below the bass notes, by defining the
BassFigureAlignmentPositioning #'direction
property (exclusively
in a Staff
context). Choices are #UP
(or #1
),
#CENTER
(or #0
) and #DOWN
(or #-1
).
As you can see here, this property can be changed as many times as you
wish. Use \once \override
if you don't want the tweak to apply
to the whole score.
bass = { \clef bass g4 b, c d e d8 c d2} continuo = \figuremode { < _ >4 < 6 >8 \once \override Staff.BassFigureAlignmentPositioning #'direction = #CENTER <5/> < _ >4 \override Staff.BassFigureAlignmentPositioning #'direction = #UP < _+ > < 6 > \set Staff.useBassFigureExtenders = ##t \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN < 4 >4. < 4 >8 < _+ >4 } \score { << \new Staff = bassStaff \bass \context Staff = bassStaff \continuo >> }
To add bar line indications in the ChordNames
context, add the
Bar_engraver
.
\new ChordNames \with { \override BarLine #'bar-size = #4 \consists "Bar_engraver" } \chordmode { f1:maj7 f:7 bes:7 }
The separator between different parts of a chord name can be set to any markup.
\chords { c:7sus4 \set chordNameSeparator = \markup { \typewriter | } c:7sus4 }
The english naming of chords (default) can be changed to german
(\germanChords
replaces B and Bes to H and B) or semi-german
(\semiGermanChords
replaces B and Bes to H and Bb).
music = \chordmode { c1/c cis/cis b/b bis/bis bes/bes } %% The following is only here to print the names of the %% chords styles; it can be removed if you do not need to %% print them. \layout { \context {\ChordNames \consists Instrument_name_engraver } } << \new ChordNames { \set ChordNames.instrumentName = #"default" \music } \new ChordNames { \set ChordNames.instrumentName = #"german" \germanChords \music } \new ChordNames { \set ChordNames.instrumentName = #"semi-german" \semiGermanChords \music } \context Voice { \music } >>
Accidentals and plus signs can appear before or after the numbers,
depending on the figuredBassAlterationDirection
and
figuredBassPlusDirection
properties.
\figures { <6\+> <5+> <6 4-> r \set figuredBassAlterationDirection = #RIGHT <6\+> <5+> <6 4-> r \set figuredBassPlusDirection = #RIGHT <6\+> <5+> <6 4-> r \set figuredBassAlterationDirection = #LEFT <6\+> <5+> <6 4-> r }
The property chordNameExceptions
can be used to store a list of
special notations for specific chords.
% modify maj9 and 6(add9) % Exception music is chords with markups chExceptionMusic = { <c e g b d'>1-\markup { \super "maj9" } <c e g a d'>1-\markup { \super "6(add9)" } } % Convert music to list and prepend to existing exceptions. chExceptions = #( append ( sequential-music-to-chord-exceptions chExceptionMusic #t) ignatzekExceptions) theMusic = \chordmode { g1:maj9 g1:6.9 \set chordNameExceptions = #chExceptions g1:maj9 g1:6.9 } \layout { ragged-right = ##t } << \context ChordNames \theMusic \context Voice \theMusic >>
Clusters are a device to denote that a complete range of notes is to be played.
\layout { ragged-right = ##t } fragment = \relative c' { c4 f <e d'>4 <g a>8 <e a> a4 c2 <d b>4 e2 c } << \new Staff \fragment \new Staff \makeClusters \fragment >>
The placement of fingering numbers can be controlled precisely.
\relative c' { \set fingeringOrientations = #'(left) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(down) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(right) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(up) <c-1 e-3 a-5>4 \set fingeringOrientations = #'(left down) <c-1 e-3 a-5>2 \set fingeringOrientations = #'(up right down) <c-1 e-3 a-5>2 }
Figured bass often uses extenders to indicate continuation of the corresponding step. However, in this case lilypond is in greedy-mode and uses extenders whenever possible. To break individual extenders, one can simply use a modifier \! to a number, which breaks any extender attributed to that number right before the number.
bassfigures = \figuremode { \set useBassFigureExtenders = ##t <6 4>4 <6 4\!> <6 4\!> <6 4\!> | <6\! 4\!> <6 4> <6 4\!> <6 4> } << \new Staff \relative c'' { c1 c1 } \new FiguredBass \bassfigures >>
Chord names can be displayed only at the start of lines and when the chord changes.
harmonies = \chordmode { c1:m c:m \break c:m c:m d } << \new ChordNames { \set chordChanges = ##t \harmonies } \new Staff { \relative c' { \harmonies } } >>
When put together, chord names, a melody, and lyrics form a lead sheet:
<< \chords { c2 g:sus4 f e } \relative c'' { a4 e c8 e r4 b2 c4( d) } \addlyrics { One day this shall be free __ } >>
This template allows the preparation of a song with melody, words, and chords.
melody = \relative c' { \clef treble \key c \major \time 4/4 a4 b c d } text = \lyricmode { Aaa Bee Cee Dee } harmonies = \chordmode { a2 c } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Voice = "one" { \autoBeamOff \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } }
Here is a simple lead sheet template with melody, lyrics, chords and fret diagrams.
% Define the fret diagrams to be used cFretDiagram = \markup { \fret-diagram #"6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;" } gFretDiagram = \markup { \fret-diagram #"6-3-2;5-2-1;4-o;3-o;2-o;1-3-3;" } verseI = \lyricmode { \set stanza = #"1." This is the first verse } verseII = \lyricmode { \set stanza = #"2." This is the second verse. } theChords = \new ChordNames { \chordmode { % insert the chords for chordnames here c2 g4 c } } staffMelody = \new Staff { \context Voice = "voiceMelody" { \key c \major \clef treble \relative c' { % Type notes and fret diagram markups here c4^\cFretDiagram d8 e f4^\gFretDiagram g^\cFretDiagram \bar "|." } } } \score { << \theChords \staffMelody \new Lyrics = "lyricsI" \lyricmode { \lyricsto "voiceMelody" \verseI } \new Lyrics = "lyricsII" \lyricmode { \lyricsto "voiceMelody" \verseII } >> \layout { } \midi { } }
Want to prepare a lead sheet with a melody and chords? Look no further!
melody = \relative c' { \clef treble \key c \major \time 4/4 f4 e8[ c] d4 g a2 ~ a } harmonies = \chordmode { c4:m f:min7 g:maj c:aug d2:dim b:sus } \score { << \new ChordNames { \set chordChanges = ##t \harmonies } \new Staff \melody >> \layout{ } \midi { } }
By adding the Volta_engraver
to the relevant
staff, volte can be put under chords.
\score { << \chords { c1 c1 } \new Staff \with { \consists "Volta_engraver" } { \repeat volta 2 { c'1 } \alternative { c' } } >> \layout { \context { \Score \remove "Volta_engraver" } } }
This page is for LilyPond-2.11.58 (development-branch).
Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Your suggestions for the documentation are welcome.