Add stafftab engraver for Stick.
[music/pretentious.git] / stafftab.ly
1 %% tunings for 12-string Chapman Stick
2 \makeDefaultStringTuning #'stick-classic-tuning
3 \stringTuning <d' a e b, fis, cis, c,, g,, d, a, e b>
4 \makeDefaultStringTuning #'stick-matched-reciprocal-tuning
5 \stringTuning <c' g d a, e, b,, c,, g,, d, a, e b>
6
7 %% MR™ High Bass 4th % TODO: melody note heights are probably wrong
8 %stick-tuning-twelve-mr-high =
9 % \stringTuning <c' g d a e b c,, g,, d, a, e a>
10 %
11 %% 12-String Classic™ High Bass 4th % TODO: melody note heights are probably wrong
12 %stick-tuning-twelve-classic-high =
13 % \stringTuning <d' a e b, fis, cis, c,, g,, d, a, e a>
14 %
15 %% Deep Matched Reciprocal™ % TODO
16 %stick-tuning-twelve-deep-mr =
17 % \stringTuning <bes f c g d a bes,, f,, c, g, d a>
18 %
19 %% Raised Matched Reciprocal™ % TODO
20 %stick-tuning-twelve-classic-high =
21 % \stringTuning <d' a e b, fis, cis, d,, a,, e, b, fis cis>
22 %
23 %% Dual Bass Reciprocal™ % TODO
24 %stick-tuning-twelve-dual-bass-r =
25 % \stringTuning <f' c g d, a, e, b,, fis,, cis, gis, dis ais>
26
27 %% tunings for 10-string Chapman Stick
28 %% Baritone Melody™ % TODO: melody is wrong
29 %stick-tuning-ten-baritone =
30 % \stringTuning <a e b fis cis c,, g,, d, a, e>
31 %
32 %% Deep Baritone Melody™ % TODO: melody is wrong
33 %chapman-stick-ten-deep-baritone =
34 % \stringTuning <g d a e b c,, g,, d, a, e>
35
36 %% tunings for 10-string Alto Stick
37 %% TODO: check them!
38 \makeDefaultStringTuning #'alto-stick-tuning
39 \stringTuning <g d a e b c g d a e>
40 \makeDefaultStringTuning #'alto-stick-gregs-extended-tuning
41 \stringTuning <a e b fis cis c g d a e>
42 \makeDefaultStringTuning #'alto-stick-bobs-expanded-tuning
43 \stringTuning <a e b fis cis a e b fis cis>
44
45
46 %% convert 12-string Chapman Stick tuning to 10-string tuning
47 ten-string-stick = #(lambda (tuning)
48 (append (list-head tuning 5)
49 (list-head (list-tail tuning 6) 5)))
50
51 %% get either the bass or the melody string group
52 stick-string-group = #(lambda (tuning group)
53 (let ((num (/ (length tuning) 2)))
54 (if (equal? group 'bass)
55 (list-head tuning num)
56 (list-tail tuning num))))
57
58 \layout {
59 \context {
60 \PianoStaff
61 \accepts "StaffTab"
62 }
63 \context {
64 \GrandStaff
65 \accepts "StaffTab"
66 }
67 \context {
68 \Score
69 \accepts "StaffTab"
70 }
71 \context {
72 \Staff
73 \name "StaffTab"
74 \alias "Staff"
75 \denies "Voice"
76 \defaultchild "StickVoice"
77 \accepts "StickVoice"
78 \description "Same as @code{Staff} context, except that it is
79 accommodated for typesetting a piece in StaffTab notation."
80 }
81 \context {
82 #(use-modules (guile-user))
83 \Voice
84 \name "StickVoice"
85 \alias "Voice"
86 \description "Same as @code{Voice} context, except that it is
87 accomodated for typesetting a piece in StaffTab notation."
88 \remove "Fingering_engraver"
89 \remove "New_fingering_engraver"
90 \consists #stafftab-engraver
91 }
92 }
93
94 \midi {
95 \context {
96 \Score
97 \accepts "StaffTab"
98 }
99 \context {
100 \Staff
101 \name "StaffTab"
102 \alias "Staff"
103 \denies "Voice"
104 \defaultchild "StickVoice"
105 \accepts "StickVoice"
106 \description "Same as @code{Staff} context, except that it is
107 accommodated for typesetting a piece in StaffTab notation."
108 }
109 \context {
110 \Voice
111 \name "StickVoice"
112 \alias "Voice"
113 \description "Same as @code{Voice} context, except that it is
114 accomodated for typesetting a piece in StaffTab notation."
115 }
116 }