]> git.donarmstrong.com Git - lilypond.git/blob - ly/german-chords.ly
patch::: 1.3.137.jcn4
[lilypond.git] / ly / german-chords.ly
1
2 %  german-chords.ly:
3 % german/norwegian/danish?
4
5 % To get Bb instead of B, use
6 % \include "german-chords.ly"
7 % #(set! german-Bb #t)
8
9 #(define german-Bb #f)
10
11 #(define (pitch->chord-name-text-banter pitch)
12    (if (equal? (cdr pitch) '(6 -1))
13      (if german-Bb
14        (cons "B" (accidental->text -1))
15        '("B")
16      )
17      (cons
18        (list-ref '("C" "D" "E" "F" "G" "A" "H") (cadr pitch))
19        (accidental->text (caddr pitch))
20      )
21    )
22  )   
23
24
25 #(define (pitch->note-name-text-banter pitch)
26    (if (equal? (cdr pitch) '(6 -1))
27      '("b")
28      (cons
29        (string-append
30           (list-ref '("c" "d" "e" "f" "g" "a" "h") (cadr pitch))
31           (if (or (equal? (cadr pitch) 2) (equal? (cadr pitch) 5))
32             (list-ref '( "ses"  "s" "" "is" "isis") (+ 2 (caddr pitch)))
33             (list-ref '("eses" "es" "" "is" "isis") (+ 2 (caddr pitch)))
34           )
35        )
36        '()
37      )
38    )
39  )