-
Notifications
You must be signed in to change notification settings - Fork 2
/
5 limit.txt
217 lines (179 loc) · 6.42 KB
/
5 limit.txt
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// HEJI (2020) notation
// https://marsbat.space/pdfs/HEJI2_legend+series.pdf
//
// C4 is 1/1, with A4 tuned to 440 Hz.
//
// Tuning space comprises:
// 3 flats to 3 sharps
// 3 comma downs to 3 comma ups
//
// Higher limit accidentals available as secondary accidentals.
C4: 440*16/27 // Tune C4 to 16/27 of A4 = 440, setting C4 as the first nominal.
// Nominals are a chain of pure fifths from F to B
// C D E F G A B C (1200c equave)
0 9/8 81/64 4/3 3/2 27/16 243/128 2/1
// Here we declare two accidental chains
// Chain 1: 3-limit accidentals from bbb to #x
// This is declared using irregular step sizes as we want to also include
// the enharmonically equivalent ~#v and ~b^ schisma-altered accidentals.
// Put the ~#v and ~b^ accidentals at the end of the chain so that the plugin
// will prefer not to use them. Lower accidental degrees are always preferred
// by the plugin.
~.b^(243/256) bbb(-113.685*3c) bb(-113.685*2c) b(-113.685c) (0) #(113.685c) x(113.685*2c) #x(113.685*3c) ~.#v(256/243)
// Chain 2: 5-limit acc from -3 to +3
v3 v2 v (81/80) ^ ^2 ^3
// First we declare a weak important ligature for the special schisma-altered
// enharmonics that we declared at deg. -4 and 4 of the 1st chain
//
// - We declare it as important (!) so that it is still accessible via the
// enharmonic cycle operation,
// - We declare it as weak (?) so that during
// up/down operations, the plugin will prefer to use standard sharps and flats
// rather than the schisma-enharmonic variants.
//
// ⚠️ We must declare this ligature before the one below, as this ligature
// contains shares similar symbols as the one below.
//
// If we flip the order of declaration, the 'b^' and '#v' symbols will be
// parsed & eaten up by the other ligature, leaving a stray '~' symbol, which
// is not parseable.
lig(1,2)!?
-4 0 ~.b^
4 0 ~.#v
// We declare a ligature between the 1st and 2nd chain
// In HEJI, syntonic commas can merge with sharp/flat/natural
// accidentals into a single ligatured symbol.
//
// The "!" denotes an important ligature because we don't want the plugin
// to suggest a multi-symbol spelling natural arrows + sharp/flat.
//
// This means we must declare every symbol that we want to the plugin
// to use for all permutations of the 1st and 2nd accidental chains.
lig(1,2)!
-2 -3 bbv3 // bb and 3 downs become a single double flat with 3 down arrows HEJI symbol
-2 -2 bbv2
-2 -1 bbv
-2 1 bb^
-2 2 bb^2
-2 3 bb^3
-1 -3 bv3
-1 -2 bv2
-1 -1 bv
-1 1 b^
-1 2 b^2
-1 3 b^3
1 -3 #v3
1 -2 #v2
1 -1 #v
1 1 #^
1 2 #^2
1 3 #^3
2 -3 xv3
2 -2 xv2
2 -1 xv
2 1 x^
2 2 x^2
2 3 x^3
// Here we also declare basic "non-ligatured symbols" as ligatures
// because we need the enharmonic cycling operation to work for
// these as well.
-2 0 bb
-1 0 b
0 -3 v3
0 -2 v2
0 -1 v
0 1 ^
0 2 ^2
0 3 ^3
1 0 #
2 0 x
// Here we declare 4 auxiliary up/down operations.
// These will be accessible as the aux1, aux2, aux3, aux4 up/down operations
// respectively. You can look up/modify the keyboard shortcuts to these
// operations in the "xen tuner.qml" file.
aux(0) // aux1 will modify nominals only, without modifying accidentals
aux(1) // aux2 will modify flats/sharps only, without modifying nominals or other accs
aux(2) // aux3 will modify syntonic comas only
aux(0,1) // aux4 will modify both nominals and flats/sharps.
// Now we declare secondary accidentals & text representations
// Secondary accidentals tell the plugin how to tune 'left-over' accidentals
// that don't fit into the accidental chains declared above.
// These also tell the plugin how to parse fingering text into
// accidental symbols, so you can enter both primary and secondary
// accidentals using fingerings.
// E.g. If you attach the fingering 'bbbbb' on to a note,
// the plugin will convert & render it into a triple-flat symbol
// and a double-flat symbol bbb.bb.
// The triple-flat will match as degree -3 of the first chain (sharps/flats)
// and the double-flat will match as a secondary accidental.
sec()
'~b^' ~.b^ 243/256
'b^~' ~.b^ 243/256
'bbb' bbb Math.pow(2187/2048,-3) // converts fingering 'bbb' into triple-flat symbol
'bb' bb Math.pow(2187/2048,-2)
'b' b 2048/2187
// The order of which text representations are declared matters,
// as it affects the precedence of which text strings are parsed
// first.
// E.g. we need to declare 'bbb' before 'b'.
// Otherwise, 'bbb' will match as 3 individual 'b's instead of
// one single 'bbb'.
// Even though both b.b.b and bbb will evaluate to the same interval
// offset, we rather use the correct symbol for triple flats.
'~#v' ~.#v 256/243
'#v~' ~.#v 256/243
'###' #x Math.pow(2187/2048,3)
'#x' #x Math.pow(2187/2048,3)
'x#' #x Math.pow(2187/2048,3)
'##' x Math.pow(2187/2048,2)
'x' x Math.pow(2187/2048,2)
'#' # 2187/2048
'^^^' ^3 Math.pow(81/80,3)
'^^' ^2 Math.pow(81/80,2)
'^' ^ 81/80
'vvv' v3 Math.pow(80/81,3)
'vv' v2 Math.pow(80/81,2)
'v' v 80/81
// The rest below are not part of the 5-limit accidental chains.
// You can access them by adding fingerings with the text representations.
// E.g. 'ttl#^' will render into 33/32 * 33/32 * 63/64 * 81/80 * 2187/2048
'/77' u77 Math.pow(64/63,2)
'/7' u7 64/63
'\\77' d77 Math.pow(63/64,2)
'\\7' d7 63/64
't' t 33/32
'/11' t 33/32
'd' d 32/33
'\\11' d 32/33
'/13' tt 27/26
'\\13' d| 26/27 // '\\' represents a single backslash. To enter this
// accidental, use \13, not \\13
// When referring to SMuFL symbols or text-based accidentals,
// the backslash (\), two slashes (//), and quote (') symbols
// need to be escaped with a backslash like so:
// \\, \/\/, \'
'/17' \'\' 2187/2176 // \'\' escapes to '' (SymbolCode 78)
'\\17' `` 2176/2187
'/19' \' 513/512 // \' escapes to ' (SymbolCode 77)
'\\19' ` 512/513
'/23' / 736/729
'\\23' \\ 729/736 // \\ escapes to \ (SymbolCode 43)
// For 29-limit, MuseScore hasn't included the HEJI supplement
// symbols yet, so we're using sagittal sharp/flat which looks alike
'/29' /||\\ 261/256
'\\29' \\!!/ 256/261
'/31' 84 32/31
'\\31' 85 31/32
// For 37-limit, we don't have the inverted 3/12ths flat
// Wyschnegradsky symbol for the 37-up accidental, so we're using
// the actual 3/12ths sharp Wyschnegradsky symbol which is the
// semi-sharp.
'/37' + 37/36
'\\37' 128 36/37
// Use standard Johnston +/- for 41-limit
'/41' j+ 82/81
'\\41' j- 81/82
// Sadly the higher-limit HEJI accidentals aren't yet available
// in MuseScore.
// Awaiting this supplement:
// https://w3c.github.io/smufl/latest/tables/extended-helmholtz-ellis-accidentals-just-intonation-supplement.html