forked from PierluT/Progetto-CPAC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdizionari.py
72 lines (64 loc) · 1.55 KB
/
dizionari.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
67
68
from collections import Counter
chords_midi_dict={
'C':[0,4,7],
'Cm':[0,3,7],
'Cdim':[0,3,6],
'Db':[1,5,8],
'Dbm':[1,4,8],
'Dbdim':[1,4,7],
'D':[2,6,9],
'Dm':[2,5,9],
'Ddim':[2,4,9],
'Eb':[3,7,10],
'Ebm':[3,6,10],
'Ebdim':[3,6,9],
'E':[4,8,11],
'Em':[4,7,11],
'Edim':[4,7,10],
'F':[5,9,12],
'Fm':[5,8,12],
'Fdim':[5,8,11],
'F#':[6,10,13],
'F#m':[6,9,13],
'F#dim':[6,9,12],
'G':[7,11,14],
'Gm':[7,10,14],
'Gdim':[7,10,13],
'Ab':[8,12,15],
'Abm':[8,11,15],
'Abdim':[8,1,14],
'A':[9,13,16],
'Am':[9,12,16],
'Adim':[9,12,15],
'Bb':[10,14,17],
'Bbm':[10,13,17],
'Bbdim':[10,13,16],
'B':[11,15,18],
'Bm':[11,14,18],
'Bdim':[11,14,17],
}
scale_midi_per_accordo ={
'C':[60,62,64,65,67,69,71,72],
'Cdim':[60,61,63,65,66,68,69,72],
'F':[65,67,69,70,72,74,76,77],
'Fdim':[65,66,68,69,70,71,75,77],
'G':[67,69,71,72,74,76,78,79],
'Ebdim':[63,64,66,67,69,70,72,75],
'Am':[69,71,72,74,76,77,79,81],
'Abdim':[68,70,71,73,75,76,77,80],
'Dm':[74,76,77,79,81,83,84,86],
'Bbdim':[70,71,73,75,76,77,79,82],
'Bm':[71,73,74,76,78,79,81,83],
'Dbdim':[73,75,76,78,80,82,83,85],
'Em':[76,78,79,81,83,84,86,88],
'F#dim':[78,81,84,87,90,93,96],
'A':[69,71,73,74,76,78,80,81],
'D':[74,76,78,79,81,83,85,86],
'Adim':[69,70,71,73,75,76,78,81],
'Bb':[70,72,74,75,77,79,81,82],
}
basic_grammar={
"S":["M", "SM"],
"M": [["H","H"], ["q", "h", "q"]],
"H": ["h", ["q","q"]],
}