Skip to content

music21 v9.5.0

Latest
Compare
Choose a tag to compare
@mscuthbert mscuthbert released this 20 Feb 00:36
· 2 commits to master since this release
ff16dc2

Music21 v9.5 is a small bug-fix release that fixes a few hard to find bugs, takes advantage of updated dependencies, and adds a bit more typing in various places.

Fixes Introducing Tiny Incompatibilities

These incompatibilities have been removed from music21 in order to get correct typing. They were never documented nor promised to work, hence considering it okay with Semantic versioning.

  • interval.getWrittenLowerNote works on notes and pitches but both objects must be a Note or must be a Pitch. (This restriction guarantees that the type of object being returned as the lower one will not vary based on attributes, and lets these functions be properly typed). By @mscuthbert in #1749 (started in 1747 by mistake) -- same is true for the parallel methods getWrittenHigherNote, getAbsoluteHigherNote, and getAbsoluteLowerNote. Now your IDE/mypy etc. should know the type of object being returned by these poorly-named functions!
  • Removed the "ability" to do this: p = pitch.Pitch(pitch.Pitch('D')) to get a D. Never was documented before: Pitches now cannot take other pitch objects as arguments; this ability was just used in the pre-typed past where we were mixing strings and Pitch objects interchangeably and was only used in music21 in one place (reduceChords.py). The newly created Pitch objects lost a lot of information about harmonics, accidental display, etc. so this was a good catch. Contributed by first-time contributor @float3 in #1746

What's Changed

  • Fixed links to generated documentation by @jacobtylerwalls in #1741
  • Take advantage of Astroid 1015 bug being fixed by @mscuthbert in #1745 -- many overloaded functions in music21 were very verbose with code that did not actually run in order to pass mypy with Astroid bug no. 1015 (a tough bug!). Major contributions to fixing the bug were given by @jacobtylerwalls. Also better docs about why music21 has its own StrEnum package. Also 'highestTime' will forever be equivalent to OffsetSpecial.AT_END -- if you know about this, it's great. Most will not care.
  • Added some typing to graph modules by @mscuthbert in PR1745 above.
  • Updated typing on tablature and intervals by @mscuthbert in #1747
  • Code of Conduct Clarify by @mscuthbert in #1748
  • Update interval Typing overloads by @mscuthbert in #1749
  • Fix a case where octave transposing instruments like piccolo or double bass imported from MusicXML could have incorrect octave information and bad enharmonic transposition (C#s becoming Dbs) fixed by @gregchapman-dev in #1752 (this is unrelated to a question recently here and in StackOverflow about the difference between transposing by P8 and by 12 semitones (thanks to @vanderstel for answering).)
  • Bug fix: corpora (including the built in core corpus) which were indexed using Python 3.13 could not be read on other systems (like Mac to Linux); a pathlib.Path was being stored in the corpus accidentally. Fixed by @mscuthbert in #1754

New Contributors

Full Changelog: v9.3.0...v9.5.0