MCPcopy Create free account
hub / github.com/bspaans/python-mingus / relative_major

Function relative_major

mingus/core/keys.py:143–153  ·  view source on GitHub ↗

Return the relative major of a minor key. Example: >>> relative_major('a') 'C'

(key)

Source from the content-addressed store, hash-verified

141
142
143def relative_major(key):
144 """Return the relative major of a minor key.
145
146 Example:
147 >>> relative_major('a')
148 'C'
149 """
150 for couple in keys:
151 if key == couple[1]:
152 return couple[0]
153 raise NoteFormatError("'%s' is not a minor key" % key)
154
155
156def relative_minor(key):

Callers

nothing calls this directly

Calls 1

NoteFormatErrorClass · 0.90

Tested by

no test coverage detected