hi all,
i warm up an old thread (jan. 2002, from marius schebella)
the objects rfft~ and rifft~ are dropping the Nyquist bin, and the imaginary part of rfft~ is inverted, but it corresponds to rifft~. for music it is ok, for scientific use we should fix this bug.
i put the Nyquist-bin at the N/2+1. element of the real array. (1. element is DC, 2. to N/2 are the frequencies between of the real part; 1. element is 0, 2. to N/2 are the other freq., N/2+1 is 0 of the imaginary part, N is the blocksize). so we have now N/2+1 relevant complex frequency bins.
the other solution would be: put the Nyquist bin to the place of the unused 1. element of the imaginary array. i think this is not the best idea because if you compute the power spectrum of noise~, you would have both energies on the 1. bin, DC plus Nyquist.
the file d_fft.c is attached, it was written on a windows-computer, the changes are marked with /* tm 01.2005 */
cheers, thomas musil