Esempio n. 1
0
 def test_all_chord(self):
     for k, v in CHORD_MAP.items():
         chord = note_to_chord(v)[0]
         self.assertEqual(chord, Chord("C" + k))
Esempio n. 2
0
 def test_7th_integer(self):
     chord = note_to_chord([0, 4, 7, 10])[0]
     self.assertEqual(chord, Chord("C7"))
Esempio n. 3
0
 def test_omit1(self):
     chord = note_to_chord(["C", "E", "Bb", "D"])[0]
     self.assertEqual(chord, Chord("C7(9)"))
Esempio n. 4
0
 def test_slash2(self):
     chord = note_to_chord(["C", "A", "C", "E", "F#"])[0]
     self.assertEqual(chord, Chord("F#m7-5/C"))
Esempio n. 5
0
 def test_slash3(self):
     chord = note_to_chord(["C", "Gb", "Bb", "D"])[0]
     self.assertEqual(chord, Chord("Gbaug/C"))
Esempio n. 6
0
 def test_add9(self):
     chord = note_to_chord(["C", "E", "G", "D"])[0]
     self.assertEqual(chord, Chord("Cadd9"))
Esempio n. 7
0
 def test_slash1(self):
     chord = note_to_chord(["D", "C", "E", "G"])[0]
     self.assertEqual(chord, Chord("C/D"))
Esempio n. 8
0
 def test_7th(self):
     chord = note_to_chord(["C", "E", "G", "Bb"])[0]
     self.assertEqual(chord, Chord("C7"))
Esempio n. 9
0
 def test_major7thflat5(self):
     chord = note_to_chord(["C", "E", "Gb", "B"])[0]
     self.assertEqual(chord, Chord("CM7-5"))
Esempio n. 10
0
 def test_major11th(self):
     chord = note_to_chord(["C", "E", "G", "B", "D", "F"])[0]
     self.assertEqual(chord, Chord("CM7(9, 11)"))
Esempio n. 11
0
 def test_major7th(self):
     chord = note_to_chord(["C", "E", "G", "B"])[0]
     self.assertEqual(chord, Chord("CM7"))
Esempio n. 12
0
 def test_power(self):
     chord = note_to_chord(["E", "G", "C"])[0]
     self.assertEqual(chord, Chord("C/E"))