calculating MFCC - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

calculating MFCC

3rice3rice Posts: 1Member
Hi. I'm not sure if this should go here or the algorithm forum, so apologies if it's in the wrong forum. I'm trying to find the MFCC of my mp3 files. I'm using Fmod (although I'd rather use Bass but I'm not sure how to get the frequency of the whole song, in non-realtime). I get the frequency and now I'm following wikipedia's article on MFCC.
Here's my psuedocode for it:
1) Take the Fourier transform of (a windowed excerpt of) a signal.
Code:
I use getSpectrum with the FMOD_DSP_FFT_WINDOW_TRIANGLE parameter

2)Map the powers of the spectrum obtained above onto the mel scale, using triangular overlapping windows.

I go through the spectrum array and use this equation on each value:
Code:
mel = 1127.01048log e (1+f/700)


Take the logs of the powers at each of the mel frequencies.
I then go through the new mel-array and take the log of each :
Code:
mLog[i] = (Math.log(melArray[i]))


Take the discrete cosine transform of the list of mel log powers, as if it were a signal. (Then find amplitude of DCT result)
I'm not sure what I do here. How do I calculate the DCT?

Am I on the right track?
Thanks


Sign In or Register to comment.