From: Piotr Majdak <piotr@ma...>  20040923 09:47:39

Hi Monty and Dominic, Monty wrote: > Either this is just a legitimate bug (likely), a very faulty FFT (in > terms of noise behavior; possible but less likely), or the data itself > really does have those pseudoharmonic distortions in it and the > spectral tool isn't lying. > > Have you checked the waveform in a trusted spectral analyzer? I'll > throw mine in SVN now if you don't have any others. Since I've generated the wave form in audacity we either have a problem in Generate/Tone or in View/Plot Spectrum. What I did to check this problem: In Audacity I've generated and saved a sine tone:  Generate/Tone, Frequency: 1000Hz, Amplitude: 0.5  File/Export As WAV... (In Preferences: 16bit PCM) First, let's see the amplitude spectrum in audacity. We must reload the audio track to be sure, that we're goning compare the same audio data in each program:  File/New  File/Open Analysis:  Select a range > 16384 samples  View/Plot Spectrum  Settings: Spectrum, 16384, Rect. window, Lin. Freq  Result: http://iem.at/~majdak/temp/audacity16384.jpg  We see distortions :( Assuming the distortions lie in the audio file, I've used CoolEdit to crosscheck the amplitude spectrum of this tone:  File/Open  Select a sample in the middle of the track  Result: http://iem.at/~majdak/temp/cool16384.jpg  No distortions at all. Ok, we don't trust CoolEdit, do we? Let's try some really proofed method: I used MATLAB (http://www.mathworks.com) to calculate the FFT and then the amplitude spectrum. These basic functions of MATLAB were proofed many times by many scientists worldwide, so we can trust them:  Load WAVFile as a vector: a=wavread('sine.wav');  Plot the amplitude spectrum in dB of the first 16384 samples: plot(20*log10(abs(fft(a(1:16384)))));  Result: http://iem.at/~majdak/temp/matlab16384.png  No distortions at all, so we have a problem with audacity... @Monty, please tell me, if I have done a mistake in my analysis procedure. @Dominic: I think about FFTPACK (http://www.netlib.org/fftpack/) and not LAPACK. There is no FT in LAPACK (http://www.netlib.org/lapack/) :( Piotr Majdak 