How does a digital volume control work?

Anything to do with computer audio, hardware, software etc.
Post Reply
james
Posts: 766
Joined: Thu Feb 25, 2010 11:34 am

How does a digital volume control work?

Post by james »

I have been thinking about digital volume controls. Suppose you have a 16 bit signal. You could truncate it to 15 bits or 14 bits. But that would only give you 16 volume steps until you had silence. So I presume a digital volume works by subtracting a number anywhere from 1 to 2^16) from the basic sample (I am ignoring problems of negative values, you would have to apply to treat them differently by adding instead of subtracting) before the conversion from digital to analogue.

Is this how things work?

James
"Change is Possible" [Parking Meter in Dundrum Shopping Centre]
abraxalito
Posts: 230
Joined: Fri Sep 16, 2016 11:05 pm

Re: How does a digital volume control work?

Post by abraxalito »

Volume controls work by multiplication (by a fractional number, i.e. less than 1) not subtraction. Your initial idea of truncation is a volume control in steps of 6dB - its rather coarse for a volume control but it would work, although rounding together with dither is used rather than truncation to get around a problem called 'quantization distortion'.

Oh I forgot to mention - 6dB reduction is the same as multiplication by 0.5 which is what you get when you shift right a binary number by one place.
james
Posts: 766
Joined: Thu Feb 25, 2010 11:34 am

Re: How does a digital volume control work?

Post by james »

Thanks
"Change is Possible" [Parking Meter in Dundrum Shopping Centre]
Post Reply