github cuthbertLab/music21 v4.0.4-beta

latest releases: v7.3.0, v7.1.0, v6.7.1...
pre-release6 years ago

v4.0.4 beta represents the first preview release of the new music21 v. 4 system. As with all new "X" release names, v.4 has backward incompatible behaviors that I think are worth it for the great new features. The release is stable enough for general use and almost might be a release candidate.

among the 157 commits since v.3.1:

Major new features:

  • Graphing rewrite!

.plot() and Graphing has always been one of the most powerful parts of music21 since long before v.1.0 (mad props, Christopher Ariza!) but it's also been one of the most daunting aspects of using music21. It shouldn't be any more. The code has gone through a major rewrite to improve the simplicity of doing easy things and the power when doing difficult things. The easy things are documented in Chapter 22 and the hard things in Chapter 44.

  • Style!

the all new style module and style.Style object handles aspects of a note or other object's visual display that are not (usually) semantic. This class has allowed a major increase in the ability to properly preserve MusicXML visual formatting on input and export.

Style objects are created only when needed, so el.hasStyleInformation() allows for checking for the presence of a .style object without creating one.

(To be documented more soon)

  • Major rewrite of TinyNotation allows for easy extensibility.

Documented in the User's Guide! Check it out!

  • Always improving docs

The User's Guide goes up to chapter 24 now, with major new examples in Chapter 20 along with rewritten chapters on keys, time signatures, sorting, and so on and so on. Plus all examples are now Retina quality for viewing fine details of scores.

Other new features

  • much better metadata processing in musicxml, humdrum, and braille
  • improved braille translation (tuplets) -- thanks Bo-Chen
  • better beaming, meter, and tuplets in ABC
  • output directly to PDF if MuseScore is installed.
  • Nested Tuplets! including in MusicXML.
  • Non-traditional key signatures
  • New works by Clara Schumann in the corpus.
  • stream.iterators.OffsetIterator() -- iterate groups of objects by offset.
  • improvements to analysis.discrete
  • demos/build_melody shows how to build MidiFile directly (thanks PeterMitrano!)
  • corpus paths are now searchable in corpus.search()
  • matplotlib and musescore graphics in Jupyter notebook are now retina quality.

Others, including bugs squashed:

  • Warning on Python 2 that music21 v. 4 is the last version to support Py 2.
  • ABC key signature and mode error fixed.
  • AudioSearch bugs fixed (thanks jjrob13)
  • Chord.normalOrderString (thanks emzhang)
  • Removed lots of old crutches including the "analysisData" on Stream, Note.editorial, and others. Style fixes most of this.
  • fix to Bach BWV 386 (thanks alexcoplan)
  • Note.pitches returns a tuple not list, just like Chord.pitches
  • Converter can deal with some wrong file extensions now.
  • Instrument reprs are fixed
  • configure finds many more notation programs.
  • ties are imported better between elements in and out of voices in musicxml
  • configure works on macOS when user directory contains spaces.
  • Bugs in ending and restarting a recursiveIterator fixed.
  • doc errors fixed (thanks Andrew Sanchez)

Deprecations and deprecated elements removed

  • (this list does not contain changes to the alpha/ directory which can change at any time)
  • Note.ps, and Note.accidental, Note.pitchClass, Note.pitchClassString, Note.diatonicNoteNum, and Note.microtone are all deprecated. Use Note.pitch.ps, etc. instead.
  • Chord.normalForm is deprecated because it gave the wrong answer. use normalOrder instead; same with normalFormString
  • SpannerBundle.list is deprecated; use list(SpannerBundle) instead
  • with the advent of .style, el.color is deprecated, use el.style.color instead
  • Stream.stream() is deprecated -- now that the transition to iterators is done, there should be no need for this.
  • REMOVED stream.getOffsetByElement; use s.elementOffset(el) instead.
  • REMOVED stream.haveBeamsBeenMade; use stream.streamStatus.haveBeamsBeenMade
  • REMOVED stream.makeTupletBrackets(); use stream.makeNotation.makeTupletBrackets(s)
  • REMOVED stream.realizeOrnaments; use stream.makeNotation.realizeOrnaments(s)
  • nbconvert is no longer packaged with music21

Don't miss a new music21 release

NewReleases is sending notifications on new releases.