]> Shamusworld >> Repos - music/blob - pop-chords.ly
Fixups for 'Christmas Time Is Here'.
[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 e g bes des' a'>-\markup { "13" \chordFlat "9" }
79
80         % Misc add chords
81
82         <c e g bes des' aes'>-\markup { "7" \chordFlat "9" \chordFlat "13" }
83         <c e gis bes des'>-\markup { "7" \chordSharp "5" \chordFlat "9" }
84         <c e g b d' fis'>-\markup { "maj9" \chordSharp "11" }
85         <c e g bes d' fis'>-\markup { "9" \chordSharp "11" }
86 %       <c e g bes d' a'>-\markup { "9/13" }
87 }
88
89 % Add to existing exceptions
90 popChordsAdd = #(append
91          (sequential-music-to-chord-exceptions popChordsMusic #t)
92          ignatzekExceptions)
93
94 % Bah, can't we set this globally? YES! See below...
95 % \set chordNameExceptions = #popChords
96
97 % Bah, this doesn't work either...
98 % #(set chordNameExceptions popChords)
99
100
101 % Let's try fixing the accidentals with some Scheme...
102
103 #(define (chord-name->pop-markup pitch lowercase?)
104
105   (let* ((alt (ly:pitch-alteration pitch)))
106
107   (make-line-markup
108     (list
109       (make-simple-markup (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch)))
110
111       ;; If it's natural, do nothing
112
113       (if (= alt 0)
114
115         (make-line-markup (list empty-markup))
116
117         (if (= alt FLAT)
118
119           ;; Otherwise, handle adding the flat symbol
120
121           (make-line-markup
122             (list
123               (make-hspace-markup 0.3) ;; WAS: 0.4
124               (make-tiny-markup (make-raise-markup 1.0
125                 (make-musicglyph-markup "accidentals.flat")))
126             )
127           )
128
129           ;; or handle adding the sharp symbol
130
131           (make-line-markup
132             (list
133               (make-hspace-markup 0.1) ;; WAS: 0.2
134               (make-teeny-markup (make-raise-markup 1.0
135                 (make-musicglyph-markup "accidentals.sharp")))
136             )
137           )
138
139         )
140
141       )
142
143     )
144   )
145
146   )
147 )
148
149 %{
150 popChords =
151 {
152   \set chordNameExceptions = #popChordsAdd
153   \set chordRootNamer = #chord-name->pop-markup
154   \override ChordName #'extra-spacing-width = #'(-1.25 . 1.25)
155 }
156 %}
157
158 \layout
159 {
160   \context
161   {
162     \Score
163     chordNameExceptions = #popChordsAdd
164     chordRootNamer = #chord-name->pop-markup
165     \override ChordName #'extra-spacing-width = #'(-1.25 . 1.25)
166   }
167 }