def test_major_unison(self): for x in [ 'C', 'E', 'F', 'G', 'Ab', 'Dbbb', 'E####', ]: self.assertEqual(x, intervals.major_unison(x), 'The major unison of %s is not %s, expecting %s' % (x, intervals.major_unison(x), x))
def test_major_unison(self): for x in [ "C", "E", "F", "G", "Ab", "Dbbb", "E####", ]: self.assertEqual( x, intervals.major_unison(x), "The major unison of %s is not %s, expecting %s" % (x, intervals.major_unison(x), x), )
def create_interval_perfect(start_note): start = start_note options = [ intervals.perfect_fifth(start), intervals.perfect_fourth(start), intervals.major_unison(start) ] end = options[(randint(0, 2))] interval = intervals.determine(start, end) return interval
def create_interval_consonant(start_note): start = start_note options = [ intervals.perfect_fifth(start), intervals.perfect_fourth(start), intervals.major_unison(start), intervals.major_third(start), intervals.minor_third(start), intervals.major_sixth(start), intervals.minor_sixth(start) ] end = options[(randint(0, len(options) - 1))] interval = intervals.determine(start, end) return interval
def test_major_unison(self): for x in ["C", "E", "F", "G", "Ab", "Dbbb", "E####"]: self.assertEqual(x, intervals.major_unison(x),\ "The major unison of %s is not %s, expecting %s" % (x, intervals.major_unison(x), x))