def test_minor_sixths(self): minors = { "C" : "Ab", "C#" : "A", "Cb" : "Abb", "E" : "C", "Eb" : "Cb", "E#" : "C#", "F" : "Db", "F#" : "D", "Fb" : "Dbb" } for x in minors.keys(): self.assertEqual(minors[x], intervals.minor_sixth(x),\ "The minor sixth of %s is not %s, expecting %s" % (x, intervals.minor_sixth(x), minors[x]))
def test_minor_sixths(self): minors = { 'C': 'Ab', 'C#': 'A', 'Cb': 'Abb', 'E': 'C', 'Eb': 'Cb', 'E#': 'C#', 'F': 'Db', 'F#': 'D', 'Fb': 'Dbb', } for x in list(minors.keys()): self.assertEqual(minors[x], intervals.minor_sixth(x), 'The minor sixth of %s is not %s, expecting %s' % (x, intervals.minor_sixth(x), minors[x]))
def test_minor_sixths(self): minors = { "C": "Ab", "C#": "A", "Cb": "Abb", "E": "C", "Eb": "Cb", "E#": "C#", "F": "Db", "F#": "D", "Fb": "Dbb", } for x in minors: self.assertEqual( minors[x], intervals.minor_sixth(x), "The minor sixth of %s is not %s, expecting %s" % (x, intervals.minor_sixth(x), minors[x]), )
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 ascending(self): notes = MelodicMinor(self.tonic).ascending()[:5] notes.append(intervals.minor_sixth(notes[0])) notes += MelodicMinor(self.tonic).ascending()[5:-1] return notes * self.octaves + [notes[0]]
def ascending(self): notes = Major(self.tonic).ascending()[:-3] notes.append(intervals.minor_sixth(notes[0])) notes += Major(self.tonic).ascending()[-3:-1] return notes * self.octaves + [notes[0]]