A Fast Fourier transform comes in four flavors:

1. Forward Real to Complex
2. Forward Complex to Complex
3. Inverse Complex to Complex
4. Inverse Complex to Real

You started with a real array of length N in the time domain and did
flavor 1. That gave you a complex array of length N/2, which occupies
the same number of memory locations as the real array of length N.
There's also a "trick" ... one of the "complex" numbers, usually the
first one in the output array, isn't really a complex number but two
real numbers -- the real part is one of them and the imaginary part is
the other one.

There are lots and lots of web sites that explain the Fast Fourier
Transform. I worked for Floating Point Systems in a past life, and still
see this stuff in my dreams sometimes. :) But, given an "audio project",
an FFT is a pretty low-level tool -- a means to an end. It would help is
we knew what that end was.

Alex Polite wrote:
> Howdy.
>
> I need to do some Fast Fourier Transforms for an audio project I'm
> working on. Problem is I don't know shit about math ;)
>
> Reading a dozen online tutorials on FFT tells me that the FFT of a
> vector of real time domain data of size N should yield a vector of
> frequency domain data of size N/2.
>
> So I try out the different FFT functions in GSL, but the ones that
> accept a vector of real data of size N also return a vector of size N.
>
> What's the deal here?
>

-- 
M. Edward (Ed) Borasky

http://linuxcapacityplanning.com