pubPhotos

What is music21?

Music21 is a set of tools for helping scholars and other active listeners answer questions about music quickly and simply. If you’ve ever asked yourself a question like, “I wonder how often Bach does that” or “I wish I knew which band was the first to use these chords in this order,” or “I’ll bet we’d know more about Renaissance counterpoint (or Indian ragas or post-tonal pitch structures or the form of minuets) if I could write a program to automatically write more of them,” then music21 can help you with your work.

How simple is music21 to use?

Extremely. After starting Python and typing "from music21 import *" you can do all of these things with only a single line of music21 code:

Display a short melody in musical notation:
converter.parse("tinynotation: 3/4 c4 d8 f g16 a g f#").show()

Print the twelve-tone matrix for a tone row (in this case the opening of Schoenberg's Fourth String Quartet):
print (serial.rowToMatrix([2,1,9,10,5,3,4,0,8,7,6,11]) )

or since all the 2nd-Viennese school rows are already available as objects, you can type:
print (serial.getHistoricalRowByName('RowSchoenbergOp37').matrix() )

Convert a file from Humdrum's **kern data format to MusicXML for editing in Finale or Sibelius:
converter.parse('/users/cuthbert/docs/composition.krn').write('musicxml')

With five lines of music21 code or less, you can:

Prepare a thematic (incipit) catalog of every Bach chorale that is in 3/4:

catalog = stream.Opus()
for workName in corpus.chorales.Iterator():
  work = converter.parse(workName)
  firstTS = work.recurse().getElementsByClass('TimeSignature')[0]
  if firstTS.ratioString == '6/8':
    catalog.append(work.measures(0, 2))
catalog.show()

Google every motet in your database that includes the word ‘exultavit’ in the superius (soprano) part (even if broken up as multiple syllables in the source file) to see how common the motet's text is (assuming you have a bunch of motets in "listOfMotets"):

import webbrowser
for motet in listOfMotets:
  superius = motet[0]
  lyrics = text.assembleLyrics(part)
  if 'exultavit' in lyrics:
    webbrowser.open('http://www.google.com/search?&q=' + lyrics)

Add the German name (i.e., B♭ = B, B = H, A♯ = Ais) under each note of a Bach chorale and show the new score:

bwv295 = corpus.parse('bach/bwv295')
for thisNote in bwv295.recurse().notes:
  thisNote.addLyric(thisNote.pitch.german)
bwv295.show()

Of course, you are never limited to just using five lines to do tasks with music21. In the demos folder of the music21 package and in the sample problems page (and throughout the documentation) you’ll find examples of more complicated problems that music21 is well-suited to solving, such as cataloging the rhythms of a piece from most to least-frequently used.

Music21 builds on preexisting frameworks and technologies such as Humdrum, MusicXML, MuseData, MIDI, and Lilypond but music21 uses an object-oriented skeleton that makes it easier to handle complex data. But at the same time music21 tries to keep its code clear and make reusing existing code simple. With music21 once you (or anyone else) has written a program to solve a problem, that program can easily become a module to be adapted or built upon to solve dozens of similar (but not identical) problems.

Interested in learning more?

Latest music21 News

[August 12, 2018 19:03 pm] « » [music21]
[March 17, 2018 17:11 pm] « » [music21]
music21 v.5 is PYTHON 3 ONLY
Do not upgrade to this version if you are using Python 2.7 (or better still, upgrade yourself to Python 3.6 instead). It runs on Python 3.4-3.6 only.  music21 v.4 is the last version to support Python 2.
run "pip3 install music21" to install.
music21 v.5 brings with it seven months of determined work by an open-source team to streamline music analysis. The move to Python 3 allowed us to greatly simplify the codebase and to speed up many commonly used features in music21. If you are apprehensive about switching to Python 3, I hope you'll be convinced that it is worth it the first time you run chordify() on a large score v.5. and see that what might have taken an hour can now be done in few seconds. A great number of bugs involving working with non-English text have been fixed.
As a new major release, music21 breaks backwards compatibility where necessary and deprecates underused functions and things that can be done better in other ways. We're always trying to balance bringing new features with keeping the software as simple to use as possible.
Major changes:
  • Python 3 only. Yes, I said that but I'm saying it again. This change has made developing much faster and a lot more fun. Also it's made music21 more powerful and faster.
  • Chordify moves from O(n^2) to O(n) time -- Chordify on large scores works great now.
  • MusicXML roundtrip now preserves much about appearance, style, metadata, etc. -- you can now load a musicxml file into music21 and back into your software and 90% of the time you'll get visually the same result as the original software. Finale roundtrip is especially good!
  • Corpora searching is much better and much faster. Metadata is stored in pickle format.
  • Feature Extraction runs multicore by default. Together with the average of 10x faster chordify, feature extraction on large datasets on multicore systems is now very strong. Parallel processing is easier and much better documented.
  • Features with JSymbolic equivalents much more closely match the spec and new features have been added (thanks Micah Walter!)
  • Many routines that used to return string filepaths now return pathlib.Path objects. Especially useful for people running on Python 3.6
  • Almost all functions deprecated in v. 4 have been removed.
  • Many keyword functions now require the keyword, so instead of makeNotation(True), call makeNotation(inPlace=True), since explicit is better than implicit, this is a good way of being sure that only the right arguments are being changed.
  • parsing of Volpiano (Gregorian chant notation) added.
  • RehearsalMarks are now supported internally and in MusicXML reading/writing.
  • Other musicXML improvements: Volume of individual notes is now imported and exported. Glissandi and barlines and transposition work better. More elements can be hidden. Empty spaces in MusicXML measures are converted to hidden rests, to avoid gapped streams. Pitches in chords on musicxml import are always sorted from lowest to highest. Fretboard diagrams are supported and Instrument objects have the MusicXML v. 3 sound tags attached. (thanks to Luke Poeppel for these last two)
  • Corpora improvments: works by Amy Beach, Schubert (Lindebaum), better Bach Chorales (thanks Dr. Norman Schmidt), and Scott Joplin. Errors in various pieces fixed.
  • Scales and IntervalNetworks run much faster and are better documented.
  • voiceLeading.VoiceLeadingQuartet improved. compatibility change: improperResolution renamed to isProperResolution and improved. Former title implied that False meant it was proper; now the title reflects the output. Many other fixes and improvements thanks to Ryaan Ahmed.
  • analysis.transposition -- searches pitch lists for number of distinct transpositions; neoriemannian analysis improvements (thanks to Mark Gotham for both) Stream alignment tools in alpha.analysis (thanks to Emily Zhang)
  • Copyright and other metadata is preserved in many formats on import. This is just being a good neighbor.
  • Demos and most alpha code has been moved to a new separate repository: https://github.com/cuthbertLab/music21-demos -- they will be updated much less frequently. This will also make code development faster. Thanks to all who have contributed to music21's development. We'll be able to get more demos into the codebase by not needing to update them at every moment.
  • Bugs fixed: chords not in voices in measures with voices were not found in some routines. Instrument objects without midiProgram explicitly set get a program on MIDI output. MIDI no longer inserts a rest at the beginning (thanks KKONZ). Chord.normalOrder fixed (thanks luiselroquero), bugs in Capella parsing. Bugs related to Apple File System High Sierra not sorting files by default. Accented braille characters are exported properly.
  • Docs can be downloaded as a separate zip file.
I have no major backward-incompatable plans for the near future, so I expect v.5 to have a longer life than the last few releases (at least 18 months, and possibly 2-3 years), but work will continue on smaller subreleases to come. Thanks again to MIT, School of Humanities, Arts, and Social Sciences, and the Music and Theater Arts section for their support of music21 and the Seaver Institute and the National Endowment for the Humanities for financial support.
[March 10, 2018 17:02 pm] « » [music21]
The first and hopefully only beta/release candidate of music21 v. 5 has been released.    If no bugs are discovered/reported, I expect this to be the release version to be released next weekend and I’m going to hold off on merging any new pull requests until then.   I expect v.5 of music21 to have a longer than usual lifespan (at least 18 months, possibly more) and don’t have any backwards incompatible changes planned for the future except in the alpha and tree directories.  

Music21 v.5 is the first version to require Python 3 (3.4 required.  3.5 or 3.6 recommended as this will be the last version to support 3.4).

Changes since Alpha 2:
  • braille -- accented characters translate to braille
  • features -- many jSymbolic Feature Extractors match the spec more closely (thanks to Micah W. for the patches). Expect more of these improvements throughout the v.5 lifecycle.
  • Bach chorales -- improvements to naming and texts. Expect more of these improvements throughout v.5. Thank you to Dr. Norman Schmidt for these.
  • Improvements and fixes in voiceleading.py -- thanks to Ryaan Ahmed
  • More objects can be hidden with "hideObjectOnPrint"
  • Joplin, Maple Leaf Rag added to corpus
  • Guitar and other fretboards supported. Thanks to Luke Poeppel
  • Improvements to IPython/music21j MIDI
  • Added stream alignment tools in alpha.analysis. Thanks to Emily Zhang
  • docs for Stream.insertAndShift improved greatly.
  • separate zip file for docs.


Download at:
[January 3, 2018 12:35 pm] « » [music21]
The second alpha release of music21 version 5 (Python 3.4+ only) has been released.  There have been 47 new commits since alpha 1 (more on that below) mostly of a maintenance sort.  V5 is still pre-release code, and the syntax is still in flux until the main release next summer, but it is well-tested and good for most hobbyist coding.

Here are the main changes since alpha 1:
  • Better parallel processing system (esp. in terms of docs)
  • Pitches are 30% faster to create, notes are 15% faster.  You do create notes, don't you? :-)
  • Better musicxml support: volume.  Improvements to transposition, glissando, barlines
  • Corpus: added works by Amy Beach, Schubert (Lindenbaum), fixed missing Bach Chorales (thanks Dr. Schmidt!) and error in Haydn op. 1 no. 1 movement 1(thanks Joshua Ballance)
  • Scales, IntervalNetwork: faster and better documented.
  • NeoRiemannian analysis greatly improved (thanks Mark Gotham!)
  • voiceLeading.VoiceLeadingQuartet improved.  compatibility change: improperResolution renamed to isProperResolution and improved.  Former title implied that False meant it was proper; now the title reflects the output.
  • Instrument objects now have their MusicXML v.3 sound tags attached (thanks Luke P.!)
  • Bugs fixed: chords not in voices in measures with voices were not found in some routines. Instrument objects without midiProgram explicitly set get a program on MIDI output.  MIDI no longer inserts a rest at the beginning (thanks KKONZ).  Chord.normalOrder fixed (thanks luiselroquero), bugs in Capella parsing. Bugs related to Apple File System High Sierra not sorting files by default.

I neglected to post on this forum the announcement of music21 v.5 alpha 1, so the many great improvements there are listed below, with a new installation link:

--
Alpha 1 of v.5 of music21 includes an amazingly faster improved version of Chordify (thanks in large part to work by Josiah Wolf Oberholtzer)
music21 v.5 is PYTHON 3 ONLY
Do not upgrade to this version if you are using Python 2.7 (or better still, upgrade yourself to Python 3.6 instead). It runs on Python 3.4-3.6 only.
This is alpha code -- I am still formulating the changes for m21 version 5. Some things that have disappeared since v.4 may reappear, but some things that are currently here may be gone or significantly changed by v5 release. YMMV.
Other big changes:
  • Python 3 only. Yes, I said that but I'm saying it again. This change has made developing much faster and a lot more fun. Also it's made music21 more powerful and faster.
  • Chordify moves from O(n^2) to O(n) time -- Chordify on large scores works great now.
  • MusicXML roundtrip now preserves much about appearance, style, metadata, etc. -- you can now load a musicxml file into music21 and back into your software and 90% of the time you'll get visually the same result as the original software. Finale roundtrip is especially good!
  • Corpora searching is much better and much faster. Metadata is stored in pickle format.
  • Feature Extraction runs multicore by default. Together with the average of 10x faster chordify, feature extraction on large datasets on multicore systems is now very strong.
  • Many routines that used to return string filepaths now return pathlib.Path objects.
  • Almost all deprecated functions are removed.
  • Many keyword functions are now keyword only, so no worries about passing in "inPlace" accidentally.
  • parsing of Volpiano (Gregorian chant notation) added.
  • RehearsalMark is added (and in musicxml also).
  • Empty spaces in MusicXML measures are converted to hidden rests, to avoid gapped streams.
  • Pitches in chords on musicxml import are always sorted from lowest to highest.
  • analysis.transposition -- searches pitch lists for number of distinct transpositions (thanks Mark Gotham)
  • Copyright and other metadata is preserved in many formats on import. This is just being a good neighbor.
  • Demos and most alpha code has been moved to a new separate repository: https://github.com/cuthbertLab/music21-demos -- they will be updated much less frequently. This will also make code development faster. Thanks to all who have contributed to music21's development. We'll be able to get more demos into the codebase by not needing to update them at every moment.
The remarkable work over less than a month has been largely aided by dropping the Python 2 code dependencies, so while upgrading to Python 3.6 might cause some grumbling, my ability to forge ahead quickly I hope will more than make up for it!
This is alpha code. It won't install by default on pip. Use
pip3 install --upgrade music21==5.0.5a2
[August 6, 2017 17:11 pm] « » [music21]
The first release of music21 version 4 was released today (August 6, 2017).  This is the first major release of music21 in a year, and it brings with it a wealth of new tools for analyzing music with a computer and performing digital musicology, music theory, and composition.

Download from https://github.com/cuthbertLab/music21/releases or from the terminal, type:

    pip3 install --upgrade music21

(or without the "3" if you are using Python 2)

Version 4 is the last version of music21 that will support Python 2.7.  If you run Version 4 on Python 2.7, you will see a warning that it's time to move up to the brilliance that is Python 3.6.

As with all new "X" release names, v.4 has backward incompatible behaviors that I think are worth it for the great new features. 
Among the 272 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.
  • Local Corpora are great!
There's been a major rewrite of the corpus.corpora.LocalCorpus() function that makes it a fantastic way to work quickly with files you are working on from your own hard drive.  Set up your own local corpus, add paths to it, set the cacheFilePath to somewhere to store the metadata and you'll be able to search for pieces with particular features and metadata without needing to parse the score.

  • 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.
Documentation has been moved out of the music21 directory into the root directory -- it is no longer installed with music21 from pip -- this change was necessitated by the move to retina quality graphics, but reduces the installation size from 90MB to 15MB for the full corpus version and 6MB for the no-corpus version.  All documents are now tested with nbval, to ensure they stay up to date.
Other new features
  • Stream.measures() now optionally allows for indexes (where 0 always is the first measure; -1 is the last, and so on) making .getElementsByClass('Measure') not necessary in most cases.
  • 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.
  • Chord.add() and Chord.remove() allow for direct manipulation of chords.
  • Improvements to parallel processing in music21.
  • Ottava spanners now come in two types, transposing and non-transposing -- reflecting whether the pitches under the spanner already reflect the transposition (non-transposing) or not.
  • Palestrina humdrum has been reorganized and parses completely.
  • Many improvements to spanners and RomanNumerals.
  • Beams work much better and transfer in and out of MusicXML more completely.
  • Every MusicXML 3.0 articulation is now supported.
  • Core routines in stream.core have now been exposed publicly.  They are dangerous to use, but for anyone working on their own parsers, they can speed up insertions and appends by an order of magnitude.
Others, including bugs squashed:
  • Warning on Python 2 that music21 v. 4 is the last version to support Py 2.
  • Stream.template() is a great way to get an empty stream that otherwise matches the current Stream.  Replaces the obsolete .measureTemplate()
  • ABC key signature and mode error fixed.
  • RecursiveIterator gets a .currentOffsetInHierarchy, which can let even more places remove the dependence on .flat.  In fact, .flat uses the .recurse() method internally, because recurse() is now so fast.
  • 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) and to Beethoven Opus 59 no 3, movement 1.
  • 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)
  • bestClef() has been moved to the clef module where it belongs.
  • MusicXML sound tag now is placed properly (thanks Almog Cohen)
  • MIDI output from transposed scores now plays in concert pitch.
  • Breves are now acceptable as full measure rests.
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)
  • REMOVED VirtualCorpus -- it may return at some point but with a lot more features.
  • nbconvert is no longer packaged with music21
  • .exe files are no longer generated -- they were rarely used and pip is a better choice for Windows users now.

As the last version of music21 to run on Python 2, version 4 will have a longer support period for security patches and major bug fixes that render large parts of the system unusable for multiple users. This LTS (Long-term support) will run until the clock on python 2 runs out. (Currently two more years and eight months).  After that time, Python 2 will no longer be supported by the Python Foundation, and thus, by music21 either.  We're looking forward to joining the glorious Python 3-only feature and finally get to use some great features to make development faster and more stable.  Music21 v. 5 will be released at about the same time Django v. 2 (Py3 only) and a year after IPython/Jupyter made their first Python 3 only release.  Matplotlib will soon follow.  Python 3 is the future of humanistic and scientific programming.
As always, we thank the community for great support.  We'd always love to hear how you use music21 via the Google Groups mailing list.  Music21 was made possible by grants from the Seaver Institute, the National Endowment for the Humanities, and the School of Humanities, Arts, and Social Sciences / Music and Theater Arts Section at MIT.
[August 22, 2016 12:52 pm] « » [music21]
Version 3 of music21 is here!  This is the first major release in 11 months, with nearly 600 commits since the last version.  As a new major version, there are both huge new features as well as significant (often backwards incompatible) changes.

Upgrades for most users should work automatically by typing:

   pip3 install --upgrade music21

or (Python 2)

   pip install --upgrade music21

Or download from GitHub

A summary of the most important changes since v.2.2 are below:

Fun and easy to understand changes:

Lots more MusicXML support -- better support for time signatures, for grace notes, for spanners, for metadata, for...you name it!  And the system is refactored in such a way as to make contributing missing features quite easy.

MIDI files play back in Jupyter/IPython contexts.  Lots of improvements there for people who use MuseScore.

The User's Guide has become much more awesome, and you can play with all the good features there.

Many new ways to search scores -- LyricSearcher is fully polished and documented in the User's Guide.  Carl Lian's search.serial is upgraded from alpha to a full release that will be easy to expand in the future -- want to know where certain motives are used or transformed? This will make it easy to do. And search.segment -- the old standby -- is even better than ever (see below)

Try splitting notes and recombining them -- lots of intelligence going into this.

There's a big difference between taking a passage up a major third and taking it up 4 semitones.  In Chromatic contexts, music21 will now spell things how a musician would like to see them.  If you're working with MIDI data, without explicit enharmonics specified, you'll appreciate this.

Go ahead and use '~/../dir' and things like that in your file parsing -- music21 groks all that.

Look at you, fancy programmer, with your 4-CPU laptop! Why not give common.runParallel(tasks, function) a try and get music21 working 2-3x faster than before?  (just make sure that "tasks" isn't a list of Streams).  Oh, and if you're using search.segment to search for a particular passage inside a large collection of files, don't worry about using runParallel -- we'll do that for you automatically.

Docs are pretty and much better.  The User's Guide is the place to start.

Too many other changes to mention, but some shoutouts to Shimpe for new Lilypond code (triplet chords, etc.), Frank Zalkow for enharmonic spelling , dynamics, tempos and other things,  Chris Antilla for continued dedication to MEI processing, Emily Zhang for hashing functions and speeding up MIDI quantization,  Sonovice for articulation handling,  Dr. Schmidt for Chord symbol translations, Bagratte for IO cross Py2/3 fixes, Bo-Cheng Jhan for great braille contributions.


Big under the hood changes.

Big, backwards incompatible change: Many calls such as .parts, .notes, .getElementsByClass(), .getElementsByOffset(), etc. no longer return Streams.  They now are iterators (returning something called a StreamIterator).  For most uses, this is not going to change anything.  You can still use: for n in myStream.notes: and it'll work great. It makes many parts of music21 much, much faster.  For small scores, the differences will be small.  For large scores, the differences will be tremendous, especially when filters are chained, such as: myScore.recurse().notes.getElementsByClass('Chord').getElementsByOffset(0.0).  You're going to find that writing iterator chains is an amazing way to only get at items you want, especially with custom filters.  To get the old behavior, just add .stream() to the end of your iteration.

Because none of these filters change the activeSite of an element, you'll find that this is much more stable than before.

If you want to know what the note after a given note is in a musical context, call n.next() or n.previous().  If it's the last note of a measure, it'll move on the first note of the next. And once you've called .next() on one note of a stream, the remaining calls will be super super fast. I still haven't wrapped my mind completely around this paradigm, but it sure beats all the fooling around I used to do to figure out if one note was the same pitch as the next one, etc.

If you've been using music21 for some time, but have never looked at the docs for base.contextSites(), do it -- this is a very fast and extremely powerful way of figuring out how two objects relate to each other.  Together with the .next(), .previous(), and better support for .derivation, many extremely powerful systems can be written in music21 easily that could only be written with huge difficulty before.

Nearly all functions marked deprecated in v.2. have been removed.  Lots of super obscure functions in .base.Music21Object or .sites.Sites are gone.  This is a positive step since it'll make the documentation for these objects simple enough to understand.

Sorting works.  I mean, it just works.  With grace notes, with oddly positioned elements, with what have you. And it's pretty darn fast. This might seem like something small, but it's enormous for us.

Corpus managing is much simplified -- if you ever thought in the past, "Hey, I'd like to use a custom corpus" and then thought, "uhh...no thanks..." give a look at what is needed to set one up now.  You'll be glad for it!

Musescore and not Lilypond is used in Jupyter/IPython notebooks.

Complex durations are a lot less complex -- and faster.  

PyLint on all code -- I estimate that at least 200 undetected bugs vanished through this major effort. 


The Future

As noted in messages to the music21 mailing list (music21list at Google Groups), v.3.1 is the first non-beta release in the v.3 lineup.  Version 3 happens to share a version number with Python 3, but that is merely coincidence.  Music21 version 3 continues to work with Python 2.7 as well as Python 3.4.  Version 3 adds explicit support for Python 3.5 and drops support for Python 3.3. Music21 will continue to develop into a Version 4 to be released next summer (4.0.x will be alpha and beta releases and 4.1.0 will be the public release).  Version 4 will likely be the last version to support Python 2.

This release represents the end of a year's sabbatical where I got to work on low-low-level music21 functions that I didn't think anyone else would want to.  Due to teaching and other obligations, I'll be taking off work on the heart of music21 until the holidays (I'll still be taking bug fixes, etc.) and working more on documentation, examples, and applications.  The changes put in place for music21 v.3 has made working with it a lot more fun for me, so you'll probably see more a lot more applications get added, first to the alpha directory and then into the main set.  I've also put up a version 4 roadmap (trees are almost done, they should make it in. Style objects will be introduced so that beautiful musical scores can be created or at least imported and exported properly without major speed loses) so if anyone wants to take the lead on a project you can do so.  I'm working on a project called STAMR, Small Tools for Agile Music Research, which should create standalone tools using music21 and music21j for musicologists to get their work done faster.  Given that I'm teaching music fundamentals online again, you should see music21 and music21j integration working far better than ever before.

Thanks to MIT for supporting my work, and the Seaver Institute and the NEH for initial funding to make music21 a success.  And thanks to this great community for all your contributions in the past and contributions to come.



How can I contribute?

Music21 is a rapidly-progressing project, but it is always looking for researchers interested in contributing code, questions, freely-distributable pieces, bug fixes, or documentation. Please contact Michael Scott Cuthbert (cuthbert at mit.edu), Principal Investigator.

The development of music21 has been supported by the School of Humanities, Arts, and Social Sciences at M.I.T., the Music and Theater Arts section, and generous grants from the Seaver Institute and the NEH/Digging-Into-Data Challenge. Further donations to the project are always welcome.