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

Class HarmonicMinor

mingus/core/scales.py:414–434  ·  view source on GitHub ↗

The harmonic minor scale. Example: >>> print HarmonicMinor('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

412
413
414class HarmonicMinor(_Scale):
415
416 """The harmonic minor scale.
417
418 Example:
419 >>> print HarmonicMinor('A')
420 Ascending: A B C D E F G# A
421 Descending: A G# F E D C B A
422 """
423
424 type = "minor"
425
426 def __init__(self, note, octaves=1):
427 """Create the harmonic minor scale starting on the chosen note."""
428 super(HarmonicMinor, self).__init__(note, octaves)
429 self.name = "{0} harmonic minor".format(self.tonic)
430
431 def ascending(self):
432 notes = NaturalMinor(self.tonic).ascending()[:-1]
433 notes[6] = augment(notes[6])
434 return notes * self.octaves + [notes[0]]
435
436
437class MelodicMinor(_Scale):

Callers 1

ascendingMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected