def ascending(self): notes = [self.tonic] notes.append(intervals.minor_third(notes[0])) notes.append(intervals.perfect_fourth(notes[0])) notes.append(intervals.perfect_fifth(notes[0])) notes.append(intervals.minor_seventh(notes[0])) return notes * self.octaves + [notes[0]]
def minor_eleventh(note): """Build a minor eleventh chord on note. Example: >>> minor_eleventh('C') ['C', 'Eb', 'G', 'Bb', 'F'] """ return minor_seventh(note) + [intervals.perfect_fourth(note)]
def suspended_fourth_triad(note): """Build a suspended fourth triad on note. Example: >>> suspended_fourth_triad('C') ['C', 'F', 'G'] """ return [note, intervals.perfect_fourth(note), intervals.perfect_fifth(note)]
def lydian_dominant_seventh(note): """Build the lydian dominant seventh (7#11) on note. Example: >>> lydian_dominant_seventh('C') ['C', 'E', 'G', 'Bb', 'F#'] """ return (dominant_seventh(note) + [notes.augment(intervals.perfect_fourth(note))])
def test_perfect_fourth(self): majors = { 'C': 'F', 'Cb': 'Fb', 'Cbb': 'Fbb', 'C#': 'F#', 'C##': 'F##', 'B': 'E', 'A': 'D', 'F#': 'B', 'F': 'Bb', 'Fb': 'Bbb', } for x in majors.keys(): self.assertEqual( majors[x], intervals.perfect_fourth(x), 'The perfect fourth of %s is not %s, expecting %s' % (x, intervals.perfect_fourth(x), majors[x]))
def eleventh(note): """Build an eleventh chord on note. Example: >>> eleventh('C') ['C', 'G', 'Bb', 'F'] """ return [note, intervals.perfect_fifth(note), intervals.minor_seventh(note), intervals.perfect_fourth(note)]
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 descending(self): tonic = self.tonic notes = [] for i in range(self.octaves * 2): notes += [ reduce_accidentals(note) for note in list(Mixolydian(tonic).descending()[:4]) ] tonic = intervals.perfect_fourth(tonic) if self.octaves == 1: return notes else: return notes[:-self.octaves]
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, l=None): tonic = self.tonic if l is None: l = self.octaves * 3 for i in range(l): notes += [ reduce_accidentals(note) for note in list(Mixolydian(tonic).ascending()[:3]) ] tonic = intervals.perfect_fourth(tonic) if self.octaves == 1: return notes[:-1] else: return notes[:-self.octaves]
def lydian_major_seventh(note): """Build the lydian major seventh (M7#11) on note. """ return (major_seventh(note) + [notes.augment(intervals.perfect_fourth(note))])