On Sunday, 15 September 2013 at 15:15:28 UTC, Kadir Erdem Demir wrote:
I am using fft function from std.numeric

Complex!double[] resultfft = fft(timeDomainAmplitudeVal);

The parameter timeDomainAmplitudeVal is audio amplitude data. Sample rate 44100 hz and there is 131072(2^16) samples

I am seeing that resultfft has the same size as timeDomainAmplitudeVal(131072) which does not fits my project(also makes no sense) . I need to be able to divide FFT to N equally spaced frequencies. And I need this N to be defined by me .

Is there anyway to implement this with std.numeric.fft or can you have any advices for fft library?

Ps: I will be glad to hear if some DSP libraries exist also

When you perform a classic DFT the size of the resulting vector is the same since it is reversible (square matrix see http://en.wikipedia.org/wiki/DFT_matrix). If you want to get a larger vector, it is useless see Nyquist–Shannon sampling theorem. Otherwise I don't know any library which provide this kind of fft (with the possibility to made the matrix rectangular). You got 2 option :

- taking the good samples in the produced vector. (complexity O(nlog n))
- shrinking your vector first (O(n/k log (n/k))

Reply via email to