]> git.donarmstrong.com Git - lilypond.git/blob - input/test/chord-names-dpnj.ly
*** empty log message ***
[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 @file{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 {
59     <<c e gis>>1-\markup { "+" }
60     <<c e g b>>-\markup { \normal-size-super
61     %                     \override #'(font-family . math) "N" }
62                           \override #'(font-family . math) "M" }
63     %%c:3.5.7 = \markup { \override #'(font-family . math) "M" }
64     %%c:3.5.7 = \markup { \normal-size-super "maj7" }
65
66    <<c es ges>>-\markup { \super "o" } % should be $\circ$ ?
67    <<c es ges bes>>-\markup { \super \combine "o" "/" }
68    <<c es ges beses>>-\markup { \super  "o7" }
69 }
70
71 efull = #(sequential-music-to-chord-exceptions efullmusic #f)
72
73 epartialmusic = \notes{
74     <<c d>>1-\markup { \normal-size-super "2" }
75     <<c es>>-\markup { "m" }
76     <<c f>>-\markup { \normal-size-super "sus4" }
77     <<c g>>-\markup { \normal-size-super "5" }
78     
79     %% TODO, partial exceptions
80     <<c es f>>-\markup { "m" }-\markup { \normal-size-super "sus4" }
81     <<c d es>>-\markup { "m" }-\markup { \normal-size-super "sus2" }
82 }
83
84 epartial = #(sequential-music-to-chord-exceptions epartialmusic #f)
85
86
87 \score{
88     <
89     \context ChordNames {
90         
91 %{
92      \property ChordNames.chordNameFunction = #double-plus-new-chord->markup
93      \property ChordNames.chordNameStyle = #'jazz
94 %}
95
96        \property ChordNames.majorSevenSymbol = #whiteTriangleMarkup
97        \property ChordNames.chordNameSeparator = #(make-simple-markup  "/")
98        \property ChordNames.chordNameExceptionsFull = #efull
99        \property ChordNames.chordNameExceptionsPartial = #epartial
100         
101         %% FIXME
102         %%\property ChordNames.chordNoteNamer = #'step->markup-ignatzek
103         %%chordRootNamer = #note-name->markup
104         
105         #(set-chord-name-style 'jazz)
106         
107         \chs
108     }
109     \context Staff \notes \transpose c c { \chs }
110     >
111     \paper{
112         \translator { 
113             \ChordNamesContext
114             ChordName \override #'word-space = #1 
115         }
116     }
117 }
118