1

I'm trying to simply Display a WAV File in it's Frequency Domain using this FFT. I try accomplish this via Short-Time-Fourier-Transform with a set Window Size etc.

The output is dealt with by drawing with pixels on a JFrame (the higher the Amplitude the brighter the dot) which is really basic i know.

The signal i try to plot is a Chirp from 1000Hz to 10000Hz in 10s with a 44100Hz Samplerate. The output should look like the following:

Chirp-Signal

But instead my output looks like this:

Chirp-Signal with artifacts

which is kind of right.. but as you can see theres is some sort of noise pattern. It doesn't seem to be random. One thing is tried was simply reducing the gain from the pixels but that solves it poorly:

Chirp-Signal with reduced gain

I used a Hann-Filter from here.

Maybe the way I try to do it is faulty. So please let me briefly explain: I have a WAV File - i remove the header to just get the data part. A 10s long signal with 44100Hz should give me 441000 Samples which it does. I read the Array with Chunks by the size of 2048 Samples and a windowstep which is 256 Samples. Every step will run though the Hann-Filter and then the FFT which is added to a pixel array which then gets drawn.

Is there something obvious I am missing which can be seen through the Screenshots? Is the FFT algorithm I used not "good enough"?

Please tell me if you further information or if my explanation isn't good enough. Thank you in advance

xKaydy
  • 13
  • 2

1 Answers1

0

Your contrast is too high, or the color map range in too wide. Try rescaling and raising the lowest FFT magnitudes that map to black, and reducing the gain on the FFT output so that less of it maps to white. That will get rid of the numerical and quantization noise (rounding, etc.), and bring some of the blown out to white levels back into greyscale range in your plot.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153