Esempio n. 1
0
 def test_form2(self):
     self.assertEqual(Chord("C9"), Chord("C7(9)"))
Esempio n. 2
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. 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_form(self):
     self.assertEqual(Chord("Cm9"), Chord("Cm7(9)"))
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_7th_integer(self):
     chord = note_to_chord([0, 4, 7, 10])[0]
     self.assertEqual(chord, Chord("C7"))
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_slash2(self):
     chord = note_to_chord(["C", "A", "C", "E", "F#"])[0]
     self.assertEqual(chord, Chord("F#m7-5/C"))
Esempio n. 9
0
 def test_7th(self):
     chord = note_to_chord(["C", "E", "G", "Bb"])[0]
     self.assertEqual(chord, Chord("C7"))
Esempio n. 10
0
 def test_add9(self):
     chord = note_to_chord(["C", "E", "G", "D"])[0]
     self.assertEqual(chord, Chord("Cadd9"))
Esempio n. 11
0
 def test_major7thflat5(self):
     chord = note_to_chord(["C", "E", "Gb", "B"])[0]
     self.assertEqual(chord, Chord("CM7-5"))
Esempio n. 12
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. 13
0
 def test_major7th(self):
     chord = note_to_chord(["C", "E", "G", "B"])[0]
     self.assertEqual(chord, Chord("CM7"))
Esempio n. 14
0
 def test_power(self):
     chord = note_to_chord(["E", "G", "C"])[0]
     self.assertEqual(chord, Chord("C/E"))
Esempio n. 15
0
 def test_notes(self):
     notes = list(range(12))
     for k, scale in SCALE.items():
         scale = sorted([Chord(note).bass for note in scale])
         self.assertEqual(notes, scale, "Error: {}".format(k))