Hi tsubasa,

Actually 129 is the correct number of coefficients for the FFTs. The documentation was incorrect, sorry about that. It’s been updated.

The FFTs are calculated using a 256 sample window, which gives a transform that has 256 components and is symmetric (i.e. mirrored) around an additional component at 0Hz. In other words, you have 128 components, followed by one for 0Hz, and then the mirror image of the same components. This means you need only consider half of them (because the other half are the same, only reflected) plus the one for 0Hz at the centre, which gives you 129 in total.

To get the frequency resolution for the bins, you can divide the sampling rate by the FFT length, so in the case of Muse: 220/256 ~ 0.86Hz/bin

So, the zeroth index of the FFT array represents 0Hz, the next index represents 0-0.86Hz, and so on up to 128*0.86 = 110Hz, which is the maximum frequency that our FFT with its 220Hz sampling rate can detect.

Hopefully that helps. Here are a couple of potentially useful links:

Obligatory wikipedia: http://en.wikipedia.org/wiki/Fast_Fourier_transform

Quite a good stack exchange post on why FFTs are mirrored: http://dsp.stackexchange.com/questions/4825/why-is-the-fft-mirrored