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