Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 3a7b4dfc766af1222d90c7f03a0844e6 > files > 10226

lilypond-doc-2.11.57-1mdv2009.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- header_tag -->
<html lang="en">
<head>
<title>Chords - LilyPond snippets</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="LilyPond snippets">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Vocal-music.html#Vocal-music" title="Vocal music">
<link rel="next" href="Keyboards.html#Keyboards" title="Keyboards">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
hr { border:0; height:1; color: #000000; background-color: #000000; }
/* hr {
  border:  none;
  height: 1px;
  color: #666666;
  background-color: #666666;
}
body {
  border-left: 1px solid #666666;
  border-right: 1px solid #666666;
  color: #332d28;
  margin-right: auto;
  margin-left: auto;
  width: 60em;
  list-style-type: square;
  font-family: Arial,Helvetica,sans-serif;
  padding-right: 1em;
  padding-left: 1em;
}
a {
  border-bottom: 1px dashed #344242;
  text-decoration: none;
  color: #344242;
}
a:link {
  text-decoration: none;
}
a:visited {
  border-bottom: 1px dashed #666666;
  color: #666666;
}
a:active {
  border-bottom: 1px solid #00cccc;
  color: #00cccc;
}
a:hover {
  border-bottom: 1px solid #1d7b85;
  color: #1d7b85;
}
blockquote {
  border: 1px solid #cccccc;
  padding: 3px;
  width: 40em;
}
.node {
  border-left: 1px solid #666666;
  margin: -0.5em 0px 1em;
  padding: 2px 1px 0px;
  font-style: italic;
}
.node a {
  border:  none;
  text-decoration: underline;
  font-style: normal;
  font-weight: bold;
}
.verbatim {
  font-family: "Courier New",Courier,monospace;
}
.unnumberedsubsubsec {
  font-size: large;
  color: #1d7b85;
}
.subsubheading {
  font-size: large;
  color: #3b220d;
}
.contents {
  border: 1px dashed #339999;
  margin: 3px 2em;
  list-style-type: square;
  padding-right: 1em;
  width: 40em;
  background-color: #fcfff9;
}
.contents a {
  border-bottom: 1px dashed #423d34;
  text-decoration: none;
  color: #423d34;
}
.contents a:visited {
  border-bottom: 1px dashed #666666;
  color: #666666;
}
.contents a:active {
  border-bottom: 1px solid #f0d86d;
  color: #f0d86d;
}
.contents a:hover {
  border-bottom: 1px solid #3b220d;
  color: #3b220d;
}
.menu {
  border-left: 1px dashed #339999;
  margin: 3px 2em 1em;
  list-style-type: square;
  padding-left: 1.4em;
  width: 40em;
}
.unnumbered {
}
h2 {
  font-size: x-large;
  color: #1d7b85;
}
*/
--></style>
</head>
<BODY BGCOLOR=WHITE TEXT=BLACK>

<div class="node">
<p>
<a name="Chords"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Keyboards.html#Keyboards">Keyboards</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Vocal-music.html#Vocal-music">Vocal music</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>

<h2 class="unnumbered">Chords</h2>

<p>These snippets illustrate the Notation Reference,
section <a href="../../../Documentation/user/lilypond/Chord-notation.html#Chord-notation">Chord notation</a>.

   <p><a name="adding-a-figured-bass-above-or-below-the-notes.ly"></a>

<h3 class="unnumberedsec">Adding a figured bass above or below the notes</h3>

<p>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
<code>BassFigureAlignmentPositioning #'direction</code> property (exclusively
in a <code>Staff</code> context). Choices are <code>#UP</code> (or <code>#1</code>),
<code>#CENTER</code> (or <code>#0</code>) and <code>#DOWN</code> (or <code>#-1</code>).

   <p>As you can see here, this property can be changed as many times as you
wish. Use <code>\once \override</code> if you don't want the tweak to apply
to the whole score.

<pre class="verbatim">
bass = { \clef bass g4 b, c d e d8 c d2}
continuo = \figuremode {
         &lt; _ >4 &lt; 6 >8   
   \once \override Staff.BassFigureAlignmentPositioning #'direction = #CENTER
         &lt;5/>  &lt; _ >4 
   \override Staff.BassFigureAlignmentPositioning #'direction = #UP
         &lt; _+ > &lt; 6 >
   \set Staff.useBassFigureExtenders = ##t
   \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
         &lt; 4 >4. &lt; 4 >8 &lt; _+ >4
       } 
\score {
    &lt;&lt; \new Staff = bassStaff \bass 
    \context Staff = bassStaff \continuo >>
}

</pre>
<p>
 <a href="../c3/lily-30b0c753.ly">
  <img align="middle"
    border="0" src="../c3/lily-30b0c753.png" alt="[image of music]">
 </a>
</p>

   <p><a name="adding-bar-lines-to-chordnames-context.ly"></a>

<h3 class="unnumberedsec">Adding bar lines to ChordNames context</h3>

<p>To add bar line indications in the <code>ChordNames</code> context, add the
<code>Bar_engraver</code>.

<pre class="verbatim">
\new ChordNames \with {
  \override BarLine #'bar-size = #4
  \consists "Bar_engraver"
}
\chordmode {
  f1:maj7 f:7 bes:7 
}

</pre>
<p>
 <a href="../05/lily-007354c5.ly">
  <img align="middle"
    border="0" src="../05/lily-007354c5.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-chord-separator.ly"></a>

<h3 class="unnumberedsec">Changing chord separator</h3>

<p>The separator between different parts of a chord name can be set to any
markup.

<pre class="verbatim">
\chords {
  c:7sus4
  \set chordNameSeparator
    = \markup { \typewriter | }
  c:7sus4
}
</pre>
<p>
 <a href="../ef/lily-83aff558.ly">
  <img align="middle"
    border="0" src="../ef/lily-83aff558.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-the-chord-names-to-german-or-semi-german-notation.ly"></a>

<h3 class="unnumberedsec">Changing the chord names to German or semi-German notation</h3>

<p>The english naming of chords (default) can be changed to german
(<code>\germanChords</code> replaces B and Bes to H and B) or semi-german
(<code>\semiGermanChords</code> replaces B and Bes to H and Bb).

<pre class="verbatim">
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 }
}

&lt;&lt;
  \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 }
>>
</pre>
<p>
 <a href="../88/lily-241c7b92.ly">
  <img align="middle"
    border="0" src="../88/lily-241c7b92.png" alt="[image of music]">
 </a>
</p>

   <p><a name="changing-the-positions-of-figured-bass-alterations.ly"></a>

<h3 class="unnumberedsec">Changing the positions of figured bass alterations</h3>

<p>Accidentals and plus signs can appear before or after the numbers,
depending on the <code>figuredBassAlterationDirection</code> and
<code>figuredBassPlusDirection</code> properties.

<pre class="verbatim">
\figures {
  &lt;6\+> &lt;5+> &lt;6 4-> r
  \set figuredBassAlterationDirection = #RIGHT
  &lt;6\+> &lt;5+> &lt;6 4-> r
  \set figuredBassPlusDirection = #RIGHT
  &lt;6\+> &lt;5+> &lt;6 4-> r
  \set figuredBassAlterationDirection = #LEFT
  &lt;6\+> &lt;5+> &lt;6 4-> r
}
</pre>
<p>
 <a href="../85/lily-62ee5ccc.ly">
  <img align="middle"
    border="0" src="../85/lily-62ee5ccc.png" alt="[image of music]">
 </a>
</p>

   <p><a name="chord-name-exceptions.ly"></a>

<h3 class="unnumberedsec">Chord name exceptions</h3>

<p>The property <code>chordNameExceptions</code> can be used to store a list of
special notations for specific chords.

<pre class="verbatim">
% modify maj9 and 6(add9)
% Exception music is chords with markups
chExceptionMusic = {
  &lt;c e g b d'>1-\markup { \super "maj9" }
  &lt;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 
}

&lt;&lt; \context ChordNames \theMusic
   \context Voice \theMusic
>>  
</pre>
<p>
 <a href="../7e/lily-f3b7d9a3.ly">
  <img align="middle"
    border="0" src="../7e/lily-f3b7d9a3.png" alt="[image of music]">
 </a>
</p>

   <p><a name="clusters.ly"></a>

<h3 class="unnumberedsec">Clusters</h3>

<p>Clusters are a device to denote that a complete range of notes is to be
played.

<pre class="verbatim">
\layout {
  ragged-right = ##t 
}

fragment = \relative c' {
  c4 f &lt;e d'>4
  &lt;g a>8 &lt;e a> a4 c2 &lt;d b>4
  e2 c
}

&lt;&lt;
  \new Staff \fragment
  \new Staff \makeClusters \fragment
>>
</pre>
<p>
 <a href="../67/lily-7b23dbb9.ly">
  <img align="middle"
    border="0" src="../67/lily-7b23dbb9.png" alt="[image of music]">
 </a>
</p>

   <p><a name="controlling-the-placement-of-chord-fingerings.ly"></a>

<h3 class="unnumberedsec">Controlling the placement of chord fingerings</h3>

<p>The placement of fingering numbers can be controlled precisely.

<pre class="verbatim">
\relative c' {
  \set fingeringOrientations = #'(left)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(down)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(right)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(up)
  &lt;c-1 e-3 a-5>4
  \set fingeringOrientations = #'(left down)
  &lt;c-1 e-3 a-5>2
  \set fingeringOrientations = #'(up right down)
  &lt;c-1 e-3 a-5>2
}
</pre>
<p>
 <a href="../de/lily-34875599.ly">
  <img align="middle"
    border="0" src="../de/lily-34875599.png" alt="[image of music]">
 </a>
</p>

   <p><a name="manually-break-figured-bass-extenders-for-only-some-numbers.ly"></a>

<h3 class="unnumberedsec">Manually break figured bass extenders for only some numbers</h3>

<p>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.

<pre class="verbatim">
bassfigures = \figuremode { 
  \set useBassFigureExtenders = ##t
  &lt;6 4>4 &lt;6 4\!> &lt;6 4\!> &lt;6 4\!> |  &lt;6\! 4\!>  &lt;6 4> &lt;6 4\!> &lt;6 4>
}

&lt;&lt;
  \new Staff \relative c'' { c1 c1 }
  \new FiguredBass \bassfigures
>>


</pre>
<p>
 <a href="../9b/lily-4eb6597f.ly">
  <img align="middle"
    border="0" src="../9b/lily-4eb6597f.png" alt="[image of music]">
 </a>
</p>

   <p><a name="showing-chords-at-changes.ly"></a>

<h3 class="unnumberedsec">Showing chords at changes</h3>

<p>Chord names can be displayed only at the start of lines and when the
chord changes.

<pre class="verbatim">
harmonies = \chordmode {
  c1:m c:m \break c:m c:m d
}
&lt;&lt;
  \new ChordNames {
    \set chordChanges = ##t
    \harmonies
  }
  \new Staff {
    \relative c' { \harmonies }
  }
>>
</pre>
<p>
 <a href="../40/lily-172c2808.ly">
  <img align="middle"
    border="0" src="../40/lily-172c2808.png" alt="[image of music]">
 </a>
</p>

   <p><a name="simple-lead-sheet.ly"></a>

<h3 class="unnumberedsec">Simple lead sheet</h3>

<p>When put together, chord names, a melody, and lyrics form a lead sheet:

<pre class="verbatim">
&lt;&lt;
  \chords { c2 g:sus4 f e }
  \relative c'' {
    a4 e c8 e r4
    b2 c4( d)
  }
  \addlyrics { One day this shall be free __ }
>>
</pre>
<p>
 <a href="../0b/lily-af9b8f17.ly">
  <img align="middle"
    border="0" src="../0b/lily-af9b8f17.png" alt="[image of music]">
 </a>
</p>

   <p><a name="single-staff-template-with-notes,-lyrics,-and-chords.ly"></a>

<h3 class="unnumberedsec">Single staff template with notes, lyrics, and chords</h3>

<p>This template allows the preparation of a song with melody, words, and
chords.

<pre class="verbatim">
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 {
  &lt;&lt;
    \new ChordNames {
      \set chordChanges = ##t
      \harmonies
    }
    \new Voice = "one" { \autoBeamOff \melody }
    \new Lyrics \lyricsto "one" \text
  >>
  \layout { }
  \midi { }
}
</pre>
<p>
 <a href="../2c/lily-39f4b2ad.ly">
  <img align="middle"
    border="0" src="../2c/lily-39f4b2ad.png" alt="[image of music]">
 </a>
</p>

   <p><a name="single-staff-template-with-notes,-lyrics,-chords-and-frets.ly"></a>

<h3 class="unnumberedsec">Single staff template with notes, lyrics, chords and frets</h3>

<p>Here is a simple lead sheet template with melody, lyrics, chords and
fret diagrams.

<pre class="verbatim">
% 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 {
  &lt;&lt;
    \theChords
    \staffMelody
    \new Lyrics = "lyricsI" \lyricmode {
      \lyricsto "voiceMelody" \verseI
    }
    \new Lyrics = "lyricsII" \lyricmode {
      \lyricsto "voiceMelody" \verseII
    }
  >>
  \layout { }
  \midi { }
}
</pre>
<p>
 <a href="../65/lily-041c2551.ly">
  <img align="middle"
    border="0" src="../65/lily-041c2551.png" alt="[image of music]">
 </a>
</p>

   <p><a name="single-staff-template-with-notes-and-chords.ly"></a>

<h3 class="unnumberedsec">Single staff template with notes and chords</h3>

<p>Want to prepare a lead sheet with a melody and chords? Look no further!

<pre class="verbatim">
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 {
  &lt;&lt;
    \new ChordNames {
      \set chordChanges = ##t
      \harmonies
    }
    \new Staff \melody
  >>  
  \layout{ }
  \midi { }
}
</pre>
<p>
 <a href="../dd/lily-c67e885a.ly">
  <img align="middle"
    border="0" src="../dd/lily-c67e885a.png" alt="[image of music]">
 </a>
</p>

   <p><a name="volta-below-chords.ly"></a>

<h3 class="unnumberedsec">Volta under chords</h3>

<p>By adding the <code>Volta_engraver</code> to the relevant
staff, volte can be put under chords.
<pre class="verbatim">
\score {
  &lt;&lt;
    \chords {
      c1
      c1
    }
    \new Staff \with { \consists "Volta_engraver" } {
      \repeat volta 2 { c'1 }
      \alternative { c' }
    }
  >>
  \layout {
    \context {
      \Score
      \remove "Volta_engraver"
    }
  }
}
</pre>
<p>
 <a href="../22/lily-5adaa60e.ly">
  <img align="middle"
    border="0" src="../22/lily-5adaa60e.png" alt="[image of music]">
 </a>
</p>

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Keyboards.html#Keyboards">Keyboards</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Vocal-music.html#Vocal-music">Vocal music</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
</div>

<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
<p>
<font size="-1">
This page is for LilyPond-2.11.57 (development-branch).
<br>
<address>
Report errors to <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs</a>. </address>
<br>
Your <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions for the documentation</a> are welcome.
</font>
</p>
</div>

</BODY></html>