-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChords prototype1
More file actions
36 lines (30 loc) · 842 Bytes
/
Chords prototype1
File metadata and controls
36 lines (30 loc) · 842 Bytes
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
pitches = "CDEFGABCDEF"
root = input("Enter chord root(C-G): ")
quality = input("Enter chord quality(M or m): ")
if quality == "M":
M_whks = "034"
M_nwks = "125"
if str(pitches.index(root)) in M_whks:
t = pitches.index(root) + 2
f = pitches.index(root) + 4
third = pitches[t]
fifth = pitches[f]
elif str(pitches.index(root)) in M_nwks:
t = pitches.index(root) + 2
f = pitches.index(root) + 4
third = pitches[t] + str("#")
fifth = pitches[f]
if quality == "m":
m_whks = "125"
m_nwks = "034"
if str(pitches.index(root)) in m_whks:
t = pitches.index(root) + 2
f = pitches.index(root) + 4
third = pitches[t]
fifth = pitches[f]
elif str(pitches.index(root)) in m_nwks:
t = pitches.index(root) + 2
f = pitches.index(root) + 4
third = pitches[t] + str("b")
fifth = pitches[f]
print(root, third, fifth)