]> git.donarmstrong.com Git - lilypond.git/blob - ly/german-chords.ly
release: 1.3.147
[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 additions)
13    (if (equal? (cdr pitch) '(6 -1))
14      (if german-Bb
15        (cons "B" (accidental->text -1))
16        '("B")
17      )
18      (cons
19        (list-ref '("C" "D" "E" "F" "G" "A" "H") (cadr pitch))
20        (accidental->text (caddr pitch))
21      )
22    )
23  )   
24
25
26 #(define (pitch->note-name-text-banter pitch)
27    (if (equal? (cdr pitch) '(6 -1))
28      '("b")
29      (cons
30        (string-append
31           (list-ref '("c" "d" "e" "f" "g" "a" "h") (cadr pitch))
32           (if (or (equal? (cadr pitch) 2) (equal? (cadr pitch) 5))
33             (list-ref '( "ses"  "s" "" "is" "isis") (+ 2 (caddr pitch)))
34             (list-ref '("eses" "es" "" "is" "isis") (+ 2 (caddr pitch)))
35           )
36        )
37        '()
38      )
39    )
40  )