[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Chord library
From: |
Sébastien Gross |
Subject: |
Chord library |
Date: |
Thu, 21 Dec 2006 16:26:31 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi there,
I am working on a guitar chord library for lily [1] based on the
\fret-diagram command.
The generator is written in python.
The chord configuration file is quite simple:
a section header indicates the chord type. Followin lines a defining a
chord name. If a chord name ends with "-b" the chord is considered a a
barred chord and would be expanded througth the whole neck.
If a chord has more than definition then a "-Two-" or "-Three-" ...
should be placed after the pitch name.
My explainations may be confusing (my english is not perfect :-/), so
this is an example:
[m]
# pitch 6th 5th 4th 3rd 2nd 1st
# E A D G B E
d = x x o 2-2 3-3 1-1
dis-b = x x 1-1 3-3 4-4 2-2
d-Two = x o o 2-2 3-3 1-1
dis-Two-b = x 1-1 1-1 3-3 4-4 2-2
o = open string
x = muted string
x-y = fret-finger
Barre are autodetected
d => a classic Dm chord
d-Two => a variation of Dm including open A on the 5th string.
dis-b => the Dm chord played one fret higher to be expaned to the whole
neck
dis-Two-b => same as dis-b with the 5th string
the gen-chords.py script will generate chords commands like:
dm = \markup{ \fret-diagram
#"d:0.25;f:2;h:4;p:0.6;s:1;w:6;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;" }
dmTwo = \markup{ \fret-diagram
#"d:0.25;f:2;h:4;p:0.6;s:1;w:6;6-x;5-o;4-o;3-2-2;2-3-3;1-1-1;" }
dismITwo = \markup{ \fret-diagram
#"d:0.25;f:2;h:4;p:0.6;s:1;w:6;c:5-4-1;6-x;5-1-1;4-1-1;3-3-3;2-4-4;1-2-2;" }
eesmITwo = \markup{ \fret-diagram
#"d:0.25;f:2;h:4;p:0.6;s:1;w:6;c:5-4-1;6-x;5-1-1;4-1-1;3-3-3;2-4-4;1-2-2;" }
emIITwo = \markup{ \fret-diagram
#"d:0.25;f:2;h:4;p:0.6;s:1;w:6;c:5-4-2;6-x;5-2-1;4-2-1;3-4-3;2-5-4;1-3-2;" }
fmIIITwo = \markup{ \fret-diagram
#"d:0.25;f:2;h:4;p:0.6;s:1;w:6;c:5-4-3;6-x;5-3-1;4-3-1;3-5-3;2-6-4;1-4-2;" }
fismIVTwo = \markup{ \fret-diagram
#"d:0.25;f:2;h:4;p:0.6;s:1;w:6;c:5-4-4;6-x;5-4-1;4-4-1;3-6-3;2-7-4;1-5-2;" }
[...]
fmIIITwo => A Fm chord played on the 3rd fret variation named "Two".
Then in an lilypond file you can use:
^\fmIIITwo
To call this chord.
a chord name is defined using this rule:
# M|m|sus(Two|Four)
# M = Major chords
# m = minor chords
# sus = suspended chords (no 3rd)
#
# Additionnal tones:
#
# (no|add)?(d|M|A)(Eight) <- should not be used
# (no|add)?(d|m|M|A)(Two|Three|Six|Seven|Nine|Ten|Thirteen|Fourteen)
# (no|add)?(d|P|A)(Four|Five|Eleven|Twelve)
#
# d = diminished
# M = Major
# P = Perfect
# m = minor
# A = Augmented
Thus:
[m] => minor
[MmSevenAFive] => 7/5#
[mmSevendFive] => m7b5
[susFourmSeven] => 7sus4
....
Currently not a lot of chord are defined and the generator is still
experimental. The aim of this library is to get a lot of predefined
chords out-of-the-box to prevent from redefining them in all files.
Comments are welcome.
Merry Xmas & happy new year.
[1] - http://lilypond.chezwam.org/cgi-bin/darcsweb.cgi?r=Lilypond
- http://lilypond.chezwam.org/darcs/lilypond/tools/chords-dict/
--
Sebastien Gross
- Chord library,
Sébastien Gross <=