]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/chord-name-exceptions.ly
d08bb1d721d8368c37dad275743c686118eed4ab
[lilypond.git] / input / regression / chord-name-exceptions.ly
1 \version "2.3.17"
2 \header { texidoc = "The property @code{chordNameExceptions} can used
3     to store a list of special notations for specific chords.
4
5 Putting the exceptions list encoded as
6 @example
7         \ @{ <c f g bes>1\\markup @{ \\super \"7\" \"wahh\" @} @}
8 @end example
9 into @code{chordNameExceptions} takes a little manoeuvring. The
10 following code transforms @code{chExceptionMusic} (which is a
11 sequential music) into a list of exceptions.
12 @example
13         (sequential-music-to-chord-exceptions chExceptionMusic \#t)
14 @end example
15 Then,
16 @example
17         (append
18           ... ignatzekExceptions)
19 @end example
20 adds the new exceptions to the default ones, which are defined in
21 @file{ly/chord-modifier-init.ly}.
22 " }
23
24
25                                 % 7sus4 denoted with ^7 wahh
26 chExceptionMusic =  {
27     <c f g bes>1-\markup { \super "7" "wahh" }}
28
29                                 % add to existing exceptions.
30 chExceptions = #(append
31                  (sequential-music-to-chord-exceptions chExceptionMusic #t)
32                  ignatzekExceptions)
33
34 theMusic = \chordmode {
35     c:7sus4 c:dim7/+f
36     \set chordNameExceptions = #chExceptions
37     c:7sus4 c:dim7/+f
38 }
39
40 << \context ChordNames \theMusic
41    \context Voice \theMusic
42 >>