Ten days since the last release, so time for a new one. Again, speed, stability, and new features. The biggest change is the entirely new MusicXML output system to match the entirely new input system introduced last release.
The second biggest is in the (re)introduction of StreamIterators and RecursiveIterator. I'll need to get some demos up of this soon, but this will be a game changer for some tasks.
Update or install with one (or both) of these commands:
pip install --upgrade music21
pip3 install --upgrade music21
Bigger changes
- MusicXML now uses the faster, more reliable ElementTree output generator. Please report any bugs on import or export, especially if they are regressions from
format='oldmusicxml'
.oldmusicxml
will disappear soon. - Better docs (see below), especially for the long under documented recurse function. Everything that was in overview is now in the User's Guide.
- Streams now support filters on iteration -- if you have been using:
for e in s.getElementsByClass('X')
, try:for e in s.iter.getElementsByClass('X')
for a major speedup, especially if you just want the first one or something of that sort. Recurse() supports the same, sofor e in s.recurse().notes.getElementsByGroup('tuba')
will be WAY faster than before. You might not notice the difference on your own work, but internally things are getting a lot faster. (obscure non-filter routines will be deprecated and disappear soon). - Corpus docs/indexes, etc. are updated with more recent corpus changes (nothing new, but easier to find).
- Use of deprecated functions now generates a warning. This should help people plan for migration in case you're not reading the documentation religiously.
Smaller changes
- Documentation is improved and updated working with Jupyter/IPython 4 (note: a bug in nbconvert + pandoc requires pandoc v. 1.33 or older to make; they're working on a patch). Docs build in parallel, so it's very fast -- you'll see updates more often.
- Documentation is now separated into "source/" and "autogenerated/" folders -- everything in source is user editable. Nothing in autogenerated is.
- A number of obscure, long deprecated functions are gone, the biggest being
n.removeLocationBySite()
usen.sites.remove()
- normalization in features has been fixed (Thanks Frank Zalkow)
- Parsing of cappella MusicXML files has been improved.
- Improved parsing of RomanText files; bugs in several encodings of rntxt and abc files have been fixed.
common.nearestCommonFraction
has been renamedaddFloatPrecision
to better reflect what it does. This has always confused me.
No comments:
Post a Comment