]> git.donarmstrong.com Git - lilypond.git/blob - input/test/chord-names-dpnj.ly
* ly/chord-modifiers-init.ly:
[lilypond.git] / input / test / chord-names-dpnj.ly
1 \header {
2
3 texidoc = " Chord names are generated from a list pitches.  The
4 functions constructing the names are customisable. This file shows
5 Jazz chords.  Compare with chords-ignatzek.ly
6
7 }
8
9 chs = \notes \transpose c c' 
10 {
11         <<c e g>>1-"dpn"
12         <<c es g>>% m = minor triad
13         <<c e gis>>
14         <<c es ges>> \break
15         <<c e g bes>>
16         <<c es g bes>>
17         <<c e g b>>             % triangle = maj
18         <<c es ges beses>> 
19         <<c es ges b>> \break
20         <<c e gis bes>>
21         <<c es g b>>
22         <<c e gis b>> 
23         <<c es ges bes>>\break
24         <<c e g a>>   % 6 = major triad with added sixth
25         <<c es g a>>  % m6 = minor triad with added sixth
26         <<c e g bes d'>> 
27         <<c es g bes d'>> \break
28         <<c es g bes d' f' a' >>
29         <<c es g bes d' f' >>
30         <<c es ges bes d' >> 
31         <<c e g bes des' >> \break
32         <<c e g bes dis'>>
33         <<c e g bes d' f'>>
34         <<c e g bes d' fis'>>
35         <<c e g bes d' f' a'>>\break
36         <<c e g bes d' fis' as'>>
37         <<c e gis bes dis'>>
38         <<c e g bes dis' fis'>>
39         <<c e g bes d' f' as'>>\break
40         <<c e g bes des' f' as'>>
41         <<c e g bes d' fis'>>
42         <<c e g b d'>>
43         <<c e g bes d' f' as'>>\break
44         <<c e g bes des' f' as'>>
45         <<c e g bes des' f' a'>>
46         <<c e g b d'>>
47         <<c e g b d' f' a'>>\break
48         <<c e g b d' fis'>>
49         <<c e g bes des' f ' a'>>
50         <<c f g>>
51         <<c f g bes>>\break
52         <<c f g bes d'>>
53         <<c e g d'>>    % add9
54         <<c es g f'>>
55 }
56
57 efullmusic = \notes{
58     <<c e gis>>1-\markup { "+" }
59     <<c e g b>>-\markup { \normal-size-super
60     %                     \override #'(font-family . math) "N" }
61                           \override #'(font-family . math) "M" }
62     %%c:3.5.7 = \markup { \override #'(font-family . math) "M" }
63     %%c:3.5.7 = \markup { \normal-size-super "maj7" }
64
65    <<c es ges>>-\markup { \super "o" } % should be $\circ$ ?
66    <<c es ges bes>>-\markup { \super \combine "o" "/" }
67    <<c es ges beses>>-\markup { \super  "o7" }
68 }
69
70 efull = #(sequential-music-to-chord-exceptions efullmusic #f)
71
72 epartialmusic = \notes{
73     <<c d>>1-\markup { \normal-size-super "2" }
74     <<c es>>-\markup { "m" }
75     <<c f>>-\markup { \normal-size-super "sus4" }
76     <<c g>>-\markup { \normal-size-super "5" }
77     
78     %% TODO, partial exceptions
79     <<c es f>>-\markup { "m" }-\markup { \normal-size-super "sus4" }
80     <<c d es>>-\markup { "m" }-\markup { \normal-size-super "sus2" }
81 }
82
83 epartial = #(sequential-music-to-chord-exceptions epartialmusic #f)
84
85
86 \score{
87     <
88     \context ChordNames {
89         
90 %{
91      \property ChordNames.chordNameFunction = #double-plus-new-chord->markup
92      \property ChordNames.chordNameStyle = #'jazz
93 %}
94
95        \property ChordNames.majorSevenSymbol = #whiteTriangleMarkup
96        \property ChordNames.chordNameSeparator = #(make-simple-markup  "/")
97        \property ChordNames.chordNameExceptionsFull = #efull
98        \property ChordNames.chordNameExceptionsPartial = #epartial
99         
100         %% FIXME
101         %%\property ChordNames.chordNoteNamer = #'step->markup-ignatzek
102         %%chordRootNamer = #note-name->markup
103         
104         #(set-chord-name-style 'jazz)
105         
106         \chs
107     }
108     \context Staff \notes \transpose c c { \chs }
109     >
110     \paper{
111         \translator { 
112             \ChordNamesContext
113             ChordName \override #'word-space = #1 
114         }
115     }
116 }
117