]> Shamusworld >> Repos - music/blob - pop-chords.ly
New charts "How Great Thou Art" and "In The Garden".
[music] / pop-chords.ly
1 % Pop chords as used in English/American popular music
2 % by James L. Hammons
3
4 % Written against \version "2.16.0"
5
6 % Was \raise #1.0 for both
7 chordFlat = \markup { \hspace #0.2 \tiny \raise #0.8 \flat }
8 chordSharp = \markup { \hspace #0.1 \teeny \raise #0.8 \sharp }
9
10 popChordsMusic =
11 {
12         % Triads
13
14         <c g>-\markup { "5" }
15         <c d g>-\markup { "2" }
16 %       <c d g>-\markup { "sus2" }
17         <c f g>-\markup { "sus" }
18 %       <c f g>-\markup { "sus4" }
19 %       <c ees ges>-\markup { \small \raise #1.0 "o" }
20         <c ees ges>-\markup { \raise #0.8 "o" }
21 %       <c ees ges>-\markup { "dim" }
22 %       <c e gis>-\markup { "aug" }                                                                     % or +
23
24         % Sixths
25
26         <c e g a>-\markup { "6" }
27         <c ees g a>-\markup { "m6" }
28
29         % Sevenths (including altered)
30
31         <c e g bes>-\markup { "7" }
32         <c ees g bes>-\markup { "m7" }
33         <c e g b>-\markup { "maj7" }
34         <c f g bes>-\markup { "7sus4" }
35         <c d g bes>-\markup { "7sus2" }
36         <c e ges bes>-\markup { "7" \chordFlat "5" }
37         <c e gis bes>-\markup { "7" \chordSharp "5" }
38 %       <c e gis bes>-\markup { "aug7" }                                                        % or +7
39         <c ees g b>-\markup { "m(maj7)" }
40 %       <c ees ges beses>-\markup { \small \raise #1.0 { "o" } "7" }
41         <c ees ges beses>-\markup { \raise #0.8 { "o" } "7" }
42 %       <c ees ges beses>-\markup { "dim7" }
43 %       <c ees ges bes>-\markup { \small \raise #1.0 { $(ly:wide-char->utf-8 #x00f8) } "7" }
44 %       <c ees ges bes>-\markup { \raise #0.8 { $(ly:wide-char->utf-8 #x00f8) } "7" }
45         <c ees ges bes>-\markup { "m7" \chordFlat "5" }
46         <c e ges b>-\markup { "maj7" \chordFlat "5" }
47         <c e gis b>-\markup { "maj7" \chordSharp "5" }
48
49         % Ninths (including altered--incomplete)
50
51         <c e g bes d'>-\markup { "9" }
52         <c ees g bes d'>-\markup { "m9" }
53         <c e g b d'>-\markup { "maj9" }
54         <c e g d'>-\markup { "add9" }
55         <c e g a d'>-\markup { "6/9" }
56         <c ees g a d'>-\markup { "m6/9" }
57         <c ees g b d'>-\markup { "m(maj9)" }
58         <c e g bes des'>-\markup { "7" \chordFlat "9" }
59         <c e g bes dis'>-\markup { "7" \chordSharp "9" }
60 %dim7add9, dim7b9, dim7#9, 9#5, 9b5, maj9#5, maj9b5, 9sus4, 9sus2
61         <c e gis bes dis'>-\markup { "+7" \chordSharp "9" }
62
63         % Elevenths (incomplete)
64
65         <c e g bes d' f'>-\markup { "11" }
66         <c ees g bes d' f'>-\markup { "m11" }
67         <c e g b d' f'>-\markup { "maj11" }
68         <c e g f'>-\markup { "add11" }
69         <c ees g f'>-\markup { "m add11" }
70         <c ees g bes f'>-\markup { "m7add11" }
71
72         % Thirteenths (incomplete)
73
74         <c e g bes d' a'>-\markup { "13" }
75         <c ees g bes d' a'>-\markup { "m13" }
76         <c e g b d' a'>-\markup { "maj13" }
77         <c e g a'>-\markup { "add13" }
78         <c ees g a'>-\markup { "m add13" }
79         <c e g bes des' a'>-\markup { "13" \chordFlat "9" }
80
81         % Misc add chords
82
83         <c e g bes des' aes'>-\markup { "7" \chordFlat "9" \chordFlat "13" }
84         <c e gis bes des'>-\markup { "7" \chordSharp "5" \chordFlat "9" }
85         <c e g b d' fis'>-\markup { "maj9" \chordSharp "11" }
86         <c e g bes d' fis'>-\markup { "9" \chordSharp "11" }
87 %       <c e g bes d' a'>-\markup { "9/13" }
88 }
89
90 % Add to existing exceptions
91 popChordsAdd = #(append
92          (sequential-music-to-chord-exceptions popChordsMusic #t)
93          ignatzekExceptions)
94
95 % Bah, can't we set this globally? YES! See below...
96 % \set chordNameExceptions = #popChords
97
98 % Bah, this doesn't work either...
99 % #(set chordNameExceptions popChords)
100
101
102 % Let's try fixing the accidentals with some Scheme...
103
104 #(define (chord-name->pop-markup pitch lowercase?)
105
106   (let* ((alt (ly:pitch-alteration pitch)))
107
108   (make-line-markup
109     (list
110       (make-simple-markup (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch)))
111
112       ;; If it's natural, do nothing
113
114       (if (= alt 0)
115
116         (make-line-markup (list empty-markup))
117
118         (if (= alt FLAT)
119
120           ;; Otherwise, handle adding the flat symbol
121
122           (make-line-markup
123             (list
124               (make-hspace-markup 0.3) ;; WAS: 0.4
125               (make-tiny-markup (make-raise-markup 1.0
126                 (make-musicglyph-markup "accidentals.flat")))
127             )
128           )
129
130           ;; or handle adding the sharp symbol
131
132           (make-line-markup
133             (list
134               (make-hspace-markup 0.1) ;; WAS: 0.2
135               (make-teeny-markup (make-raise-markup 1.0
136                 (make-musicglyph-markup "accidentals.sharp")))
137             )
138           )
139
140         )
141
142       )
143
144     )
145   )
146
147   )
148 )
149
150 %{
151 popChords =
152 {
153   \set chordNameExceptions = #popChordsAdd
154   \set chordRootNamer = #chord-name->pop-markup
155   \override ChordName #'extra-spacing-width = #'(-1.25 . 1.25)
156 }
157 %}
158
159 \layout
160 {
161   \context
162   {
163     \Score
164     chordNameExceptions = #popChordsAdd
165     chordRootNamer = #chord-name->pop-markup
166     \override ChordName #'extra-spacing-width = #'(-1.25 . 1.25)
167   }
168 }