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

Class Major

mingus/core/scales.py:344–363  ·  view source on GitHub ↗

The major scale. Example: >>> print Major('A') Ascending: A B C# D E F# G# A Descending: A G# F# E D C# B A

Source from the content-addressed store, hash-verified

342
343
344class Major(_Scale):
345
346 """The major scale.
347
348 Example:
349 >>> print Major('A')
350 Ascending: A B C# D E F# G# A
351 Descending: A G# F# E D C# B A
352 """
353
354 type = "major"
355
356 def __init__(self, note, octaves=1):
357 """Create the major scale starting on the chosen note."""
358 super(Major, self).__init__(note, octaves)
359 self.name = "{0} major".format(self.tonic)
360
361 def ascending(self):
362 notes = get_notes(self.tonic)
363 return notes * self.octaves + [notes[0]]
364
365
366class HarmonicMajor(_Scale):

Callers 1

ascendingMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected