David Temperley: Music and Probability

This is a book about music cognition: attempting to understand how people understand the music they hear. Temperley’s main thesis throughout the book is that a profitable way to study music perception is to pretend that the listener is doing a Bayesian analysis to determine the structure (e.g., time signature and key) behind the musical surface (the audio signal being heard).

Bayes’ Theorem seems to be pretty hot these days. It’s a statement about probabilities, the main point of which is that the a priori likelihood of certain states is useful information when trying to figure out what state actually exists. A standard example is that if a certain disease is incredibly rare, then even if you test positive for it with an only slightly fallible test, it’s still quite unlikely that you really have it.

The whole idea that musical perception is largely about creating models in your head about what’s going on, with associated expectations about the future that can either be met or thwarted, and that composers are constantly playing with those expectations, is associated in my mind with the late Leonard Meyer, who is definitely worth reading. I recommend in particular Emotion and Meaning in Music.

Temperley uses Bayesian analysis to simulate how listeners create a presumptive model for a given musical signal; for example, if a note arrives a little later than expected, the listener has to make an on-the-fly guess whether that is due to a syncopation (the tempo remains constant and the note is offset from its expected location relative to it) or rubato (the tempo has slowed down slightly and the note is exactly where you’d expect in the slowed-down tempo). If you have a model for the relative probability of the two cases, you have good grounds for guessing which is actually going on. (Note that the model can change according to what kind of music you’re listening to: the answer to the above question is much more likely to be rubato if it’s a classical performance and syncopation if it’s a rock performance).

Temperley creates these sorts of models to generate proposed probability distributions in varied domains, from time signatures to key determination to modulation detection. There are some good standard corpora of analyzed musical examples so he’s able to evaluate his models to existing ones fairly accurately, and they perform well though not groundbreakingly so. One nice thing is that the models tend to be fairly simple compared to many other ones in the field, which tend to be rather special-cased and apparently a bit fragile.

I was very pleased, by the way, to find that a scale-determination system that I had come up with independently in the late 90s for use in creating automatic accompaniment for MIDI renditions of karaoke songs was basically exactly the same as one of the standard systems that the academic world came up with. (The short version is that for a given timespan you take the total duration of each pitch class and take the dot-product of that 12-dimensional vector with a vector representing a signature for each hypothetical scale, then take the maximum. Not rocket science but it was nice to come up with a simple quantitative algorithm that performed well in practice.)

Even though there’s no silver bullet here, the ideas in it are quite interesting. I particularly like that the models end up being fairly straightforward and don’t require a ton of specialized tweaks, which is a promising feature. The math involved is real, but if all you care about is the music you can probably gloss over most of it if you trust the author. Worth reading if you’re interested in how people perceive music, either for its own sake or because you want to exploit it as a composer or performer.

Tags: , ,

3 Responses to “David Temperley: Music and Probability

  1. Jeb Bishop says:

    “The whole idea that musical perception is largely about creating models in your head about what’s going on”
    — Have you read Hindemith’s A Composer’s World? He talks there about a similar idea, which he couches in terms of a mental “co-construction” that the listener creates in the act of listening. For me the idea is pretty close to Husserlian phenomenology, which you could say seeks to explain our cognition of everything in terms of “models in the head” that organize raw incoming data. The idea goes back at least to Kant, really — intuition subsumed under categories, as a way of explaining how we experience an ordered world.
    An interesting thing about Hindemith’s version of it is that (if I remember it right — it’s been a while) he seems to regard the co-construction as being what is actually directly experienced by the listener — something like a mental representation between reality and the self. And he winds up suggesting that since the mental co-construction is the actual object of musical cognition, you don’t really need the sound waves in space to occasion it — you can get it just as well by reading a score, for example, if you have the ability to do that. I don’t agree — I think the sensory experience of the physical material is crucial to experiencing music, and I’m pretty much a Rortyan about the mental representation model — but it is a logical terminus of that perspective.

  2. dfan says:

    I’ve read a bit of The Craft of Musical Composition back in college, if I remember correctly, but that’s it.

    The co-construction idea sounds right to me. The best example to me is when a Brahms or Beethoven piece goes into a giant syncopated-against-the-barline section where you can either imagine that there was a half bar at the beginning and end of the section like the music is trying to fool you into perceiving, or doggedly maintain the original meter in your head. These two listening experiences are qualitatively different to me, so much so that I really feel like I am listening to a different piece each time, even though the actual sound is of course exactly the same.

    I have had the experience of recognizing heard music as instantly familiar and then realizing that the familiarity came solely from seeing score excerpts and hearing them in my head. So I do feel in some cases like I can construct a musical experience in my head that is just as real as one I have actually heard through my ears. This was stuff like Haydn quartets, though; my ability to generate a virtual listening experience from the score that is just as good as the original starts fraying around 1850.

  3. Jeb Bishop says:

    When I wrote “I don’t agree — I think the sensory experience of the physical material is crucial to experiencing music” I might have been a little unclear; I don’t disagree that the mind (somehow or other) creates meaning in the way it organizes incoming sensory input; my disagreement is with what I saw as Hindemith’s denigration of the physical, sensory experience in favor of what he seems to regard as the true experience of music, which for him seems to be totally mental/intellectual. Maybe I’m misremembering or misinterpreting, though.

Leave a Reply