Music is omnipresent and plays an enormous role in our everyday lives. It transports us, soothes us, energizes us, evokes memories instantaneously like few things in this world have the power to do (smell being an exception).

Music can bind us together and create shared experiences, or it can divide us (metalheads versus country fans). But why? Mark Changizi wrote an excellent article on the origins of music and four hurdles for a scientific theory of music, touching on these questions: why do we have a brain for music; why is music emotionally evocative; why do we dance; and why is music structurally organized as it is?

I'm interested in a slightly different why - why are we drawn to so many kinds of music? What is it about a certain song, band, musical style that draws us in? In our current age of iTunes and the Internet we can pick and choose amongst artists and albums - the age of the "concept album" in which people buy an entire album that was carefully crafted by musicians and producers has been superseded by the age of the musical buffet in which we can sample a little here and maybe take a big helping there. I'm pretty certain that if you pick any random iPod off the street it will contain a cornucopia of musical genres. For example, while packing a month ago for our move, I went through my and my husband's collection of CDs. Our tastes are eclectic, to say the least - we have music ADD. Name a musical genre and it's represented among our collection - everything from classical to show tunes, and extremes like death metal (the huz) versus folk rock of the Lilith Fair persuasion (me).1

A musical genome

Extremes notwithstanding, the huz and I have pretty similar taste in music. That's all fine and good - it sure makes road trips a lot more pleasant - but how can musical styles that are so different appeal to us? Is there a common "yes I like this" factor, a lowest common denominator if you will, that threads through all of these songs?

Pandora thinks so. Pandora Internet Radio started the Music Genome Project back in 2000, assembling a team of 50 musician-analysts to listen to music "one song at a time, studying and collecting literally hundreds of musical details on every song. It takes 20-30 minutes per song to capture all of the little details that give each recording its magical sound - melody, harmony,  instrumentation, rhythm, vocals, lyrics ... and more - close to 400 attributes!"

The Music Genome Project database is built "using a methodology that includes the use of precisely defined terminology, a consistent frame of reference, redundant analysis, and ongoing quality control to ensure that data integrity remains reliably high. Pandora does not use machine-listening or other forms of automated data extraction."

The idea is to create radio "stations" that play only music that will appeal to you, based on the "genome" of songs and/or artists you like. And it works - I discovered some of my current favorite artists via Pandora, artists I would never have been exposed to otherwise.

But this still doesn't answer my question - how can I like both Indigo Girls and Foo Fighters? They could both be classified as rock, so perhaps the answer is in genre. But I like Stevie Ray Vaughn too, and he's considered a blues musician. But perhaps he could be a blues-rock musician. The problem is that music often defies classification. So is there an underlying characteristic that can be analyzed?

Beating to the rhythm of different drums

As a matter of fact, there is! Researchers in Brazil published an article in the open-source New Journal of Physics2 suggesting that "searching for the temporal aspects of songs – their rhythm – might be better to find music you like than using current automatic genre classifications."

Even a singular genre can spawn multitudinous baby genres, and the lines are often blurry. In the awesome Fargo Rock City3, Chuck Klosterman discusses the cultural impact of heavy metal, but even he notes that in a book about heavy metal he isn't sure how to define it: "What exactly are we referring to when I say 'heavy' metal? Moreover, what qualifies a band as metallic? What makes a metal band 'glam'? Can a 'glam metal' band also be a 'speed metal' band? Is a 'death metal' band always a 'speed metal' band? And - perhaps most importantly - is there a difference between being a 'rock' band and being a 'metal' band (because musicians certainly seem to think so)?"

Science Codex says that the researchers "studied four musical genres – rock, blues, bossa nova
and reggae – looking at 100 songs from each category, analysing the most representative sequences of each genre-specific rhythm such as the 12 bar theme in blues, which means that the song is divided into 12 bars – or measures - with a given chord sequence. Using hierarchical clustering, a visual representation of rhythmic frequencies, the researchers were able to discriminate between songs and come up with a possibly novel way of defining musical genres."

In an ethnographic manner, the authors say, music genres are particularly important because they express the general identity of the cultural foundations in which they are incorporated. For example, if you wore flannel, ripped jeans and looked generally unhygienic in the early 90s, you were probably pegged as a Seattle grunge fan, and in turn that music expressed your apathetic and/or angst-ridden existence and abhorrence of the flashy faux glam aesthetic of 80s synth pop.

The authors make the point that classifying music is both useful for the lay user and academics studying music:
Even widely used terms such as rock, jazz, blues and pop are not clear and firmly defined. According to Scaringella et al, it is necessary to keep in mind what kind of music item is being analysed in genre classification: a song, an album or an artist. While the most natural choice would be a song, it is sometimes questionable to classify one song into only one genre. Depending on the characteristics, a song can be classified into various genres. This happens more intensively with albums and artists, since, nowadays, albums contain heterogeneous material and the majority of artists tend to cover an ample range of genres during their careers. Therefore, it is difficult to associate an album or an artist with a specific genre. Pachet and Cazaly also mention that the semantic confusion existing in the taxonomies can cause redundancies that probably will not be confused by human users, but may hardly be dealt with by automatic systems, so that automatic analysis of the musical databases becomes essential. However, all these critical issues emphasize that the problem of automatic classification of musical genres is a nontrivial task.
All right then - how do you unweave the tangled web? With the temporal aspect of the song - rhythm - the authors propose to identify genres in terms of their rhythmic patterns.
While there is no clear definition of rhythm, it is possible to relate it to the idea of temporal regularity. More generally speaking, rhythm can be simply understood as a specific pattern produced by notes differing in duration, pause and stress. Hence, it is simpler to obtain and manipulate rhythm than the whole melodic content. However, despite its simplicity, the rhythm is genuine and intuitively characteristic and intrinsic to musical genres, since, for example, it can be used to distinguish between rock music and rhythmically more complex music, such as salsa. In addition, the rhythm is largely independent of the instrumentation and interpretation.
Modeling music

The authors make use of a number of modeling and statistic programs which result in some pretty snazzy charts. First they teased out the percussion "voice" and used software to create diagraphs representing each of the four genres under investigation: blues, bossa nova, reggae and rock. (For more in-depth discussion of each of the following charts, check out the paper here.)


Figure 1. Digraph examples of four music samples: (a) How Blue Can You Get by BB King. (b) fotografia by Tom Jobim. (c) Is This Love by Bob Marley. (d) From Me to You by The Beatles.

Musical genres don't just sound different, they look different too. The authors then took these diagraphs and analyzed the structure of the extracted rhythms "by using two different approaches for features analysis: principal components analysis (PCA) and linear discriminant analysis (LDA)," as well as "two types of classification methods: Bayesian classifier (supervised) and hierarchical clustering (unsupervised)."6

The authors selected 70 songs each representing the genres. This was my favorite reading of the whole article - I can just see scientists in a lab, serious faces on, scrutinizing John Lee Hooker's One Bourbon One Scotch One Beer (blues), Dick Farney's Copacabana (bossa nova), Shaggy's It Wasn't Me (reggae) and Van Halen's Running With the Devil (rock). The full list is available in Tables 2 and 3 in the paper.

When the researchers analyzed the genres for a single label (you are either rock or blues) using PCA, they obtained the following:

Figure 5. The first three new features obtained by PCA. (a) The first and second axes. (b) The first and third axes.

As you can see, this didn't shed a lot of light on the problem of classifying songs - the genres overlapped considerably, visually anyway. When they did their analysis using LDA, the genres separated a bit more:

Figure 7. The first three new features obtained by LDA. (a) The first and second features. (b) The first and third features.

Blues and bossa nova were more distinct, but reggae and rock almost completely overlapped. And what about that stray red blues marker in (a), way over on the right side of the square? Well, the authors say, "these misclassified art works have similar properties described in terms of rhythm notations and, as a result, they generate similar weight matrices." (In other words, rock and reggae have some pretty similar properties, making it more difficult to detect a distinct difference.) "Therefore, the proposed methodology, although requiring some complementation, seems to be a significant contribution toward the development of a viable alternative approach to automatic genre classification."

Given that many songs fit in to more than one genre type, the researchers then used PCA and LDA in a multi-label analysis, and although the PCA had better results the LDA was easier to show graphically. So they did, and it looks pretty similar to Figure 7 above:


Figure 14. Contour plots of the 2D class conditional Gaussian densities and scatter plots of the dataset: all points in a given contour plot are equally likely, since they are equidistant from the mean vector of the corresponding class, according to the Mahanalobis metric.

Our odd little #30 way over on the right (Gary Moore's A Cold Day In Hell, for those interested) is a blues sample, but "its features are more similar to those of the bossa nova samples, that is, its feature vector is located closer to the centre of the reggae conditional density than to the centre of the blues density. Therefore, it is expected that this sample be classified as belonging to the bossa nova class." Other examples of multi-labels include blues sample 56 (Stevie Ray Vaughan's Little Wing) and rock sample 265 (Rolling Stones' Satisfaction) - the little red and purple numbers near the intersection of all four plots - which were classified as belonging to all four four classes.

After classifying all 280 songs, the authors concluded that "it is clear from our study that musical genres are very complex and that they present redundancies. Sometimes it is difficult even for an expert to distinguish them. This difficulty becomes more critical when only the rhythm is taken into account."

As far as future research, the authors think "it would be interesting to use more measurements extracted from rhythm, especially the intensity of the beats, as well as the distribution of instruments, which is poised to improve the classification results. Another promising area for further investigation regards the use of other classifiers, as well as the combination of results obtained from an ensemble of distinct classifiers. In addition, it would be promising to apply multi-label classification, a growing field of research in which non-disjointed samples can be associated with one or more labels. Another interesting future work is related to the synthesis of rhythms. Once the rhythmic networks are available, new rhythms with similar characteristics according to the specific genre can be artificially generated."

In the meantime, put on those boots that were made for walking, wander where the streets have no name, and rock like hurricanes (or even a medium-sized tropical storm) while shouting at the devil. As Nietzsche says, "Without music life would be a mistake."

-----------------------------------------------------------------------
1 This is actually a really fun activity for a rainy day. Go through your significant other's music collection, hopefully one that is still boxed up from high school/college. I'll never let my husband live down some of the CDs I found, including Bel Biv Devoe, Criss Cross, and even an errant Shania. Although be prepared for the tables to turn.
2 I originally was going to put this article in the Physics section of the site, but decided music on the whole is more of a culture issue and went with the Culture field instead.
3 I adore Chuck Klosterman. If you like music, buy this book. He's a great writer with a fantastic sense of humor - mostly known for his non-fiction work but he also just published a novel called Downtown Owl. I also like him because he's from a little town near Fargo4 so when he discusses regional cities chances are I've been there.
4 Fargo is in North Dakota, not Minnesota! The fact that this fact still escapes the notice of many, particularly those in the Northeast Corridor (from D.C. to Boston), who don't realize that there is an entire country just to their left5, just amazes me. I blame the Coen Brothers. I don't know a single person in Minnesota that has a ridiculous accent like that (but to be fair I haven't met every single Minnesotan).
5 When I lived out East, people asked where I was from and I said Minnesota. They all responded with a vague sense that Minnesota was "in the middle somewhere" and "by Canada, maybe?" Look at a map, people. If it wasn't for us you wouldn't have hockey in the U.S.
6 I am by no means an expert in any of these methods. The word Bayesian struck a chord somewhere in the dusty cobwebbed boxes of my statistics knowledge attic, but that was about it. So, if you want the down and dirty details of what they did, read the paper, as I prefer to not dilute their work.

Also see the article by the News Staff.