Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion music21/scale/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,8 @@ def derive(self, other, comparisonAttribute: str = 'pitchClass') -> ConcreteScal
abstract = t.cast(AbstractScale, self._abstract)
net = t.cast('intervalNetwork.IntervalNetwork', abstract._net)
pairs = net.find(pitchTarget=otherPitches,
comparisonAttribute=comparisonAttribute)
comparisonAttribute=comparisonAttribute,
alteredDegrees=abstract._alteredDegrees)

newScale = self.__class__(tonic=pairs[0][1])
if newScale.abstract is None:
Expand Down
4 changes: 4 additions & 0 deletions music21/scale/test_scale_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ def testHarmonicMinorDescendingRange(self):
descending = sc.getPitches('c#4', 'g#4', direction=Direction.DESCENDING)
self.assertEqual(self.pitchOut(descending), '[G-4, F4, E-4, D-4]')

def testDeriveHarmonicMinor(self):
sc = scale.HarmonicMinorScale()
self.assertEqual(sc.derive(['C', 'D', 'E-', 'B']).name, 'C harmonic minor')

def testDeriveByDegree(self):
sc1 = scale.MajorScale()
self.assertEqual(str(sc1.deriveByDegree(7, 'G#')),
Expand Down
Loading