Skip to main content

music21_rs/tuningsystem/
generated.rs

1// @generated by `cargo run --release -p xtask -- emit-tuning-tables`.
2// Source of truth: data/tuning_tables.toml. Do not edit by hand.
3
4use super::Ratio;
5
6/// Twelve-tone harmonic-series scale (Wendy Carlos's Harmonic).
7///
8/// Derived from `carlos_harm.scl` in music21's Scala archive: Carlos Harmonic & Ben Johnston's scale of 'Blues' from Suite f.micr.piano (1977) & David Beardsley's scale of 'Science Friction'
9pub const CARLOS_HARMONIC: [Ratio; 12] = [
10    Ratio::new(1, 1),
11    Ratio::new(17, 16),
12    Ratio::new(9, 8),
13    Ratio::new(19, 16),
14    Ratio::new(5, 4),
15    Ratio::new(21, 16),
16    Ratio::new(11, 8),
17    Ratio::new(3, 2),
18    Ratio::new(13, 8),
19    Ratio::new(27, 16),
20    Ratio::new(7, 4),
21    Ratio::new(15, 8),
22];
23
24/// Twenty-four-tone harmonic-series scale.
25pub const CARLOS_HARMONIC_24: [Ratio; 24] = [
26    Ratio::new(1, 1),
27    Ratio::new(33, 32),
28    Ratio::new(17, 16),
29    Ratio::new(35, 32),
30    Ratio::new(9, 8),
31    Ratio::new(37, 32),
32    Ratio::new(19, 16),
33    Ratio::new(39, 32),
34    Ratio::new(5, 4),
35    Ratio::new(21, 16),
36    Ratio::new(43, 32),
37    Ratio::new(11, 8),
38    Ratio::new(45, 32),
39    Ratio::new(23, 16),
40    Ratio::new(3, 2),
41    Ratio::new(25, 16),
42    Ratio::new(51, 32),
43    Ratio::new(13, 8),
44    Ratio::new(27, 16),
45    Ratio::new(7, 4),
46    Ratio::new(57, 32),
47    Ratio::new(29, 16),
48    Ratio::new(15, 8),
49    Ratio::new(31, 16),
50];
51
52/// Twelve-tone Pythagorean tuning ratios.
53pub const PYTHAGOREAN_TUNING: [Ratio; 12] = [
54    Ratio::new(1, 1),
55    Ratio::new(256, 243),
56    Ratio::new(9, 8),
57    Ratio::new(32, 27),
58    Ratio::new(81, 64),
59    Ratio::new(4, 3),
60    Ratio::new(729, 512),
61    Ratio::new(3, 2),
62    Ratio::new(128, 81),
63    Ratio::new(27, 16),
64    Ratio::new(16, 9),
65    Ratio::new(243, 128),
66];
67
68/// Twelve-tone five-limit tuning ratios.
69///
70/// Derived from `riley_albion.scl` in music21's Scala archive: Terry Riley's Harp of New Albion scale, inverse Malcolm's Monochord, 1/1 on C#
71pub const FIVE_LIMIT: [Ratio; 12] = [
72    Ratio::new(1, 1),
73    Ratio::new(16, 15),
74    Ratio::new(9, 8),
75    Ratio::new(6, 5),
76    Ratio::new(5, 4),
77    Ratio::new(4, 3),
78    Ratio::new(64, 45),
79    Ratio::new(3, 2),
80    Ratio::new(8, 5),
81    Ratio::new(5, 3),
82    Ratio::new(16, 9),
83    Ratio::new(15, 8),
84];
85
86/// Twenty-nine-tone eleven-limit tuning ratios.
87///
88/// Derived from `partch_29.scl` in music21's Scala archive: Partch/Ptolemy 11-limit Diamond
89pub const ELEVEN_LIMIT: [Ratio; 29] = [
90    Ratio::new(1, 1),
91    Ratio::new(12, 11),
92    Ratio::new(11, 10),
93    Ratio::new(10, 9),
94    Ratio::new(9, 8),
95    Ratio::new(8, 7),
96    Ratio::new(7, 6),
97    Ratio::new(6, 5),
98    Ratio::new(11, 9),
99    Ratio::new(5, 4),
100    Ratio::new(14, 11),
101    Ratio::new(9, 7),
102    Ratio::new(4, 3),
103    Ratio::new(11, 8),
104    Ratio::new(7, 5),
105    Ratio::new(10, 7),
106    Ratio::new(16, 11),
107    Ratio::new(3, 2),
108    Ratio::new(14, 9),
109    Ratio::new(11, 7),
110    Ratio::new(8, 5),
111    Ratio::new(18, 11),
112    Ratio::new(5, 3),
113    Ratio::new(12, 7),
114    Ratio::new(7, 4),
115    Ratio::new(16, 9),
116    Ratio::new(9, 5),
117    Ratio::new(20, 11),
118    Ratio::new(11, 6),
119];
120
121/// Forty-three-tone tuning ratios.
122///
123/// Derived from `partch_43.scl` in music21's Scala archive: Harry Partch's 43-tone pure scale
124pub const FORTY_THREE_TONE: [Ratio; 43] = [
125    Ratio::new(1, 1),
126    Ratio::new(81, 80),
127    Ratio::new(33, 32),
128    Ratio::new(21, 20),
129    Ratio::new(16, 15),
130    Ratio::new(12, 11),
131    Ratio::new(11, 10),
132    Ratio::new(10, 9),
133    Ratio::new(9, 8),
134    Ratio::new(8, 7),
135    Ratio::new(7, 6),
136    Ratio::new(32, 27),
137    Ratio::new(6, 5),
138    Ratio::new(11, 9),
139    Ratio::new(5, 4),
140    Ratio::new(14, 11),
141    Ratio::new(9, 7),
142    Ratio::new(21, 16),
143    Ratio::new(4, 3),
144    Ratio::new(27, 20),
145    Ratio::new(11, 8),
146    Ratio::new(7, 5),
147    Ratio::new(10, 7),
148    Ratio::new(16, 11),
149    Ratio::new(40, 27),
150    Ratio::new(3, 2),
151    Ratio::new(32, 21),
152    Ratio::new(14, 9),
153    Ratio::new(11, 7),
154    Ratio::new(8, 5),
155    Ratio::new(18, 11),
156    Ratio::new(5, 3),
157    Ratio::new(27, 16),
158    Ratio::new(12, 7),
159    Ratio::new(7, 4),
160    Ratio::new(16, 9),
161    Ratio::new(9, 5),
162    Ratio::new(20, 11),
163    Ratio::new(11, 6),
164    Ratio::new(15, 8),
165    Ratio::new(40, 21),
166    Ratio::new(64, 33),
167    Ratio::new(160, 81),
168];
169
170/// Ptolemy's intense diatonic, also Zarlino's just major scale.
171///
172/// Derived from `ptolemy.scl` in music21's Scala archive: Intense Diatonic Syntonon, also Zarlino's scale
173pub const PTOLEMY_INTENSE_DIATONIC: [Ratio; 7] = [
174    Ratio::new(1, 1),
175    Ratio::new(9, 8),
176    Ratio::new(5, 4),
177    Ratio::new(4, 3),
178    Ratio::new(3, 2),
179    Ratio::new(5, 3),
180    Ratio::new(15, 8),
181];
182
183/// Alternate seven-tone Indian scale ratios.
184///
185/// Derived from `indian-sagrama.scl` in music21's Scala archive: Indian mode Sa-grama (Sa Ri Ga Ma Pa Dha Ni Sa), inverse of Didymus' diatonic
186pub const INDIA_SCALE_ALT: [Ratio; 7] = [
187    Ratio::new(1, 1),
188    Ratio::new(9, 8),
189    Ratio::new(5, 4),
190    Ratio::new(4, 3),
191    Ratio::new(3, 2),
192    Ratio::new(27, 16),
193    Ratio::new(15, 8),
194];
195
196/// Twenty-two-tone Indian scale ratios.
197///
198/// Derived from `indian.scl` in music21's Scala archive: Indian shruti scale
199pub const INDIAN_SCALE_22: [Ratio; 22] = [
200    Ratio::new(1, 1),
201    Ratio::new(256, 243),
202    Ratio::new(16, 15),
203    Ratio::new(10, 9),
204    Ratio::new(9, 8),
205    Ratio::new(32, 27),
206    Ratio::new(6, 5),
207    Ratio::new(5, 4),
208    Ratio::new(81, 64),
209    Ratio::new(4, 3),
210    Ratio::new(27, 20),
211    Ratio::new(45, 32),
212    Ratio::new(729, 512),
213    Ratio::new(3, 2),
214    Ratio::new(128, 81),
215    Ratio::new(8, 5),
216    Ratio::new(5, 3),
217    Ratio::new(27, 16),
218    Ratio::new(16, 9),
219    Ratio::new(9, 5),
220    Ratio::new(15, 8),
221    Ratio::new(243, 128),
222];
223
224/// Twelve-tone quarter-comma meantone temperament (Aaron, 1523).
225///
226/// Derived from `meanquar.scl` in music21's Scala archive: 1/4-comma meantone scale. Pietro Aaron's temp. (1523). 6/5 beats twice 3/2
227pub const QUARTER_COMMA_MEANTONE: [Ratio; 12] = [
228    Ratio::new(1, 1),
229    Ratio::root(2, 76049, 1200000),
230    Ratio::root(2, 3219281, 20000000),
231    Ratio::root(2, 10342157, 40000000),
232    Ratio::root(2, 38631371, 120000000),
233    Ratio::root(2, 16780719, 40000000),
234    Ratio::root(2, 57947057, 120000000),
235    Ratio::root(2, 23219281, 40000000),
236    Ratio::root(2, 77262743, 120000000),
237    Ratio::root(2, 29657843, 40000000),
238    Ratio::root(2, 16780719, 20000000),
239    Ratio::root(2, 54144607, 60000000),
240];
241
242/// Twelve-tone Werckmeister III well temperament (1681).
243///
244/// Derived from `werck3.scl` in music21's Scala archive: Andreas Werckmeister's temperament III (the most famous one, 1681)
245pub const WERCKMEISTER_III: [Ratio; 12] = [
246    Ratio::new(1, 1),
247    Ratio::new(256, 243),
248    Ratio::root(2, 3203, 20000),
249    Ratio::new(32, 27),
250    Ratio::root(2, 5203, 16000),
251    Ratio::new(4, 3),
252    Ratio::new(1024, 729),
253    Ratio::root(2, 23203, 40000),
254    Ratio::new(128, 81),
255    Ratio::root(2, 88826999, 120000000),
256    Ratio::new(16, 9),
257    Ratio::root(2, 18203, 20000),
258];
259
260/// Twelve-tone Rameau modified meantone temperament (1725).
261///
262/// Derived from `rameau.scl` in music21's Scala archive: Rameau's modified meantone temperament (1725)
263pub const RAMEAU: [Ratio; 12] = [
264    Ratio::new(1, 1),
265    Ratio::root(2, 14467, 200000),
266    Ratio::root(2, 193157, 1200000),
267    Ratio::root(2, 1489, 6000),
268    Ratio::new(5, 4),
269    Ratio::root(2, 251711, 600000),
270    Ratio::root(2, 194949, 400000),
271    Ratio::root(2, 348289, 600000),
272    Ratio::root(2, 262919, 400000),
273    Ratio::root(2, 177947, 240000),
274    Ratio::root(2, 1006843, 1200000),
275    Ratio::root(2, 90241, 100000),
276];
277
278/// Twelve-tone Kirnberger III well temperament (1744).
279///
280/// Derived from `kirnberger3.scl` in music21's Scala archive: Kirnberger 3: 1/4 synt. comma (1744)
281pub const KIRNBERGER_III: [Ratio; 12] = [
282    Ratio::new(1, 1),
283    Ratio::new(135, 128),
284    Ratio::root(2, 3219281, 20000000),
285    Ratio::new(32, 27),
286    Ratio::new(5, 4),
287    Ratio::new(4, 3),
288    Ratio::new(45, 32),
289    Ratio::root(2, 23219281, 40000000),
290    Ratio::new(405, 256),
291    Ratio::root(2, 29657843, 40000000),
292    Ratio::new(16, 9),
293    Ratio::new(15, 8),
294];
295
296/// Twelve-tone Vallotti well temperament (c. 1754).
297///
298/// Derived from `vallotti.scl` in music21's Scala archive: Vallotti & Young scale (Vallotti version)
299pub const VALLOTTI: [Ratio; 12] = [
300    Ratio::new(1, 1),
301    Ratio::root(2, 18827, 240000),
302    Ratio::root(2, 19609, 120000),
303    Ratio::root(2, 59609, 240000),
304    Ratio::root(2, 19609, 60000),
305    Ratio::root(2, 100391, 240000),
306    Ratio::root(2, 29609, 60000),
307    Ratio::root(2, 139609, 240000),
308    Ratio::root(2, 79609, 120000),
309    Ratio::root(2, 59609, 80000),
310    Ratio::root(2, 5, 6),
311    Ratio::root(2, 43609, 48000),
312];
313
314/// Twelve-tone Thomas Young well temperament no. 2 (1799).
315///
316/// Derived from `young2.scl` in music21's Scala archive: Thomas Young well temperament no.2 (1799)
317pub const YOUNG_II: [Ratio; 12] = [
318    Ratio::new(1, 1),
319    Ratio::root(2, 18827, 240000),
320    Ratio::root(2, 19609, 120000),
321    Ratio::root(2, 59609, 240000),
322    Ratio::root(2, 19609, 60000),
323    Ratio::root(2, 5, 12),
324    Ratio::root(2, 29609, 60000),
325    Ratio::root(2, 139609, 240000),
326    Ratio::root(2, 79609, 120000),
327    Ratio::root(2, 59609, 80000),
328    Ratio::root(2, 5, 6),
329    Ratio::root(2, 18203, 20000),
330];
331
332/// Twelve-tone third-comma meantone temperament (Salinas, 1577).
333///
334/// Derived from `meanthird.scl` in music21's Scala archive: 1/3-comma meantone scale (Salinas)
335pub const THIRD_COMMA_MEANTONE: [Ratio; 12] = [
336    Ratio::new(1, 1),
337    Ratio::root(2, 3175183, 60000000),
338    Ratio::root(2, 296207, 1875000),
339    Ratio::new(6, 5),
340    Ratio::root(2, 2527633, 8000000),
341    Ratio::root(2, 1578793, 3750000),
342    Ratio::new(25, 18),
343    Ratio::root(2, 2171207, 3750000),
344    Ratio::root(2, 2527633, 4000000),
345    Ratio::new(5, 3),
346    Ratio::root(2, 1578793, 1875000),
347    Ratio::root(2, 107393119, 120000000),
348];
349
350/// Twelve-tone sixth-comma meantone temperament (Salinas, 1577).
351///
352/// Derived from `meansixth.scl` in music21's Scala archive: 1/6-comma meantone scale (tritonic temperament of Salinas)
353pub const SIXTH_COMMA_MEANTONE: [Ratio; 12] = [
354    Ratio::new(1, 1),
355    Ratio::root(2, 8859433, 120000000),
356    Ratio::root(2, 4918531, 30000000),
357    Ratio::root(2, 5081469, 20000000),
358    Ratio::root(2, 4918531, 15000000),
359    Ratio::root(2, 25081469, 60000000),
360    Ratio::new(45, 32),
361    Ratio::root(2, 34918531, 60000000),
362    Ratio::root(2, 5246433, 8000000),
363    Ratio::root(2, 14918531, 20000000),
364    Ratio::root(2, 25081469, 30000000),
365    Ratio::root(2, 10918531, 12000000),
366];
367
368/// Twelve-tone Werckmeister IV well temperament (1681).
369///
370/// Derived from `werck4.scl` in music21's Scala archive: Andreas Werckmeister's temperament IV
371pub const WERCKMEISTER_IV: [Ratio; 12] = [
372    Ratio::new(1, 1),
373    Ratio::root(2, 2746833, 40000000),
374    Ratio::root(2, 19609, 120000),
375    Ratio::new(32, 27),
376    Ratio::root(2, 19609, 60000),
377    Ratio::new(4, 3),
378    Ratio::new(1024, 729),
379    Ratio::root(2, 138827, 240000),
380    Ratio::root(2, 26145333, 40000000),
381    Ratio::root(2, 35609, 48000),
382    Ratio::root(2, 100391, 120000),
383    Ratio::new(4096, 2187),
384];
385
386/// Twelve-tone Werckmeister V well temperament (1681).
387///
388/// Derived from `werck5.scl` in music21's Scala archive: Andreas Werckmeister's temperament V
389pub const WERCKMEISTER_V: [Ratio; 12] = [
390    Ratio::new(1, 1),
391    Ratio::root(2, 3203, 40000),
392    Ratio::new(9, 8),
393    Ratio::root(2, 1, 4),
394    Ratio::root(2, 13203, 40000),
395    Ratio::root(2, 16797, 40000),
396    Ratio::root(2, 1, 2),
397    Ratio::new(3, 2),
398    Ratio::new(128, 81),
399    Ratio::root(2, 3, 4),
400    Ratio::root(2, 66797, 80000),
401    Ratio::root(2, 73203, 80000),
402];
403
404/// Twelve-tone Kirnberger I well temperament (1766).
405///
406/// Derived from `kirnberger1.scl` in music21's Scala archive: Kirnberger's temperament 1 (1766)
407pub const KIRNBERGER_I: [Ratio; 12] = [
408    Ratio::new(1, 1),
409    Ratio::new(256, 243),
410    Ratio::new(9, 8),
411    Ratio::new(32, 27),
412    Ratio::new(5, 4),
413    Ratio::new(4, 3),
414    Ratio::new(45, 32),
415    Ratio::new(3, 2),
416    Ratio::new(128, 81),
417    Ratio::root(2, 111889, 150000),
418    Ratio::new(16, 9),
419    Ratio::new(15, 8),
420];
421
422/// Twelve-tone Neidhardt I well temperament (1724).
423///
424/// Derived from `neidhardt1.scl` in music21's Scala archive: Neidhardt I temperament (1724)
425pub const NEIDHARDT_I: [Ratio; 12] = [
426    Ratio::new(1, 1),
427    Ratio::root(2, 18827, 240000),
428    Ratio::root(2, 19609, 120000),
429    Ratio::root(2, 29609, 120000),
430    Ratio::root(2, 19609, 60000),
431    Ratio::new(4, 3),
432    Ratio::root(2, 29609, 60000),
433    Ratio::root(2, 139609, 240000),
434    Ratio::root(2, 79609, 120000),
435    Ratio::root(2, 59609, 80000),
436    Ratio::new(16, 9),
437    Ratio::root(2, 18203, 20000),
438];
439
440/// Twelve-tone Gottfried Silbermann temperament no. 1 (c. 1730).
441///
442/// Derived from `silbermann1.scl` in music21's Scala archive: Gottfried Silbermann's temperament nr. 1
443pub const SILBERMANN: [Ratio; 12] = [
444    Ratio::new(1, 1),
445    Ratio::root(2, 8729249, 120000000),
446    Ratio::root(2, 1, 6),
447    Ratio::root(2, 15391, 60000),
448    Ratio::root(2, 5203, 16000),
449    Ratio::root(2, 201173, 480000),
450    Ratio::root(2, 23609, 48000),
451    Ratio::root(2, 7, 12),
452    Ratio::root(2, 26145333, 40000000),
453    Ratio::root(2, 71609, 96000),
454    Ratio::root(2, 201173, 240000),
455    Ratio::root(2, 43609, 48000),
456];
457
458/// Twelve-tone Lehman-Bach temperament (2005).
459///
460/// Derived from `lehman-bach.scl` in music21's Scala archive: Brad Lehman's Bach squiggle keyboard temperament (2005)
461pub const LEHMAN_BACH: [Ratio; 12] = [
462    Ratio::new(1, 1),
463    Ratio::root(2, 19609, 240000),
464    Ratio::root(2, 19609, 120000),
465    Ratio::root(2, 59609, 240000),
466    Ratio::root(2, 19609, 60000),
467    Ratio::root(2, 100391, 240000),
468    Ratio::root(2, 59609, 120000),
469    Ratio::root(2, 139609, 240000),
470    Ratio::root(2, 53203, 80000),
471    Ratio::root(2, 59609, 80000),
472    Ratio::root(2, 199609, 240000),
473    Ratio::root(2, 218827, 240000),
474];