]> git.donarmstrong.com Git - lilypond.git/blob - ly/german-chords.ly
release: 1.4.4
[lilypond.git] / ly / german-chords.ly
1 \version "1.3.148"
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
26 #(define (pitch->note-name-text-banter pitch)
27    (let ((dopitch (if (member (cdr pitch) '((6 -1) (6 -2)))
28                      (list 7 (+ 1 (caddr pitch)))
29                      (cdr pitch)
30                  )))
31      (list
32        (string-append
33           (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car dopitch))
34           (if (or (equal? (car dopitch) 2) (equal? (car dopitch) 5))
35             (list-ref '( "ses"  "s" "" "is" "isis") (+ 2 (cadr dopitch)))
36             (list-ref '("eses" "es" "" "is" "isis") (+ 2 (cadr dopitch)))
37           )
38        )
39      )
40    )
41  )