| Subscribe via RSS

Transformational

March 11th, 2009 | No Comments | Posted in classical music, shostakovich, visualization, youtube

My laptop is scorching my lap. It’s pushing 70C on both cores. Like me, it gets hot and confused when forced to think too hard about math all in one go. Unlike me, it doesn’t scribble all over it’s work and swear at the obnoxiously curly integral symbols.

Why the laptop torture sesh? Well, I’m back on the wildly careening Fast! Fourier! Transform! bandwagon (the exclamation marks are for extra excitement). FFTs are a way to break down a raw chunk of sound (for example, an MP3) into all of its individual frequencies. So for example, if you had a recording of a pure C chord, running an FFT on it would show that it had C, E and G tones in it.

It looks a lot more interesting when there is more stuff going on than that…

YouTube Preview Image

…but than it is also harder to see what is happening.

I’m excited about this again because I came across this page, in which they have an algorithm that can calculate the spectrograms waaaay faster than my old crummy one. I haven’t had time to pick apart why that is yet, but it’ll for SURE result in some sexy animations. Otherwise I want all my money back.

Tags: , , ,

Score Processing, Part II

November 29th, 2008 | 2 Comments | Posted in classical music, visualization, youtube

No-one exists here. We are still within the midst (or midsts? Which is it? Well, given that it is from the 15th century I guess I can get away with either. That’s how they used to roll.) of thanksgiving. No-one is here. Except me. I think my supervisor would have murdered me if I left this weekend, given that I was skipping around NYC for most of last week.

I did have some time to play around a bit more with the score processing. Here’s my standard guinea-pig type piece, Beethoven Op. 111:

YouTube Preview Image

Do you love the glorious widescreen? Oh wait… the embedded player doesn’t work with widescreen yet. Well, if you (like me) are hot for 16:9 you can watch the full thing here. HOWEVER. It still won’t have any audio. Why not? It turns out that synchronizing the audio is actually the real crux of this score analysis malarkey.

You see, the notes in the video are a literal transcription of the score (extracted from MusicXML versions of MIDI files), but no-one ever plays a literal transcription of the score. The tempos vary all the time. So making the audio match the notes is a much more difficult problem than getting the notes themselves. I have about five different ideas for getting this to work, but all of them are several day long programming sessions.

Still, the video looks kind of pretty, right?

Tags: , , , ,

More Open-Source Music

November 19th, 2008 | 4 Comments | Posted in classical music, visualization

Hooray! Free sheet music for all!

I only just came across this site, even though all the drama of it reappearing happened half a year ago. I didn’t notice it back then because my visits into sheetmusicland only occur rarely. In fact I only go in search of scores for one of about, errr, two reasons:

  • I’ve decided to try and play the piano again.
  • I am obsessing about a particular passage in a piece of music, and want to know the key, or time-signature, or which instrument is making that funny noise (like that weird buzzing in Shostakovich 4)

Well hang onto your three-cornered hats, because today it was for another reason. The reason of animation. I had this totally awesome idea for animating a piece of classical music in which you’d have an orchestra layout:

And then the different sections would light up when they were playing. I thought it’d be interesting to get a visual feel for how the melodies are getting passed around, like you do with a live performance. Of course, in order to do this you need a copy of the score (or an insanely good ear and lots of time).

Instead of doing it manually — that is, looking at the score and by hand turning that into frames of animation — I want to automate it, at least a little bit. In the most basic version you don’t even need to try and work out which exact notes are being played. All you need to do is draw a line (or rather, a rectangular box) vertically across the clef and see how many black pixels there are inside. When a note is being played it will be darker than average. If you do this for the whole score you should have a pretty good indication of when notes are being played by each instrument.

Of course, things like this are always way easier to describe then to actually accomplish, but I’m gonna give it a shot when I get a bit of free time that isn;t spent playing on teh internets.

Tags: , ,