]> git.donarmstrong.com Git - lilypond.git/blob - input/test/banter-chords.ly
9e34d2327fb0003922f4b2359ab2750960239cf9
[lilypond.git] / input / test / banter-chords.ly
1 \version "1.3.117";
2
3 \header{
4 enteredby =      "jcn";
5 copyright =      "public domain";
6 TestedFeatures =         "Banter named chords";
7 }
8
9 % test German (Banter) naming
10 % for more conventional naming, comment scm stuff out
11
12 % urg, 
13 % this shows a serious shortcoming with our guile approach:
14 % we can't (easily) display banter/non banter chords alongside
15 % eachother.  These guile lists are fixed in the guile environment
16 % when this file has been parsed...
17
18 % {
19
20 #;(define chord::names-alist-banter '())
21 #(set! chord::names-alist-banter
22       (append 
23       '(
24         (((0 . 0) (2 . -1) (4 . -1)) . (("m" ("5-" . (type . "super")))))
25         ; Co iso Cm5-7-
26         (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("o" (type "super")))
27         )))
28
29 % German note names:
30 % Urg, this will break again, in time
31 % Is this correct, anyway?
32
33 #(define (pitch->text pitch)
34   (if (and (= (modulo (cadr pitch) 7) 6)
35               (= (caddr pitch) -1))
36       (cons (make-string 1 (integer->char 66)) '())
37       (cons
38        (if (= (modulo (cadr pitch) 7) 6)
39            (make-string 1 (integer->char 72))
40            (make-string 1 (integer->char (+ (modulo (+ (cadr pitch) 2) 7) 65))))
41        (if (= (caddr pitch) 0)
42            '()
43            (list (list (string-append "accidentals-" 
44                                       (number->string (caddr pitch)))
45                        '(font . "feta")))))))
46
47 % }
48
49 chord =  \notes\transpose c''\chords{
50         % dim modifier means: lower all implicit additions
51         c:dim9
52         c:dim
53         c:dim7
54         % explicit additions are taken as entered:
55         c:m5-.7-
56         % note that 7 is a special case: it's always lowered by 1...
57         c:dim7-.9
58         c:dim9-.11
59
60         % test German names
61         b:dim7
62         bes:m5-
63
64         \break
65
66         c:sus2  %?
67         c:sus4
68         c^3
69         c^3.5
70         c:2.6^5
71         c:dim^5-
72         c:dim7^5-
73         cis:m5-
74 }
75
76 \score{
77         <
78                 \context ChordNames \chord
79                 \context Staff \chord
80         >
81 }
82