Musical spectrum analyzer
April 3, 2006 7:17 PM   Subscribe

I'm looking for a musical spectrum analyzer program for Windows which can help me figure out notes and chords from WAV or MP3 samples.

My de-facto method of figuring out complex melodies and chords has been to find a MIDI of something I like and print sheet music from it. But there's more obscure stuff that only exists in MP3 form and I can't catch all the notes.

I've seen lots of spectrum analyzers but they all seem to be calibrated in Hertz. I need something calibrated in musical scales (A4, B4, C5, D5, E5, etc). Google is pretty much turning up a mess of NON-musical spectrum analyzers, "super download sites" that are keyword spammed, and so forth no matter what way I search.
posted by chef_boyardee to Media & Arts (17 answers total)
So, here's the problem: such software has been tried, but they usually *suck*, because this problem is actually ferociously hard to solve (at least as far as I know). If it's a single input, like a person singing, or even simple guitar/piano melodies with basic harmonies, the software I've seen can actually handle it.

You'd think, naw, it's really easy! Just recognize every note, and calculate the frequency, and there you are!!! A computer should be able to do this in a cakewalk (pun intended, ha ha). But I believe a couple of things make this much more complex:
What exactly is what in a complex wave?
First, the wave form in an mp3 is a single wave- the mp3 does not retain any "8-track" like quality, of separating the instruments and sources. So you have a very complex wave, that is then reduced to binary information at a sampled interval. Our ears are very, very, very good at recreating the sounds and understanding them as distinct sources, but mathematically even a single note from a violin or piano makes for a very complex wave pattern. How then does the computer "recognize" and reduce a single immense wave pattern into its many component sources based on which has the "shape" of a guitar (considering how many different types of guitars, and related sounds, they'll have), so that it can determine the frequency of those as well as which frequency goes with which source?

Overtones and "hidden" notes, or notes of varying volume
Second, there's the issue of overtones. If you hit a "C" on an instrument, there are related tones (C, G, E, and B I think) that are vibrating in higher octaves; it's these vibrations that make harmonies work, effectively: harmonies are utilizing the closeness between higher overtones of a C, E, and G to make the minor chord "work". And while your ear typically is good at picking out the principal tone consciously, the reality is other tones are vibrating that you don't hear, or at least only hear as a subtle nuance in the harmony. They may or may not be lost in an Mp3 recording, but this- for the computer- further muddies the problem of analyzing the notes in a played piece of music: the wave contains notes that you don't think are there (consciously)
That all said, I've seen and used free software that purports to do music recognition, and if the source is very clear and very simple, it can do a passable job of getting enough of the notes that you can go back in and tweak the obvious and less-obvious mistakes to get a decent midi of the music. I think "Akoff" was the name, but I'm not 100% sure.

But if you feed it an mp3 of any professional modern song, complex classical composition, or a rock song with lots of percussion, reverb, etc... well, you're not getting any help from the software. It'll give you some notes, but also so much gibberish that you'll really end up spending more time trying to figure out what wasn't a note that you might as well just train your ear instead.
posted by hincandenza at 8:08 PM on April 3, 2006

Oh yes- and a third complication is out-of-tune instruments. Not everything is perfectly tuned to 440Hz concert A, so what do you do if the tuning is somewhere in between? Do you round up, or down, to the nearest "real" tone? What about the intentionally distorted tack piano in "bells for her" by tori amos?

Anyway, I found the one I think I played with back in the day, Akoff Music Composer- this is one example, at least, and I did have the name right (it costs money- I think it was freeware when I first played with it a few years ago).

And notice that even in the examples they offer on their own site of .wav to .mid, that the transcriptions aren't even accurate- extra or missing notes, especially in the "piano" sample, are glaringly obvious. While it's a simple source, and gives a .mid (assuming they didn't clean it up a little before posting it as a "sample") that's close enough for you to figure out from, the fact that it can't even get particularly close with that simple, short piece tells you how complex this problem is with anything even slightly more complex.

So, you aren't going to find software that will let you play your favorite hits from the radio and spit out complete music scores for a full band, lickety-split. However, such programs ARE quite useful for single-note playing, or even something like a casual, non-trained musician or singer humming or singing a melody they thought of, or a little riff they worked out on guitar, and having it transcribed fairly faithfully. Even as a relatively trained musician, I'd love to be able to doodle away on my piano, and know that a pretty accurate transcription of my musings was being captured, so when I hit on a cool segment I didn't have to race for some paper and quick notation before it left my mind.
posted by hincandenza at 8:18 PM on April 3, 2006

Yeah, hicandenza is exactly right about the scale of the problem here. What kind of music are you trying to decipher, and what are you doing with it? (We might be able to suggest some other ways to help you figure things out.)
posted by clarahamster at 8:24 PM on April 3, 2006

higher overtones of a C, E, and G to make the minor chord "work"
Er, obviously I mean "C Major chord", duh. But point still stands. :)
posted by hincandenza at 8:31 PM on April 3, 2006

They way I read it, the original question was for just a spectrum analyzer, which is something that shows a visual representation of the frequency content of the audio. Not some kind of automatic transcription tool.

The former should be a lot easier, it's just a matter of finding one that labels the graph in a useful way. (You could even work it out yourself with a table of frequencies of note values...)
posted by xil at 8:49 PM on April 3, 2006

xil- the original question pretty clearly is looking for something that will represent music as notation, since OP has typically had to go find existing midi and print it out using a midi notation displaying software. If you just want a graphical output, you can play it in any media player with the spectroscope option. :)
posted by hincandenza at 8:55 PM on April 3, 2006

there are related tones (C, G, E, and B I think)

You're right, except that it also depends on the instrument. An oboe has a very different set of overtones to a violin, for instance, which is part of what makes the sound of the instrument distinctive.
posted by AmbroseChapel at 9:33 PM on April 3, 2006

Thanks -- I didn't need it to automatically calculate a composition, but just to show me a spectrum analysis calibrated against the musical scale. Like this: Liquid Sky (first 4 secs of Liquid Sky, 1982 SF flick, theme song) One of the problems is I had to consult an obscure source on the Internet to convert Hz to musical notes. It's not simple but can obviously help me pick through quick, obscure melodies.
posted by chef_boyardee at 9:45 PM on April 3, 2006

You're right, except that it also depends on the instrument. An oboe has a very different set of overtones to a violin, for instance, which is part of what makes the sound of the instrument distinctive.

and it can depend on how they're playing the instrument too: a guitar string plucked near the 12th fret will have different harmonics than the same string plucked near the bridge! :)
posted by clarahamster at 9:46 PM on April 3, 2006

I've been using Transcribe! from SeventhString software. The overview I linked does a good job of explaining the limitations of the software, which are for the reasons that hincandenza and others have given here. But I love this program. It's taken a lot of practice to get good at using it but I'm now able to transcribe stuff that I couldn't possibly have before. I recommend it highly as a tool to help you transcribe music yourself but it's a long way from point-and-click transcription.
posted by tiny purple fishes at 10:00 PM on April 3, 2006

Hz to musical notes is actually fairly simple.

Start with A above middle C: 440Hz.

Go up an octave: double the frequency.

Down an octave: halve the frequency.

Up a fifth: multiply frequency by 3/2.

Down a fifth: multiply frequency by 2/3.

Up a semitone: multiply frequency by the twelfth root of 2 (1.059463094). Down a semitone: divide frequency by same thing.

Most spectrum analyzers display (or have the option to display) frequency on a logarithmic scale, which means that the octaves (and all their subintervals) will be a constant number of pixels apart on the screen. Run a few known test melodies (played on something with fairly simple tones, like a flute) through any spectrum analyzer and you'll soon get the picture.
posted by flabdablet at 10:01 PM on April 3, 2006

Forgot to mention: Transcribe! isn't free (~$50) but the trial isn't crippled, it just expires, so it's worth giving it a whirl. I tried it and ended up paying for it.
posted by tiny purple fishes at 10:02 PM on April 3, 2006

WIDI is what you're looking for.
posted by tumult at 10:13 PM on April 3, 2006

Second vote for Transcribe! based on experience. I wound up buying it too. The spectrum analysis takes up to a one-second selection, calculates the spectrum, and plots it horizontally against an on-screen piano keyboard. With a little practice you learn to recognize things: "OK, those symmetrical parabolic shapes are from the guitar, and here we've got two of them an octave apart with the lower one twice as big, so that's the fundamental. These ones are from the other notes that are dying out, and this mess here is the vocal -- notice how her harmonic at the octave is almost as strong as her fundamental, that's related to her very sweet tone and probably some preprocessing." It's fascinating, really.

Plus, it's got great facilities for playback -- knock out a stereo track, invert one side and sum to cancel the middle, slow down, pitch shift -- and for setting markers within the file to help you navigate. Just about anything it does can be assigned to a hotkey, for power-user types. (I marked every beat in the song very easily, then had the program divide them in two, and set hotkeys so I could easily step the selection from eighth note to eighth note, picking up the spectrum analysis in each. Plus some others to change the size of the selection, nudge it back and forth -- when the vocal might have been concealing a guitar note, I found it very helpful to take a smaller window and move it across slides/vibrato/other vocal ornaments to try and get it out of the way of the proposed guitar note. It was tight, I tell you.)

And no, I didn't drink any PepsiBlue while I was using it.
posted by eritain at 10:53 PM on April 3, 2006

Audacity has some spectrum analysis features for this purpose. You can choose "Spectrum" or "Pitch" from the track drop-down menu to see a time-frequency plot of your entire recording. The "Pitch" mode uses an autocorrelation algorithm to highlight the primary frequency while eliminating overtones. The Plot Spectrum command shows more detailed plots for just the selected note or phrase. It displays frequencies in both Hz and musical notes.
posted by mbrubeck at 10:08 AM on April 4, 2006

Probably not what you are looking for, but Praat is a powerful tool for linguistic research that has a variety of pitch analysis settings. I use it for music research. Requires .wav and it will turn your files into mono, but highly adaptable and you can write scripts for it. (It's free and frequently updated, too.)
posted by imposster at 3:06 PM on April 4, 2006

Thirding Transcribe! Well worth the $50 IMHO.
posted by joshuaconner at 8:39 PM on April 5, 2006

« Older Online Pharmacies   |   How does the Christian Bible explain or account... Newer »
This thread is closed to new comments.