With a couple of friends I am designing a synthesizer on an altera FPGA (cyclone II, the one on the DE2 board). We almost wrapped it up nicely but there's a problem that bugs us.
The synth can generate four kinds of sound waves: sinusoidal, square, triangular and sawtooth. The user (the player) can change the wave while he's using the synth of course. In our first solution the perceived volume changed greatly between the various waves, square being the loudest and sin being the lowest.
We calculated the normalised power of each kind of wave and added a corrective factor for the amplitude:
$$\sqrt{\frac{2}{3}}\rightarrow \text{sine wave}\\
\sqrt{\frac{1}{3}}\rightarrow \text{square wave}\\
1\rightarrow \text{triangular wave}\\
1\rightarrow \text{sawtooth wave}$$
The problem is that the volumes still don't seem right, the sine wave seems still way lower than the others. We were a bit unsure about the power of the triangular wave, but our calculations should be correct. We then thought that our first assumption was wrong.
Question: is it correct to assume that the perceived volume of a sound wave is proportional to its power intended as the power defined in signal theory books, i.e.:
$$P_x=\frac{1}{T}\int_0^T|x(\alpha)|^2d\alpha$$
of course \$x(t)\$ must be periodic of period T.
If that is true: did we miscalculate something? We are listening to the produced sounds through a guitar amplifier so the band probably is not that wide, but that would lead to a lower square wave and a louder sinusoid if total power is the same.