From: Dominic Mazzoni <dominic@au...>  20040921 19:45:49

Piotr, I will take a closer look at some point, but my suspicion is the fact that Audacity is using singleprecision floating point FFT calculations, with accumulations in doubles in just a few key places. I did a few brief experiments and discovered that the difference between singleprecision and doubleprecision FFT is minimal up to 2048; for 4096 there are occasional deviations but overall it's stable, and beyond that there are significant deviations. Is that consistent with your observations? Perhaps we could add a doubleprecision FFT routine and switch to using that for FFT sizes of 8192 and higher? Then we could allow much larger FFTs, too, if you're willing to wait.  Dominic On Sep 20, 2004, at 9:08 AM, Piotr Majdak wrote: > Hi *, > > There is a bug calculating amplitude spectrum function in the menu > View/Plot Spectrum (FFT): Analysing a simple harmonic I see some > spikes in the amplitude spectrum, where they shouldn't be. They get > bigger extending the resolution of the FFT or using more complicated > analysis windows. > > To reproduce this bug: >  Create a track with a single sine tone: Generate/Tone, Frequency: > 1000, OK >  Select some seconds of the track >  Go to View/Plot Spectrum >  Change settings to: > Spectrum  16384 > Rectangular window  Linear Freq. > > You should see this: http://iem.at/~majdak/temp/spect16384.jpg > > If you change the analysis window to hanning, the situation gets even > worse (in terms of SNR). Look at that: > http://iem.at/~majdak/temp/spect16384hanning.jpg > Decreasing the number of bins to 2048, you still can see the > distortions in spectrum: > http://iem.at/~majdak/temp/spect2048hanning.jpg > > Can anyone confirm this? > > It looks like sloppy cast conversions in the windowing/FFT algorithms > (do you _really_ use float numbers everywhere?) > > > > Piotr Majdak > > PS: OS: Win2000 SP5, Audacity 1.2.2 > > >  > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Audacitydevel mailing list > Audacitydevel@... > https://lists.sourceforge.net/lists/listinfo/audacitydevel 