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 ascending(self): notes = [self.tonic] for n in range(1, 7): if n in self.semitones: notes.append(intervals.minor_second(notes[-1])) else: notes.append(intervals.major_second(notes[-1])) return notes * self.octaves + [notes[0]]
def suspended_second_triad(note): """Build a suspended second triad on note. Example: >>> suspended_second_triad('C') ['C', 'D', 'G'] """ return [note, intervals.major_second(note), intervals.perfect_fifth(note)]
def dominant_ninth(note): """Builds a dominant ninth chord on note. Example: {{{ >>> dominant_ninth("C") ['C', 'E', 'G', 'Bb', 'D'] }}}""" return dominant_seventh(note) + [intervals.major_second(note)]
def major_ninth(note): """Builds a major ninth chord on note. Example: {{{ >>> major_ninth("C") ['C', 'E', 'G', 'B', 'D'] }}}""" return major_seventh(note) + [intervals.major_second(note)]
def suspended_second_triad(note): """Builds a suspended second triad on note. Example: {{{ >>> suspended_second_triad("C") ["C", "D", "G"] }}}""" return [note, intervals.major_second(note), intervals.perfect_fifth(note)]
def sixth_ninth(note): """Build the sixth/ninth chord on note. Example: >>> sixth_ninth('C') ['C', 'E', 'G', 'A', 'D'] """ return major_sixth(note) + [intervals.major_second(note)]
def dominant_ninth(note): """Build a dominant ninth chord on note. Example: >>> dominant_ninth('C') ['C', 'E', 'G', 'Bb', 'D'] """ return dominant_seventh(note) + [intervals.major_second(note)]
def major_ninth(note): """Build a major ninth chord on note. Example: >>> major_ninth('C') ['C', 'E', 'G', 'B', 'D'] """ return major_seventh(note) + [intervals.major_second(note)]
def sixth_ninth(note): """Builds the sixth/ninth chord on note. Example: {{{ >>> sixth_ninth('C') ['C', 'E', 'G', 'A', 'D'] }}}""" return major_sixth(note) + [intervals.major_second(note)]
def suspended_second_triad(note): """Builds a suspended second triad on note. Example: {{{ >>> suspended_second_triad(\"C\") [\"C\", \"D\", \"G\"] }}}""" return [note, intervals.major_second(note), intervals.perfect_fifth(note)]
def dominant_ninth(note): """Builds a dominant ninth chord on note. Example: {{{ >>> dominant_ninth(\"C\") ['C', 'E', 'G', 'Bb', 'D'] }}}""" return dominant_seventh(note) + [intervals.major_second(note)]
def minor_ninth(note): """Builds a minor ninth chord on note. Example: {{{ >>> minor_ninth(\"C\") ['C', 'Eb', 'G', 'Bb', 'D'] }}}""" return minor_seventh(note) + [intervals.major_second(note)]
def major_ninth(note): """Builds a major ninth chord on note. Example: {{{ >>> major_ninth(\"C\") ['C', 'E', 'G', 'B', 'D'] }}}""" return major_seventh(note) + [intervals.major_second(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 dominant_sharp_ninth(note): """Build a dominant sharp ninth chord on note. Example: >>> dominant_ninth('C') ['C', 'E', 'G', 'Bb', 'D#'] """ res = dominant_ninth(note) res[4] = notes.augment(intervals.major_second(note)) return res
def dominant_sharp_ninth(note): """Builds a dominant sharp ninth chord on note. Example: {{{ >>> dominant_ninth("C") ['C', 'E', 'G', 'Bb', 'D#'] }}}""" res = dominant_ninth(note) res[4] = notes.augment(intervals.major_second(note)) return res
def whole_note(note): """Returns the whole note scale starting on note. Example: {{{ >>> whole_note(\"C\") [\"C\", \"D\", \"E\", \"F#\", \"G#\", \"A#\"] }}}""" n = 0 last = note res = [last] while n < 5: new = intervals.major_second(last) last = new res.append(new) n += 1 return res
def whole_note(note): """Returns the whole note scale starting on note. Example: {{{ >>> whole_note("C") ["C", "D", "E", "F#", "G#", "A#"] }}}""" n = 0 last = note res = [last] while n < 5: new = intervals.major_second(last) last = new res.append(new) n += 1 return res
def ascending(self): notes = [self.tonic] for note in range(5): notes.append(intervals.major_second(notes[-1])) return notes * self.octaves + [notes[0]]
def whole_step_half_step(n): res = [intervals.major_second(n), intervals.minor_third(n)] return res