Some time ago I was given a link to a nice youtube video. Around 00:04 I recognized “Stairway to heaven” intro. Friends told me I was wrong, they just sound alike. Challenge accepted! Let’s analyze it.
First of all, let’s download the video from youtube. Visit e.g. http://keepvid.com and enter video URL: http://www.youtube.com/watch?v=_erQi563tTU. Download the result (I chose MP4 480x360).
Extract the sound with
ffmpeg -t 10 -i video.flv suspected.wav
First 10 secs is enough.
Then load the file into Audacity and begin the sound processing.
Because we are interested in a very specific sounds, let’s filter out frequencies which are above the scale of a guitar. We’ll use “Low-pass filter” with rolloff of 48dB/octave, filter quality of 0.7 and cutoff frequency of 700Hz. This will allow us to better hear where the guitar plays.
Now, the hard work. What I want to do is to find beginning of the notes, and for every suspected fragment analyze its’ spectrum. Looking at the spectrum peeks, I’ll assume the biggest ones (in guitar tune frequencies) are the tones we are looking for.
The good practical method to find the beginning of a tone is to listen to a fragment in slow motion. Also you may try to capture the correct moment by selecting a fragment and lowering its end until you hear no tone change at the end of this fragment. E.g. select a fragment from 3.4s to 3.9s and play it. You will hear two tones. Then, lower the end of the fragment until you hear only the first note. For me it was around 3.7s (a hint: text input for selection is very recommended). This is the beginning of the second tone.
Proceed with all the following sounds. Take into account, that previously played tones can co-sound, so analyze changes in spectrum for adjacent fragments.
My choices for times of the beginnings of tones, found peek frequencies and corresponding notes are:
3.44 293 D4 3.70 348 F4 3.95 441 A4 4.24 587 D5 4.48 662+277 E5 + C#4 4.74 350 F4 5.02 443 A4 5.36 659 E5 5.65 701 F5 6.05 440 A4 6.35 396 G4 6.60 357 F4
Then the guitar player goes to another theme. But this certainly IS “Stairway to heaven”! You can play it like this:
E|----------------10---|-12-------------12---|-13------------------| B|-----------10--------|-----------10--------|------10-------------| G|------10-------------|------10-------------|-----------10--------| D|-12------------------|-11------------------|----------------10---| A|---------------------|---------------------|---------------------| E|---------------------|---------------------|---------------------|
while the common version you will find on the internet goes like:
E|----------5--7--------7-8--------8--2--------2-0---------0- B|-------5--------5----------5-----------3---------1-----1--- G|----5--------------5----------5-----------2---------2------ D|-7-----------6----------5-----------4---------------------- A|----------------------------------------------------------- E|-----------------------------------------------------------
Beside the transposition and a small variance in 2nd tact (2 notes reversed), they are the same.
Now, it would be very nice, if the computer could do the whole analysis. E.g. analyze the changes in spectrum in time and draw conclusions, when new sounds appear and what tones they are. Do you know such a tool, or should I start writing my own?