xvjeko:
PWM
frequency - pitch
altitude - loudness
The height something is at does not affect the loudness unless it is far away.
However if you meant amplitude the the amplitude of a PWM signal is always the same.
However DrOb has it right, I don't think you can do what you want.