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
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'd love to change this. this is the reason, why i had to add a function to inverse the imaginary part when using the fftw library. the thing is, it would change the behaviour and people might rely on the old behaviour. i second you and would prefer to change the behaviour ... at least in devel, but having two different behaviours would be even worse than having a wrong behaviour of both branches...
this is definitely something to be discussed in the irc developer meeting that will hopefully take place, soon ...
cheers ... tim
On Thu, 3 Feb 2005, Tim Blechmann wrote:
this is definitely something to be discussed in the irc developer meeting that will hopefully take place, soon ...
I hope so too. As I said, I met Miller last week and told him about the possibility. But nothing concrete came out of that, so I don't know if he has time to assist or not.
For the rest of us it would be great to have a new date I think.
Guenter
cheers ... tim
-- mailto:TimBlechmann@gmx.de ICQ: 96771783 http://www.mokabar.tk
latest mp3: http://jokebux.klingt.org/gro.tgnilk/mp3s/2317/index.html
After one look at this planet any visitor from outer space would say "I want to see the manager." William S. Burroughs
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev