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 to_major(note): """Returns the major of `note`. Example: {{{ >>> to_major("A") 'C' }}}""" return intervals.minor_third(note)
def diminished_triad(note): """Builds a diminished triad on note. Example: {{{ >>> diminished_triad("C") ["C", "Eb", "Gb"] }}}""" return [note, intervals.minor_third(note), intervals.minor_fifth(note)]
def hendrix_chord(note): """Builds the famous Hendrix chord (7b12) Example: {{{ >>> hendrix_chord('C') ['C', 'E', 'G', 'Bb', 'Eb'] }}}""" return dominant_seventh(note) + [intervals.minor_third(note)]
def minor_triad(note): """Build a minor triad on note. Example: >>> minor_triad('C') ['C', 'Eb', 'G'] """ return [note, intervals.minor_third(note), intervals.perfect_fifth(note)]
def diminished_triad(note): """Build a diminished triad on note. Example: >>> diminished_triad('C') ['C', 'Eb', 'Gb'] """ return [note, intervals.minor_third(note), intervals.minor_fifth(note)]
def hendrix_chord(note): """Build the famous Hendrix chord (7b12). Example: >>> hendrix_chord('C') ['C', 'E', 'G', 'Bb', 'Eb'] """ return dominant_seventh(note) + [intervals.minor_third(note)]
def minor_triad(note): """Builds a minor triad on note. Example: {{{ >>> minor_triad("C") ["C", "Eb", "G"] }}}""" return [note, intervals.minor_third(note), intervals.perfect_fifth(note)]
def diminished_triad(note): """Builds a diminished triad on note. Example: {{{ >>> diminished_triad(\"C\") [\"C\", \"Eb\", \"Gb\"] }}}""" return [note, intervals.minor_third(note), intervals.minor_fifth(note)]
def aeolian(note): """Returns the aeolian mode scale starting on note. Example: {{{ >>> aeolian("A") ["A", "B", "C", "D", "E", "F", "G"] }}}""" i = ionian(intervals.minor_third(note)) return i[5:] + i[:5]
def minor_triad(note): """Builds a minor triad on note. Example: {{{ >>> minor_triad(\"C\") [\"C\", \"Eb\", \"G\"] }}}""" return [note, intervals.minor_third(note), intervals.perfect_fifth(note)]
def relative_major(note): """Returns the major of `note`. Example: {{{ >>> to_major(\"A\") 'C' }}}""" return intervals.minor_third(note)
def to_major(note): """Returns the major of `note`. Example: {{{ >>> to_major(\"A\") 'C' }}}""" import intervals # Circular import return intervals.minor_third(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 aeolian(note): """Returns the aeolian mode scale starting on note. Example: {{{ >>> aeolian(\"A\") [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\"] }}}""" i = ionian(intervals.minor_third(note)) return i[5:] + i[:5]
def whole_step_half_step(n): res = [intervals.major_second(n), intervals.minor_third(n)] return res