Automatically Understanding the Emotional Content of Music
I’m back from the bright and sunny reaches and beaches of the Northeast. Me and my girlfriend slipped away to Maine for a couple of memorial weekendified discount workdays, where we climbed over multiple forts, waded out to islands (well, one island) in the freakin’ frigid Atlantic water, and ate several huge, unhealthy and thoroughly delicious meals. After churning through mountains of read-this and meet-then style eMails from my supervisor, I finally have a bit of time to feed this site a rather needed update.
While we were up pottering around Portland I remembered a project I thought would be really cool, once upon a time. The idea was to write software which would automatically analyze the tonal relationships throughout a piece of music, telling you what the key changes and harmonies were, and when they occurred.
It was driven by my lack of understanding of musical theory. I recognize modulations and harmonies which make me feel a certain way, which obviously encode some kinda fundamental emotional response (either natured or nurtured, I’m not sure which and I bet a ton of people disagree) but which I can’t point to and say: “Aha! Clearly it’s a iv-I modulation that is making me existentially angsty.” That frustrates me, and I feel like learning this stuff from scratch via really properly learning a musical instrument is gonna take way more spare time and (more importantly) devotion than I have on hand.
So, I thought an automatic type shortcut would be fantastic. It doesn’t even seem too terribly tricky (but then, nothing like this ever does until you start doing it). Since each note has a characteristic frequency (well, I guess a bunch of them with all the harmonics) it seems like pretty much all you need to do is to do a bunch of Fourier transforms to work out which notes are being played, and bam, you’ve got your harmonies. By looking at which notes are coming up in short periods of time you can work out the key.
Someone has to have done this already. This page has a bunch of links but most of them seem all 404ey. Actually, this seems much more along the lines of what I’m thinking of. I reckon I need to have a good old search around the internet for projects like this, I’ll let you know what I come up with.

May 26th, 2008 at 6:00 pm
Check out Prof. Elaine Chew’s tonality visualization system.
She runs a music-related signal-processing lab at one of the southern
California universities, I believe USC.