# Problem reading and rendering Spectrum

I'm now processing PCM codes extracted from .wav file and want render the spectrum myself. First I try to read a spectrum on my foobar2000 player as below.

My problem with this spectrum is: what do x-axis and y-axis represent? IIRC, the x-axis represents different frequency(or angular speed) and the scale should be whole-number times of fundamental, i.e. 50. However, when I divide next by its preceding, e.g. $94\div 69$, the outcome is roughly always 1.37. As to the y-axis, why the scale is negative? What is the calibrated value, i.e. $P_2$ in $10\log_{10}{\frac{P_1}{P_2}}$.

If I want to render the amplitude spectrum with PCM code, should some normalization be first taken(I know the original 8-bit PCM code ranges from -128 to 127, even normalized range is -1.0 to 1.0. It seems I can't use these values directly to represent amplitude of the signals)?

Thanks and Best Regards!

• Thanks. But what if $P_1$ is 0.0? How to evaluate the $\log$? By the way, how could I determine the fundamental frequency after fourier transformation? IIRC, I will get a sequence of angular frequency after DFT. Mar 14, 2012 at 17:12
• Suddenly realize that fundamental frequency of signals is different from those of DFT. Then what does the frequency $\frac{k}{N}$(correct me if wrong) used in Fourier Transform represent physically? Thanks in advance! Mar 15, 2012 at 5:16