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!
The x-axis is indeed frequency, but the numbers are quite strange to me. One would expect a scale in powers of 2 (octaves) or of powers of 10 (decades).

The y-axis represents the relative magnitude of the signal at that particular frequency. The 0dB level is what you would get from a sine wave with the maximum amplitude (-1..+1). So your P2 is 1.0.