Ejemplo 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))
Ejemplo n.º 2
0
 def test_7th_integer(self):
     chord = note_to_chord([0, 4, 7, 10])[0]
     self.assertEqual(chord, Chord("C7"))
Ejemplo n.º 3
0
 def test_omit1(self):
     chord = note_to_chord(["C", "E", "Bb", "D"])[0]
     self.assertEqual(chord, Chord("C7(9)"))
Ejemplo 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"))
Ejemplo n.º 5
0
 def test_slash3(self):
     chord = note_to_chord(["C", "Gb", "Bb", "D"])[0]
     self.assertEqual(chord, Chord("Gbaug/C"))
Ejemplo n.º 6
0
 def test_add9(self):
     chord = note_to_chord(["C", "E", "G", "D"])[0]
     self.assertEqual(chord, Chord("Cadd9"))
Ejemplo n.º 7
0
 def test_slash1(self):
     chord = note_to_chord(["D", "C", "E", "G"])[0]
     self.assertEqual(chord, Chord("C/D"))
Ejemplo n.º 8
0
 def test_7th(self):
     chord = note_to_chord(["C", "E", "G", "Bb"])[0]
     self.assertEqual(chord, Chord("C7"))
Ejemplo n.º 9
0
 def test_major7thflat5(self):
     chord = note_to_chord(["C", "E", "Gb", "B"])[0]
     self.assertEqual(chord, Chord("CM7-5"))
Ejemplo 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)"))
Ejemplo n.º 11
0
 def test_major7th(self):
     chord = note_to_chord(["C", "E", "G", "B"])[0]
     self.assertEqual(chord, Chord("CM7"))
Ejemplo n.º 12
0
 def test_power(self):
     chord = note_to_chord(["E", "G", "C"])[0]
     self.assertEqual(chord, Chord("C/E"))