def test_major_seventh(self): majors = { "C": "B", "Cb" : "Bb", "Cbb" : "Bbb", "C#" : "B#", "C##" :"B##", "B" : "A#", "A" : "G#", "F#" : "E#", "F" : "E", "Fb" : "Eb" } for x in majors.keys(): self.assertEqual(majors[x], intervals.major_seventh(x),\ "The major seventh of %s is not %s, expecting %s" % (x, intervals.major_seventh(x), majors[x]))
def ascending(self): notes = [self.tonic] for i in range(3): notes.extend([intervals.major_second(notes[-1]), intervals.minor_third(notes[-1])]) notes.append(intervals.major_seventh(notes[0])) notes[-2] = intervals.major_sixth(notes[0]) return notes * self.octaves + [notes[0]]
def test_major_seventh(self): majors = { 'C': 'B', 'Cb': 'Bb', 'Cbb': 'Bbb', 'C#': 'B#', 'C##': 'B##', 'B': 'A#', 'A': 'G#', 'F#': 'E#', 'F': 'E', 'Fb': 'Eb', } for x in list(majors.keys()): self.assertEqual(majors[x], intervals.major_seventh(x), 'The major seventh of %s is not %s, expecting %s' % (x, intervals.major_seventh(x), majors[x]))
def augmented_major_seventh(note): """Build an augmented major seventh chord on note. Example: >>> augmented_major_seventh('C') ['C', 'E', 'G#', 'B'] """ return augmented_triad(note) + [intervals.major_seventh(note)]
def minor_major_seventh(note): """Build a minor major seventh chord on note. Example: >>> minor_major_seventh('C') ['C', 'Eb', 'G', 'B'] """ return minor_triad(note) + [intervals.major_seventh(note)]
def major_seventh(note): """Build a major seventh on note. Example: >>> major_seventh('C') ['C', 'E', 'G', 'B'] """ return major_triad(note) + [intervals.major_seventh(note)]
def ascending(self): notes = [self.tonic] for i in range(3): notes.extend( [intervals.major_second(notes[-1]), intervals.minor_third(notes[-1])]) notes.append(intervals.major_seventh(notes[0])) notes[-2] = intervals.major_sixth(notes[0]) return notes * self.octaves + [notes[0]]
def test_major_seventh(self): majors = { "C": "B", "Cb": "Bb", "Cbb": "Bbb", "C#": "B#", "C##": "B##", "B": "A#", "A": "G#", "F#": "E#", "F": "E", "Fb": "Eb", } for x in majors: self.assertEqual( majors[x], intervals.major_seventh(x), "The major seventh of %s is not %s, expecting %s" % (x, intervals.major_seventh(x), majors[x]), )
def create_interval_dissonant(start_note): start = start_note options = [ intervals.minor_second(start), intervals.major_second(start), intervals.minor_fifth(start), intervals.minor_seventh(start), intervals.major_seventh(start) ] end = options[(randint(0, len(options) - 1))] interval = intervals.determine(start, end) return interval
def ascending(self): notes = Mixolydian(self.tonic).ascending()[:7] notes.append(intervals.major_seventh(notes[0])) return notes * self.octaves + [notes[0]]