summaryrefslogtreecommitdiff
path: root/stafftab.ly
blob: 6c1536780ac35e197337877520c8a3ecd6d0ba3d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
%% This is a hack.  The relative path works when building, say,
%% "01-song1", but it fails when building a specific part,
%% e.g. "01-song1/parts/keys.pdf".  With this expression we try one
%% path first and move on to the next relative path if that happens to
%% fail.  This is really gross, but it works. ¯\_(ツ)_/¯
#(or (false-if-exception (load "stafftab-engraver.scm"))
     (false-if-exception (load "../stafftab-engraver.scm"))
     (load "../../stafftab-engraver.scm"))

%% tunings for 12-string Chapman Stick
\makeDefaultStringTuning #'stick-classic-tuning
  \stringTuning <d' a e b, fis, cis, c,, g,, d, a, e b>
\makeDefaultStringTuning #'stick-matched-reciprocal-tuning
  \stringTuning <c' g d a, e, b,, c,, g,, d, a, e b>

%% MR™ High Bass 4th  % TODO: melody note heights are probably wrong
%stick-tuning-twelve-mr-high =
%  \stringTuning <c' g d a e b        c,, g,, d, a, e a>
%
%% 12-String Classic™ High Bass 4th % TODO: melody note heights are probably wrong
%stick-tuning-twelve-classic-high =
%  \stringTuning <d' a e b, fis, cis, c,, g,, d, a, e a>
%
%% Deep Matched Reciprocal™  % TODO
%stick-tuning-twelve-deep-mr =
%  \stringTuning <bes f c g d a   bes,, f,, c, g, d a>
%
%% Raised Matched Reciprocal™ % TODO
%stick-tuning-twelve-classic-high =
%  \stringTuning <d' a e b, fis, cis,   d,, a,, e, b, fis cis>
%
%% Dual Bass Reciprocal™ % TODO
%stick-tuning-twelve-dual-bass-r =
%  \stringTuning <f' c g d, a, e,   b,, fis,, cis, gis, dis ais>

%% tunings for 10-string Chapman Stick
%% Baritone Melody™ % TODO: melody is wrong
%stick-tuning-ten-baritone =
%  \stringTuning <a e b fis cis  c,, g,, d, a, e>
%
%% Deep Baritone Melody™  % TODO: melody is wrong
%chapman-stick-ten-deep-baritone =
%  \stringTuning <g d a e b c,, g,, d, a, e>

%% tunings for 10-string Alto Stick
%% TODO: check them!
\makeDefaultStringTuning #'alto-stick-tuning
  \stringTuning <g d a e b  c g d a e>
\makeDefaultStringTuning #'alto-stick-gregs-extended-tuning
  \stringTuning <a e b fis cis  c g d a e>
\makeDefaultStringTuning #'alto-stick-bobs-expanded-tuning
  \stringTuning <a' e' b fis cis  a,, e, b, fis cis'>


%% convert 12-string Chapman Stick tuning to 10-string tuning
ten-string-stick = #(lambda (tuning)
                     (append (list-head tuning 5)
                             (list-head (list-tail tuning 6) 5)))

%% get either the bass or the melody string group
stick-string-group = #(lambda (tuning group)
                       (let ((num (/ (length tuning) 2)))
                        (if (equal? group 'bass)
                         (list-head tuning num)
                         (list-tail tuning num))))

\layout {
  \context {
    \PianoStaff
    \accepts "StaffTab"
  }
  \context {
    \GrandStaff
    \accepts "StaffTab"
  }
  \context {
    \Score
    \accepts "StaffTab"
  }
  \context {
    \Staff
    \name "StaffTab"
    \alias "Staff"
    \denies "Voice"
    \defaultchild "StickVoice"
    \accepts "StickVoice"
    \description "Same as @code{Staff} context, except that it is
accommodated for typesetting a piece in StaffTab notation."
  }
  \context {
    \Voice
    \name "StickVoice"
    \alias "Voice"
    \description "Same as @code{Voice} context, except that it is
accomodated for typesetting a piece in StaffTab notation."
    \remove "Fingering_engraver"
    \remove "New_fingering_engraver"
    \consists #stafftab-engraver
  }
}

\midi {
  \context {
    \Score
    \accepts "StaffTab"
  }
  \context {
    \Staff
    \name "StaffTab"
    midiInstrument = #"electric guitar (jazz)"
    \alias "Staff"
    \denies "Voice"
    \defaultchild "StickVoice"
    \accepts "StickVoice"
    \description "Same as @code{Staff} context, except that it is
accommodated for typesetting a piece in StaffTab notation."
  }
  \context {
    \Voice
    \name "StickVoice"
    \alias "Voice"
    \description "Same as @code{Voice} context, except that it is
accomodated for typesetting a piece in StaffTab notation."
  }
}