]> git.donarmstrong.com Git - lilypond.git/blob - input/test/chord-names-jazz.ly
ba9ad704015ad54d20a4e37b71f04b08e1f488f7
[lilypond.git] / input / test / chord-names-jazz.ly
1 \version "1.9.1"
2
3
4 \header {
5
6 texidoc = " Chord names are generated from a list pitches.  The
7 functions constructing the names are customisable. This file shows
8 Jazz chords, following Ignatzek (1995), page 17 and 18, Banter chords,
9 and an alternative Jazz  chord notation.
10
11
12 "
13
14 }
15
16 chs = \notes \transpose c' c' 
17 {
18         <<c e g>>1
19         <<c es g>>% m = minor triad
20         <<c e gis>>
21         <<c es ges>> \break
22         <<c e g bes>>
23         <<c es g bes>>
24         <<c e g b>>             % triangle = maj
25         <<c es ges beses>> 
26         <<c es ges b>> \break
27         <<c e gis bes>>
28         <<c es g b>>
29         <<c e gis b>> 
30         <<c es ges bes>>\break
31         <<c e g a>>   % 6 = major triad with added sixth
32         <<c es g a>>  % m6 = minor triad with added sixth
33         <<c e g bes d'>> 
34         <<c es g bes d'>> \break
35         <<c es g bes d' f' a' >>
36         <<c es g bes d' f' >>
37         <<c es ges bes d' >> 
38         <<c e g bes des' >> \break
39         <<c e g bes dis'>>
40         <<c e g bes d' f'>>
41         <<c e g bes d' fis'>>
42         <<c e g bes d' f' a'>>\break
43         <<c e g bes d' fis' as'>>
44         <<c e gis bes dis'>>
45         <<c e g bes dis' fis'>>
46         <<c e g bes d' f' as'>>\break
47         <<c e g bes des' f' as'>>
48         <<c e g bes d' fis'>>
49         <<c e g b d'>>
50         <<c e g bes d' f' as'>>\break
51         <<c e g bes des' f' as'>>
52         <<c e g bes des' f' a'>>
53         <<c e g b d'>>
54         <<c e g b d' f' a'>>\break
55         <<c e g b d' fis'>>
56         <<c e g bes des' f ' a'>>
57         <<c f g>>
58         <<c f g bes>>\break
59         <<c f g bes d'>>
60         <<c e g d'>>    % add9
61         <<c es g f'>>
62 }
63
64
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 % alternate Jazz notation
67
68 efullmusicJazzAlt = \notes
69 {
70     <<c e gis>>1\markup { "+" }
71     <<c e g b>>\markup { \normal-size-super
72     %                     \override #'(font-family . math) "N" }
73                           \override #'(font-family . math) "M" }
74     %%c:3.5.7 = \markup { \override #'(font-family . math) "M" }
75     %%c:3.5.7 = \markup { \normal-size-super "maj7" }
76
77    <<c es ges>>\markup { \super "o" } % should be $\circ$ ?
78    <<c es ges bes>>\markup { \super \combine "o" "/" }
79    <<c es ges beses>>\markup { \super  "o7" }
80 }
81
82 efullJazzAlt = #(sequential-music-to-chord-exceptions efullmusicJazzAlt #f)
83
84 epartialmusicJazzAlt = \notes{
85     <<c d>>1\markup { \normal-size-super "2" }
86     <<c es>>\markup { "m" }
87     <<c f>>\markup { \normal-size-super "sus4" }
88     <<c g>>\markup { \normal-size-super "5" }
89     
90     %% TODO, partial exceptions
91     <<c es f>>\markup { "m" }\markup { \normal-size-super "sus4" }
92     <<c d es>>\markup { "m" }\markup { \normal-size-super "sus2" }
93 }
94
95 epartialJazzAlt = #(sequential-music-to-chord-exceptions epartialmusicJazzAlt #f)
96
97 jazzAltProperties =
98
99 \sequential { 
100             \property ChordNames.majorSevenSymbol = #whiteTriangleMarkup
101             \property ChordNames.chordNameSeparator = #(make-simple@\markup  "/")
102             \property ChordNames.chordNameExceptionsFull = #efullJazzAlt
103             \property ChordNames.chordNameExceptionsPartial = #epartialJazzAlt
104             \property ChordNames.chordNameFunction = #jazz-chord-names
105 }
106
107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108
109 banterProperties = \sequential { 
110             \property ChordNames.chordNameFunction = #banter-chord-names
111 }
112
113 \score{
114     <
115         \context ChordNames {
116             \property ChordNames.instrument = #"Ignatzek (default)"
117             \property ChordNames.instr = #"Def"
118             \chs }
119         \context ChordNames = ALT {
120             \property ChordNames.instrument = #"Alternative"
121             \property ChordNames.instr = #"Alt"
122             \jazzAltProperties
123             \chs }
124
125         % This is the banter style.
126         % it gives exceedingly verbose (wide) names
127         % making this file take up to 4 pages.
128         
129 %{
130                 \context ChordNames = BANTER  {
131             \banterProperties
132             \chs
133             }
134 %}
135         \context Staff \notes \transpose c c' { \chs }
136     >
137     \paper{
138         indent = 3.\cm
139         \translator { 
140             \ChordNamesContext
141             ChordName \override #'word-space = #1
142             \consists Instrument_name_engraver
143         }
144     }
145 }
146