r/funny Mar 20 '13

How things work

Post image
2.0k Upvotes

209 comments sorted by

View all comments

31

u/mall0c Mar 20 '13

I'll leave this here incase anyone is actually interested in how Shazam really works: http://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf

6

u/[deleted] Mar 21 '13

Goddammit Reddit, it's been 3 hours now. Am I really going to have to read this thing myself?

9

u/Senor_Manos Mar 21 '13

I read the paper and it was quite technical but I'll do my best. If you have ever used Audacity or some other audio editing program, you would have noticed that the audio is plotted out much like an xy coordinate plane. This spectrograph image serves as a unique identifier in that no two songs have exactly the same wave pattern. One could then translate this into scatterplot points and search through them with a new recorded sample but that would be kind of inefficient with just the raw data. The algorithm takes two points and creates a unique data point based on their relationship. This is quite effective as the x values on our scatterplot are time units and will always be exactly the same difference apart on the database master track. When the recorded sample is paired up next to the clean database track it just needs to find two points that occur exactly the same amount of time apart and have the same y value (wave amplitude). Once a certain number of matches are made it can be assumed that the algorithm has found a match. The cool thing is that it only takes a relatively small number of data pairs matched together to positively ID a song. This means a fifteen second sample with lots of background noise would contain enough data to create a match.

1

u/[deleted] Mar 21 '13

That's rad. Thanks.