Those who haven't programmed may not know that no modern computer program (or very very few) is built from a single code file, or flowchart leading from input to output. Instead each program is built from components (a file browser, a set of functions for manipulating canvases for drawing, a module for representing tempo) that can be called upon by other components in a systematized but reusable and testable manner. These are get bundled or packed or linked together to make a complete or extensible application or library. Different philosophies exist about which structures (or ontologies, to use a word with related but quite different meanings between the humanities and computer science) can be well-formed or desirable.
Translating music analysis software from the first language to the other has raised complex problems for the representation of music in code. Python allowed me to interweave different levels of musical thought, such that notes could will into existence a measure (say by asking for the creation of an object to encompass them) while a measure could in another context give birth to notes (for instance by asking for a suitable number to fill it, given some metrical, harmonic, and accentual constraints). A score could of course be a container to many measures, but a measure could also be linked or contain many scores (for instance as a key or heading to a catalogue of quotations or standard topoi). As I created the original music21 in Python, I revealed in the multiplicity of possible relationships, in the way some musical philosophers might argue that a score gives rise to a performance which, if transcribed or imagined, gives rise to a new score, which gives rise to a new performance, and so on to infinity.
I have found that programming musical logic has sharpened my awareness of the ambiguities, hierarchies, and underdefined elements of music. By underdefined elements, I suggest: is the interval from E# to Fb an ascending doubly-diminished second or a descending doubly-diminished second? If spelling matters more than sound, such that C-G is consonant but Dbb-G is dissonant, is the bass of a chord beginning on E##-Fbb-Bb the E## or the Fbb? (If it's the Fbb, then is a B###-Dbbb-F# chord in root position or first inversion? If the E##, does that mean that we cannot determine the bass of a chord by ear?) These may be absurdities to practicing musicians but deciding a "right answer" to them makes all the difference in how standard musical relationships should be represented and encoded.
It is extremely difficult to tell a computer to hold off on making a decision or to leave a paradox in place to solve later. The human ability (flaw?) in being able to reason around ambiguity, or to hold conflicting ideas without breaking down, is a capacity that those who design practical computing systems have either not been able to replicate or have deliberately chosen not to. Within the limited choices, I have generally been drawn to computing frameworks that let me come as close as possible to representing multiple perspectives. (Ironically, I've found the closest match so far in Python, despite its community adopting a motto that says there should be only one way to do it.) There is a danger that when good but still inadequate tools are used to model human behavior and creativity, eventually human behavior will bend to suit the tools, rather than the other way around. It is a force that those who design and use these tools must be aware of and continually fight against.
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 ), 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:
- 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.
pip3 install --upgrade music21==5.0.5a2
Cuthbert received his A.B. summa cum laude, A.M. and Ph.D. degrees from Harvard University. He spent 2004-05 at the American Academy as a Rome Prize winner in Medieval Studies, 2009-10 as Fellow at Harvard's Villa I Tatti Center for Italian Renaissance Studies in Florence, and in 2012–13 was a Fellow at the Radcliffe Institute in 2012-13. Prior to coming to MIT, Cuthbert was Visiting Assistant Professor on the faculties of Smith and Mount Holyoke Colleges. His teaching includes early music, music since 1900, computational musicology, and music theory.
Cuthbert has worked extensively on computer-aided musical analysis, fourteenth-century music, and the music of the past forty years. He is creator and principal investigator of the music21 project. He has lectured and published on fragments and palimpsests of the late Middle Ages, set analysis of Sub-Saharan African Rhythm, Minimalism, and the music of John Zorn.
Cuthbert is writing a book on Italian sacred music from the arrival of the Black Death to the end of the Great Schism.
Download what is almost certainly an out-of-date C.V. here (last modified June 2012)
Bologna Q15: the making and remaking of a musical manuscript, review for Notes 66.3 (March), pp. 656-60.
"Palimpsests, Sketches, and Extracts: The Organization and Compositions of Seville 5-2-25," L’Ars Nova Italiana del Trecento 7, pp. 57–78.
Der Mensural Codex St. Emmeram: Faksimile der Handschift Clm 14274 der Bayerischen Staatsbibliothek München, review for Notes 65.4 (June), pp. 252–4.
"Generalized Set Analysis and Sub-Saharan African Rhythm? Evaluating and Expanding the Theories of Willie Anku," Journal of New Music Research (formerly Interface) 35.3, pp. 211–19. [.pdf]
Unless otherwise mentioned, the writings, compositions and recordings on this site are licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.
Copyright 2010-11, Michael Scott Cuthbert. Web design by M.S.C.
Fonts for musicology: Ciconia (14th/15th c.) and ClarFinger (clarinet music).
In my copious spare time as a junior faculty member on tenure track, I do web design and programming consulting for the National Bureau of Economic Research.
Lectures on the web
enChanting: Musical Artifacts in Unlikely Places, lecture March 3, 2009
Ambiguity, Process, and Information Content in Minimal Music, podcast of a lecture to Comparative Media Studies at M.I.T.
Just for fun...
Mondrian meets Finding Aids in a map of books in my former apartment.
Numeric Deathmatch, a game I coded that was taught to me by Jon Wild. More fun in person, but the web interface encourages trashtalking.
Musicology Buzzword Bingo, useful for AMS meetings (requires Bach and Futura fonts)
Automatic New Musicology Paper Generator based on the Dada engine