]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/chords.itely
Modify chord handling to handle guitar capos
[lilypond.git] / Documentation / notation / chords.itely
index 50ac2bf9ed2277191bae3c5a9a8be1c3670f74c9..baa216b0052d85b0d8557850acabeac00f1860c0 100644 (file)
@@ -506,6 +506,56 @@ Rests passed to a @code{ChordNames} context will cause the
 }
 @end lilypond
 
+@cindex Transposing guitar chords for capo
+
+If the @code{capoPitch} property is set, then the chords will additionally be printed
+transposed for a guitar with the capo set appropriately. By default the chords are
+printed on one line, but if the @code{capoVertical} property is set, the chords will be
+printed one above the other.
+
+In make-pitch, leave the first argument at 0, the second argument is the
+interval (-2 is a third), and the third argument adjusts it up or down a
+semitone.
+
+@lilypond[verbatim,quote,ragged-right]
+<<
+  \new ChordNames \chordmode {
+    c1
+    r1
+    g1
+    c1
+    \break
+    c1
+    r1
+    g1
+    c1
+    \break
+    c1
+    r1
+    g1
+    c1
+  }
+  \chordmode {
+    c1
+    r1
+    g1
+    c1
+    \break
+    \set ChordNames.capoPitch = #(ly:make-pitch 0 -2 -1/2)
+    c1
+    r1
+    g1
+    c1
+    \break
+    \set ChordNames.capoVertical = ##t
+    c1
+    r1
+    g1
+    c1
+  }
+>>
+@end lilypond
+
 @snippets
 
 @c Keep index entries with following snippet