]> git.donarmstrong.com Git - lilypond.git/blob - ly/german-chords-init.ly
644b6efe3cadc20fa6a4835ee5da13029bdd13a5
[lilypond.git] / ly / german-chords-init.ly
1 \version "1.5.12"
2
3 %  german-chords-init.ly:
4 % german/norwegian/danish?
5
6 % To get Bb instead of B, use
7 % \include "german-chords-init.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         (list
18         'columns
19        (list-ref '("C" "D" "E" "F" "G" "A" "H" "B") (car dopitch))
20        (accidental->text-super (cadr dopitch))
21      )
22    )
23  )
24
25
26
27 #(define (pitch->note-name-text-banter pitch)
28    (let ((dopitch (if (member (cdr pitch) '((6 -1) (6 -2)))
29                      (list 7 (+ 1 (caddr pitch)))
30                      (cdr pitch)
31                  )))
32      (list
33        (string-append
34           (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car dopitch))
35           (if (or (equal? (car dopitch) 2) (equal? (car dopitch) 5))
36             (list-ref '( "ses"  "s" "" "is" "isis") (+ 2 (cadr dopitch)))
37             (list-ref '("eses" "es" "" "is" "isis") (+ 2 (cadr dopitch)))
38           )
39        )
40      )
41    )
42  )