Fixes some small errors throughout that were uncaught in v.2.1.0 release due to one of the errors breaking the test system, and one larger error in stream.replace() which is main reason for the quick update.
Adds some features that were originally slated for 2.3, but which were ready and thus are easier to add now than to back out and put out later, including:
- improvements to multi-measure rest handling on import/export musicxml and representing in the note.Rest() object.
- rest positions off center line are now imported and exported to musicxml (note: musicxml records rest position as a pitch irrespective of clef. Music21 records offset from center line)
- open File objects and file-like objects (BytesIO and StringIO) can be passed in place of file names in many cases.
- stream.chordify(addPartIdAsGroup=True, consolidatePitches=True) now works properly if a single pitch appears in multiple parts.
- improvements to layout.py
- like lists, tuples, etc. -- bool(Stream) now returns True if there's at least one object in it, and False if it is empty. Similarly for StreamIterator objects
- speed improvements throughout many stream functions by replacing
if len(stream.getX()) > 0:
withif stream.iter.getX()
which will return True as soon as the first item is found. - alpha version of having music21 automatically load certain %magic functions under IPython/Jupyter Notebook. Will announce this further when I'm sure it works.
- Added documentation warnings about using
.elements
-- there's almost no need to do so; will work on potentially deprecating it soon.