2

What kind of API's or frameworks are used to assign a note of music a value? Like how would an application like Shazzam take in a note from the microphone and know what to do with it? To me it's amazing a phones microphone and some nifty logic can compete with a tuner from a music shop!

Edit 1.

Interesting papers on the subject. Shazzam the music recognition app's software rests on the principle of Acoustic fingerprinting and a Fast Fourier Transform

Here's an example some similar code in practice

paglynn
  • 69
  • 7

2 Answers2

4

Acoustic fingerprinting algorithms do not try to analyze the music. That is, they do not convert audio from the microphone to notes. They are extracting some arbitrary features from the audio, that do not make much sense from musical theory perspective, but they are still useful for identifying music.

Normally, you start with a spectrogram. A spectrogram is analysis of frequencies as they change over time. That's common for almost all acoustic fingerprinting algorithms. The differ in what they do with the spectrogram and what kind of features do they extract from it. Some algorithms are looking for peaks in the spectrogram, some chunk it into regular intervals. The end goal is usually to generate a bunch of hashes that you can index and quickly search.

The original Shazam algorithm by Avery Li-Chun Wang is publicly available. You can find the details here.

Lukáš Lalinský
  • 40,587
  • 6
  • 104
  • 126
0

short and simple explanation.

step 1. analysis all song file's original frequency by using FFT

step 2. make proper tree data structure with prior FFT analysis result, so we can search song by frequency.

step 3. using mic to record song from external environment. and also analyze it with FFT. Search matching frequency from previous frequency tree.

Sung Min Lee
  • 154
  • 7