Monday, November 4, 2013

Music21 on GitHub

Just a quick note that music21's code is now hosted on GitHub at https://github.com/cuthbertLab/music21 .  For people who have been using SVN, we will have instructions on how to make a Fork of the music21 Git repository and to begin contributing pull requests soon.  Please hang tight.

Friday, November 1, 2013

Music21 v.1.7 Released

The newest version of music21, v. 1.7 has been released and is available for download at https://code.google.com/p/music21/downloads/list.

In the three months since v. 1.6 some good changes and improvements have been introduced.  We focused primarily on stabilizing features that were already in music21 in some form but were too experimental to advertise widely.

A noCorpus version of music21 has also been released, the first since v.1.0.  This version can be used in pure Free/Libre projects since files that were licensed for music21 only or non-commercial use have been removed.  If you are not sure which version to download, definitely get the full version. But maintainers of Debian Linux and others can update to 1.7 noCorpus.

Music21 v 1.7 (actually 1.7.1) will be the last version to support Python 2.6. Python 2.7 is over three years old and is supported by other flavors of Python including Jython (which skipped 2.6), PyPy, IronPython and is an easy upgrade for Python on Windows.  Mac users have had 2.7 since Mountain Lion and we're happy to report that with Mavericks being free and supporting systems that can run Snow Leopard, we're happy to be able to use this opportunity to take advantage of the latest features and start a roadmap to supporting Python 3.3 as well.  This is also the last release to use SVN.  We are moving to GitHub.  Updates soon.

The most important improvement for users is a much improved system of metadata searching (thanks to Josiah Oberholtzer). See:

http://web.mit.edu/music21/doc/usersGuide/usersGuide_11_corpusSearching.html

for more details.  LocalCorpus objects are elevated to equal status as the Core corpus so you can now build searchable indexes on any data you have and find the file you want much faster.  Try corpus.search('haydn') and read the docs above to see what's possible.

Among the other 150+ changes since 1.6 include:

  • Chord.inversion(2) will take a root position chord and put it in second inversion. (this is a change of behavior from before, where .inversion(2) would specify that the chord was in second inversion and override default inversion reporting (for things like Jazz 6 chords). To get the old behavior, use .inversion(2, transposeOnSet=False)
  • Fixes for abc parsing (N.B. the next version will rename the "abc" module to "abcNotation" to avoid the occasional name clash with the python AbstractBaseClass (abc) module).
  • Stream.getElementsByOffset(4.0) can now find a zero-length object at 4.0 -- bug fix.
  • Many modules are now packages (Stream, for instance).  This should not affect your code.  Existing packages with X/base.py can now find their files in X/__init__.py.  Again, this should not affect your code.
  • Page break support in Lilypond.
  • MIDI translate works better with instruments (thanks to Christopher Antilla)
  • Improvements to Braille Music Code output (thanks to Mario Lang; more to come)
  • Bug fixes in measure copying involving pivot chords and secondary dominants in RomanText
  • Roman numerals for VII, VI, viio/vii, vi/vio in minor are made more robust.  It6, Ger65, Fr43, are now supported.
  • Many many many bug fixes.  Thanks to community help!
Thanks as always to the NEH, Digging into Data program, the Seaver Institute, and MIT for their support of the project.

Thursday, August 8, 2013

music21 v.1.6.0 Released

Version 1.6.0 of music21 was released today.  This is the first new release in three months and is available at: http://code.google.com/p/music21/downloads/  .  The release also inaugurates a new documentation system, http://web.mit.edu/music21/doc/ designed by new music21 Lead Programmer, Josiah Wolf Oberholtzer and featuring an expanded User's Guide using the iPython Notebook, which allows for more examples, more graphics, and quicker development.  Expect to see more there soon.

Improved and updated docs were the main focuses of the new release, but you will also find:
  • Many improvements and fixes to the harmony.Harmony object.
  • Freezing/Thawing of Streams that were originally MIDI files now works.
  • Better handling of repeat endings.
  • Measure suffixes are handled more "musically"
  • Easier setup on UNIX systems and using PIP and other tools.
  • Improvements in Lilypond output
  • Documentation on using music21 with iPython in a multi-core, cluster environment.
This version of music21 is a larger download than before (68MB as opposed to 30MB) because all of the documentation in both old and new formats is included.  The next version will return to normal size.

One backwards incompatible change: Stream.elements now returns a tuple instead of a List.  This is done to emphasize that .elements should not be changed.  Instead use Stream.append, .remove, .insert, or subscript the Stream object.  Chord.pitches also returns a tuple instead of a List as well.  

Thanks to everyone for their contributions and comments that make music21 work well! 

Saturday, May 11, 2013

music21 v. 1.5 Released

A new version of music21 has been released, the first public release since January.  This release focuses primarily on speed and stability improvements so it is worth an upgrade even if none of the new features is of use to you.  A summary of what's new:


  1. Many improvements to Layout -- information soon, but pixel level positioning of measures can now be extracted from MusicXML files.
  2. Chordify addPartIdAsGroup=True works better.
  3. Better triplet handling in Humdrum SpineParser.
  4. Some .nwc files (not just .nwctxt) files can now be parsed.
  5. Improvements for PartStaffs (Piano scores, etc.)
  6. .transpose works on Key objects.
Thanks to everyone for support and new ideas on where to take the project.

Friday, January 11, 2013

Music21 version 1.4.0 Released

Version 1.4.0 of music21 is released.  This is a minor release on the outside, but incorporates a number of changes that will let us do more substantial changes in the upcoming next release.  Among the most substantial changes that people will notice are:

  1. Better documentation and more chapters in the User's Guide
  2. Ability to import Capella XML (.capx) files
  3. Articulations, grace notes, crescendo, and diminuendo now import in ABC (and the code is in place to bring in many more !exclamation! tags).  Thanks to Dylan Nagler, Harvard Research Partner for the code.
  4. analysis.neoRiemannian allows for analyzing the effect of smooth voice leading on chords.  Thanks to Maura Church, Harvard Research Partner for the code.
  5. Humdrum parsing improvements, including comments and better handling of multiple voices and importing of instruments.
  6. Lilypond now supports different numbers of stafflines in output
  7. Percussion support for MIDI and the basics of an Unpitched object type.  Thanks to Ben Houge for commits.
  8. Improvements to chords, including a better .root() algorithm for incomplete chords, geometricNormalForm -- implements Dmitri Tymoczko's algorithm for normal form.
  9. More useful errors when parsing incorrect or unsupported features in several formats.
  10. New files in the corpus, including many 14th century scores, and the 2nd movement of Clara Schumann's Piano Trio.  Female composers are hugely underrepresented in computer-readable music repertories (we couldn't find any substantial piece that was available), so we're proud to add an important work (known to many of us from the Norton Anthology of Western Music) by a great compose.
  11. Serialization of Streams via Pickle is much better tested and works even on large scores.  See the freezeThaw module.  If you're going to work with the same pieces over and over again, freeze them once and you'll load them over 3x as fast the next time you need them.
  12. MusicXML improvements: bowing marks are now supported as are pizzicato, etc.  A bug on piano staves where one used multiple voices but the other did not has been fixed.
  13. Improvements to the harmony module.  Thanks to Beth Hadley, MIT Undergraduate Research Assistant.
  14. Big speed increase on startup for people who have installed additional modules: numpy, scipy, and matplotlib are only loaded when first needed.

The next release will include support for virtualenv installs (I know people have been waiting for it, but this release included switching the entire development/commit platform, so we didn't want to change too much at once) and will have optional support for Rational number durations and offsets for perfect work with complex tuplets, etc.

In the meantime, I've been using music21 to explore similarity in fourteenth-century music to great success, so I hope to be able to share my own experiences as a user, not just a developer, of the toolkit very soon.  -- Michael