Repository navigation
Conversation
No scale in music21 sets altered degrees since HarmonicMinorScale builds its raised seventh from its own intervals (A2, m2), and they have caused several bugs: an alteration had to be undone before realizing, and the realization cache had to be keyed on it. Removed: - the alteredDegrees parameter of every IntervalNetwork method and of ConcreteScale.findMissing - AbstractScale._alteredDegrees - IntervalNetwork.processAlteredNodes and getUnalteredPitch - the AlteredDegree type and the altered part of the cache keys The migration guide lists the removal.
Give a suggestion on how the removed functionality could still be tracked.
mscuthbert
left a comment
There was a problem hiding this comment.
Approved -- but one rename to consider -- and asking about a future PR of removing the specialized comparisons between .ps and instead just comparing Pitch to Pitch (in a later PR)
| One pitch of an ascending walk and its node id. | ||
| ''' | ||
| unalteredPitch: pitch.Pitch | ||
| realizedPitch: pitch.Pitch |
There was a problem hiding this comment.
I wonder if this can just become .pitch now that it's the only kind of Pitch in a NetworkWalkStep
There was a problem hiding this comment.
Or maybe that will end up masking the import of pitch in a way that would just be too horrible. If so then walkPitch might be better?
| walk = NetworkWalkPath([NetworkWalkStep(start, nodeObj.id)], nodeObj) | ||
| self._ascendingWalks[key] = walk | ||
| while not walk.ended and not _gte(walk.steps[-1].unalteredPitch.ps, maxPitch.ps): | ||
| while not walk.ended and not _gte(walk.steps[-1].realizedPitch.ps, maxPitch.ps): |
There was a problem hiding this comment.
possibly .pitch as above. Someday we should consider why we're doing .ps comparisons here and not just Pitch1 >= Pitch2 according to the definition of pitch comparison in the rest of the system (is it for speed reasons?)
Closes #2185 (remove altered degrees in v11). Removes the
alteredDegreesparameters fromIntervalNetworkandConcreteScale.findMissing,AbstractScale._alteredDegrees,processAlteredNodes,getUnalteredPitchand theAlteredDegreetype, and the altered part of the realization cache keys. The migration guide lists the removal.AI-assisted (Claude)