# How to change volume of a PCM 16 bit signed audio?

I know I can multiply samples, then clip but perceived volume is non-linear for humans.

• Why was this question downvoted? It is clearly relevant for this board. – Jim Clay Jul 30 '12 at 16:12
• The question is not very clearly formulated, not even grammatically. Besides that, what kind of non-linearity do you want to compensate for: amplitude only, or frequency-dependent amplitude? – heltonbiker Jul 30 '12 at 16:18
• I read this mini tutorial: ypass.net/blog/2010/01/… And this guy used tan function to make volume not linear but he said thi is not perfect way. So I thought at that DSP forum You will understand what I mean even its not gramaticaly posted. – apocalypse Jul 30 '12 at 18:13
• I think that question is very concise and very clear. When you work with audio you instantly understand what @zgnilec means. This is a psychoaccoustics issue : the perception of audio volume in humans is non-linear. So the question is : "how you do you make an audio gain change that is perceived as linear?" – sebpiq Dec 23 '15 at 11:06
• A range of -48dB to +6dB makes 54dB in amplitude. – be999 Oct 4 '17 at 18:20

In the software world - at least for music production - it is most common to have volume/gain knobs calibrated in dB. For example, if you have a 100 pixels long volume slider graduated from -48dB to +6dB, the gain applied to the signal would be $10^{\frac{-48 + 54 \frac{x}{100}}{20}}$.