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