# Audio fingerprinting - 2D (time - frequency) filter / Energy differences

I am trying to implement the algorithm described in this paper. However, I am having trouble understanding the last part where I need to find the energy differences of bands.

In another paper, this process is described as shown below. Also, I am not sure I understand that either. What exactly I should do in this part of the algorithm ? Any hints or tips would be really appreciated.

If you split the signal in 33 Frequency bands for every frame you will have a vector band containing all subbands, all right, and now to compute the Energy Difference from each Band you just need to do:

$$E(x)=\sum_{k=1}^{32}band(k) - \sum_{k=1}^{32}band(k+1)$$

For the first frame compute the equation above, and for all others frames block, You can do something like:

$$E2(x)=\sum_{k=1}^{32}band(k) - \sum_{k=1}^{32}band(k+1)$$

$$F(n,m)= 1 if(E2 -E)>0$$ $$F(n,m)= 0 if(E2 -E)<=0$$

$$E(x) = E2(x)$$

This will generate a 32 bits array (0's and 1's) in $F$, Your end result should be a matrix of dimension 32x256, and it is your fingerprint !

EDIT

Answering your other question, if you are following the article exactly as described, the frame rate used in the paper is 5000hz, then each sub-fingerprints 32x1 is equivalent at 0,0116ms of audio its give you an analyze of 58 Frames = 0,0116 * 5000, it does not contain enough information to make a fingerprint, you'll need something comes close to 3 seconds and 256 comes very close look, 0,0116 * 256 = 2,9696, Ok you need do one fingerprint for ever 256 sub-fingerprints and it will create a lot of 32x256 matrix for your audio :-)

• Thanks for your answer it makes perfect sense now! However, one thing that confuses me is that my fingerprint length is not equal to 256. I am not sure what I am doing wrong but this seems alright to me since as the length of the audio changes, the number of frames will increase. As a result, when I do this calculation I will get varying lengths of fingerprints. How do I make sure that the length is always 256 ? In my case I get something like 32x2000 – Cemre Dec 3 '13 at 18:12
• Any ideas my friend ? Do you think clipping audio sample may be the way to go ? – Cemre Dec 3 '13 at 20:28
• yeah I did this Algorithm some time ago, see my edit ! – ederwander Dec 3 '13 at 20:36