pubPhotos
LATEST NEWS from my Prolatio and music21 blogs:
[February 16, 2014 15:24 pm] « » [music21]
With music21, it's not hard to plot discrete data (pitches, durations, etc.) as continuous data. There isn't a built in tool for doing this, but since music21 is written in Python, it is easy to take advantage of the tools from matplotlib, numpy, and scipy to create "cubic bezier-curve splines" that show these points in an easily visualized format.

In music21 you can easily plot the position of notes as a piano roll:

from music21 import corpus

bach = corpus.parse('bwv66.6')

bach.plot('pianoroll')



which preserves pitch names, measure numbers, etc.  But the case we're asking for requires a plot more like this:




















The numbers at the left are midi numbers while the bottom is number of quarter notes from the beginning. Here's some code to help you achieve this:

import numpy as np
import matplotlib.pyplot as plt
from scipy import interpolate
from music21 import corpus

bach = corpus.parse('bwv66.6')

fig = plt.figure()

for i in range(len(bach.parts)):
    top = bach.parts[i].flat.notes
    y = [n.ps for n in top]
    x = [n.offset + n.quarterLength/2.0 for n in top]

    tck = interpolate.splrep(x,y,s=0)
    xnew = np.arange(0,max(x),0.01)
    ynew = interpolate.splev(xnew,tck,der=0)
    
    subplot = fig.add_subplot(111) # semi-arbitrary three-digit number
    subplot.plot(xnew,ynew)
plt.title('Bach motion')

plt.show()

With this sort of graph it's easy to isolate each voice (not much overlap of voices in this chorale) and to see the preponderance of similar motion among the Soprano, Alto, and Tenor, but lack of coordination with the Bass (which would create forbidden parallels if it coordinated).  More sophisticated examples with better labels are easily created by those with knowledge of matplotlib, but this simple demonstration will suffice to get things started.
[November 4, 2013 17:04 pm] « » [music21]
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.
[November 1, 2013 01:03 am] « » [music21]
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.
[October 17, 2013 16:44 pm] « » [prolatio]
In spring 2012, MIT established a new Center for Art, Science, and Technology (CAST) sponsored by a grant from the Mellon Foundation.  For the past year, CAST has been sponsoring wonderful concerts, shows, and exhibitions related to the now-fundamental interconnectivity between the creation and performance of art and the worlds of science, engineering, and technology. I'm proud to say that CAST's mandate also extends to the study of art, including music and musicology, and that they've chosen to feature my work in a great article, "Medieval Music, Digitally Reconstructed," written by Anya Ventura.  As always, I thank the NEH, Digging into Data partners, and the Seaver Institute, and MIT for their support of my work.


[October 15, 2013 17:23 pm] « » [prolatio]
Along with my institution, MIT, I am a firm believer in using technology to make our teaching and learning tools available freely or cheaply to everyone who wants to learn.  Look in this space in the coming months for some new initiatives that I'll be taking, but one of the oldest digital learning spaces is still one of the most complete and best, and that's MIT's OpenCourseWare.  OCW publishes syllabi, teaching notes, assignments (often including student answers), and, for larger classes, lectures and other materials.  I have worked with OCW to put my Early Music, 1900-1960, and Computational Musicology classes online.  They also host some extraordinary panel discussions, such as the forum on Musical Time.

OCW has recently written a wonderful article about me and why I believe OCW is doing a great thing for the world.  Please take some time to read it if you'd like.
[October 14, 2013 20:56 pm] « » [prolatio]
In my notation seminar, we were talking last Friday about "Crumb dots". These are George Crumb's idiosyncratic notation where dots are placed on either side of a note. Such as .  . which is worth the length of a quarter note tied to a sixteenth note. I think the logic is that it's a double-dotted quarter note where the second dot instead subtracts instead of adds.  In any case, it's worth 1.25 quarter notes in length.



We also talked in the seminar earlier in the semester about medieval "dot groups."  These are not symbols found in actual medieval music, but things that are really useful for transcribing medieval music, where 9/8, 9/16, 9/4, 9/2, etc. are commonly implied meters.  There is no single note that can fill up a measure of 9/X where X is a power of two.  So we tend to use things such as a dotted quarter note tied to a dotted eighth note ( ♩. ♪. ) for 9/16, and so on. But consider that that figure comprises two notes, the second of which is half the length of the first, and they are tied together.  That is the basic definition of a dotted note: a dotted half note is a half note tied to the note half the length of a half note, or a quarter.  So what ♩. ♪. needs is a way of "dotting" a dotted quarter note, or  ( ♩. ) . ––note that this note has a different length than a double-dotted quarter note (which is worth 7/16, not 9/16) and this "dotted-dotted-quarter note" is worth more than a half note.  When it is used, it is usually written with two dots vertically aligned: ♩:



Formulas and Extensions to negative numbers

Working out the length of notes with multiple dots can be hard work.  In this screen capture from the "Reimagined" Battlestar Galactica, Kara "Starbuck" Thrace doesn't get it right even though the fate of humanity rests on her deciphering the secrets of a mysterious melody:

The third line should have two 32nd notes, not 16ths, and the fourth line should have triplet 64th notes.

So, let's get back to the basics. How long is a note with dots? Let's see.  If a quarter note gets the beat then:

♩ = 1 beat
♩. = 1.5 beats
♩.. = 1.75 beats
♩... = 1.875 beats

and so on to

lim (d ∞ ) = 2

So, what's the pattern?

1
1 + 1/2
1 + 3/4
1 + 7/8
1 + (n – 1)/n

Where n = 2d

Given that, we can work out that –1 dots is:  1 + (211) / 2or 1 + (–½) / ½ or 1 – 1 or 0. So a note with negative 1 dots has no length.

For d = –2 we get –2 beats.  I don't know what that would mean.  I suppose play the note backwards beginning two beats before it should start?  (David Lewin has written about the uselessness of negative note lengths).

Just to round it all out:

d = –3, implies duration –6 beats.
= –4, implies duration –14 beats.
= –5, implies duration –30 beats.

or for any negative d, duration = – (2|d– 2).

Non-integer dots

Fractional dots create irrational durations, a more useful concept than negative durations. Conlon Nancarrow[*]  has used these durations in some of his pieces, such as one where two canonic lines are set against each other with tempi in the ratio of √2 to 2.  After the first note of the piece, no two notes will ever coincide no matter how long the piece lasts.   There's no way to notate anything like this in normal notation, but with fractional dots, we can do this.  If n = 2and beats = 1 + (n – 1)/n then a note with 1/2 dot has n =  2½ or √2, so a half-dotted quarter lasts 1 + (√2 - 1)/√2 beats, or approximately 1.29 beats.  With this knowledge we can create many irrational lengths for notes just by giving fractional dots. (Though not all irrational lengths.  For instance Nancarrow's "Transcendental Etude" puts two canonic lines against each other with tempi in the ratio of e to π.  Fractional dots could not notate this).

But before trying to figure those out (an exercise for the reader...), there are still lots of rational number lengths that cannot be notated with fractional (i.e. rational number) dots.  Is there a way to get any other rational length instead of just the ones based on powers of 2 that are standard? Can we, for instance, notate a triplet only with partial or negative or partial negative dots? Yes, we can, by making the number of dots a logarithm!  For instance, to get a note that is 5/3 the basic length, we set the number of dots to log2(3). That's a triplet half note. To get a triplet quarter, we subtract two dots from that, or (log2(3) – 2) dots. Or for a quintuplet, use (log2(5) – log2(3) – 1) dots.

Trying to come up with a way of notating this makes me understand why someone decided that a triplet mark was simpler. But since it is not too hard to prove that any nested tuplet can be written as a single tuplet, we find that any rational duration can be notated as a single note with different numbers of, possibly irrational, dots.  Something for the new complexity school to pursue next.  Or hopefully not.

[*] an earlier version of this post referred to "Colon Nancarrow" who is neither a piece of punctuation nor a part of the digestive tract.  He is also not the same as Loren Nancarrow, a really great weatherman in San Diego, that I've always wanted an excuse to make a shoutout to in a Conlon Nancarrow post.

For older stories visit the Prolatio (general items) or music21 (computational musicology) blogs.

Michael Scott Cuthbert (cuthbert [at] mit.edu) is Associate Professor of Music and Homer A. Burnell Career Development Professor at M.I.T.

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)

2010
Changing Musical Time in the Renaissance (and Today), for Festschrift Joseph Connors (forthcoming)

Bologna Q15: the making and remaking of a musical manuscript, review for Notes 66.3 (March), pp. 656-60.

2009
Ars Nova: French and Italian Music in the Fourteenth Century, edited volume with John L. Nádas (Music in the Medieval World Reference Series vol. 6). London: Ashgate. Reviewed by Gary Towne, The Medieval Review, February 2010.

"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.

2008
"A New Trecento Source of a French Ballade (Je voy mon cuer)," in Golden Muse: The Loeb Music Library at 50. Harvard Library Bulletin, new series 18, pp. 77–81.

2007
"Esperance and the French Song in Foreign Sources," Studi Musicali 36.1, pp. 1–19.

2006
"Trecento Fragments and Polyphony Beyond the Codex", Ph.D. Dissertation, Harvard University (unpublished).

"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]

2005
"Zacara’s D’amor Languire and Strategies for Borrowing in the Early Fifteenth-Century Italian Mass," in Antonio Zacara da Teramo e il suo tempo, edited by Francesco Zimei. Lucca: LIM, pp. 337–57 and plates 10–13.

2001
"Free Improvisation: John Zorn and the Construction of Jewish Identity through Music," in Studies in Jewish Musical Traditions, edited by Kay Kaufman Shelemay (Cambridge, Mass.: Harvard College Library). pp. 1-31. [.pdf]

Creative Commons License 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.