-
Notifications
You must be signed in to change notification settings - Fork 0
/
p_a_constants.py
66 lines (60 loc) · 1.51 KB
/
p_a_constants.py
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
LILYPOND_VERSION = "2.24.1"
SAMPLE_RATE = 48000
# see https://en.wikipedia.org/wiki/Just_intonation
PURE_PITCHES = [
(1, 1),
(16, 15),
(9, 8),
(6, 5),
(5, 4),
(4, 3),
(45, 32),
(3, 2),
(8, 5),
(5, 3),
(9, 5),
(15, 8),
]
_PURE_PITCHES = {
"c-flat": 9 / 8,
"c": 6 / 5,
"c-sharp": 5 / 4,
"d-flat": 5 / 4,
"d": 4 / 3,
"d-sharp": 45 / 32,
"e-flat": 45 / 32,
"e": 3 / 2,
"e-sharp": 8 / 5,
"f-flat": 3 / 2,
"f": 8 / 5,
"f-sharp": 5 / 3,
"g-flat": 5 / 3,
"g": 9 / 5,
"g-sharp": 15 / 8,
"a-flat": 15 / 8,
"a": 2,
"a-sharp": 2 * 16 / 15,
"b-flat": 2 * 16 / 15,
"b": 2 * 9 / 8,
"b-sharp": 6 / 5,
}
PURE_RATIOS = {
'up': {
'chromatic': ['1/1'],
'major': ['1/1', '9/8', '5/4', '4/3', '3/2', '5/3', '15/8', ],
'natural': ['1/1', '9/8', '6/5', '4/3', '3/2', '8/5', '9/5', ],
'harmonic': ['1/1', '9/8', '6/5', '4/3', '3/2', '8/5', '15/8', ],
'melodic': ['1/1', '9/8', '6/5', '4/3', '3/2', '5/3', '15/8', ]
},
'down': {
'major': ['1/1', '9/8', '5/4', '4/3', '3/2', '5/3', '15/8', ],
'natural': ['1/1', '9/8', '6/5', '4/3', '3/2', '8/5', '9/5', ],
'harmonic': ['1/1', '9/8', '6/5', '4/3', '3/2', '8/5', '15/8', ],
'melodic': ['1/1', '9/8', '6/5', '4/3', '3/2', '8/5', '9/5', ],
}
}
ACCOMPANY = {
'GP': "Grand Piano (non pure)",
'DR': "Drone Root (incl. harmonics)",
'DF': "Drone Fifth (incl. harmonics)",
'PC': "Pure Chords"}