A Audio, hi-fi and car audio  forum. Audio Banter

Go Back   Home » Audio Banter forum » UK Audio Newsgroups » uk.rec.audio (General Audio and Hi-Fi)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

uk.rec.audio (General Audio and Hi-Fi) (uk.rec.audio) Discussion and exchange of hi-fi audio equipment.

Digital volume control question....



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old May 20th 06, 06:39 AM posted to uk.rec.audio
John Phillips
external usenet poster
 
Posts: 294
Default Digital volume control question....

On 2006-05-19, Serge Auckland wrote:
Ian Iveson wrote:

The DSP solution would appear to be preferable. However, presumably there are
rounding errors. That is, if I divide every word by a constant, each result must
be rounded to the nearest step, and this rounding error is not linear wrt the
audio signal. I assume there is a name for this kind of error? How significant
is it?


The DSP solutions I'm familiar with operate either floating point or 32
or 48 bit internal which means that when the output is finally reduced
to 16 or 24 bit the errors from the DSP calculations are minimised. I
don't know of a specific name for the errors resulting from DSP operation.


I guess a digital volume control can just be a single fixed-point
multiply.

If you have (for example) a 16-bit coefficient and multiply by the 16-bit
audio value you get a 32-bit result.

Growth in significant bits is typical of DSP actions such as add and
multiply. If you just truncate the result back to 16 bits you do indeed
find that the quantization error you introduce is correlated with the
signal. It is significant and sounds bad at low levels.

In a good DSP (volume control) the remedy is to keep all significant
bits throughout the entire operation (or at least keep enough) and add
dither noise before you finally truncate back to the desired word size.
The random dither de-correlates the quantization error from the signal.

I assume that's what good DSP volume controls do.

--
John Phillips
  #2 (permalink)  
Old May 20th 06, 08:28 AM posted to uk.rec.audio
Jim Lesurf
external usenet poster
 
Posts: 3,051
Default Digital volume control question....

In article , John Phillips
wrote:
On 2006-05-19, Serge Auckland wrote:
Ian Iveson wrote:

The DSP solution would appear to be preferable. However, presumably
there are rounding errors. That is, if I divide every word by a
constant, each result must be rounded to the nearest step, and this
rounding error is not linear wrt the audio signal. I assume there is
a name for this kind of error? How significant is it?


The DSP solutions I'm familiar with operate either floating point or
32 or 48 bit internal which means that when the output is finally
reduced to 16 or 24 bit the errors from the DSP calculations are
minimised. I don't know of a specific name for the errors resulting
from DSP operation.


I have tended to see it called by various terms from "quantisation error"
and "truncation error" to "we''ll ignore this..." :-)

I guess a digital volume control can just be a single fixed-point
multiply.


If you have (for example) a 16-bit coefficient and multiply by the
16-bit audio value you get a 32-bit result.


Yes. In principle you can do that. Indeed, I think that many consumer chips
simply use such 'extended' int values for processing in places like the
digital filtering.

Growth in significant bits is typical of DSP actions such as add and
multiply. If you just truncate the result back to 16 bits you do indeed
find that the quantization error you introduce is correlated with the
signal. It is significant and sounds bad at low levels.


In a good DSP (volume control) the remedy is to keep all significant
bits throughout the entire operation (or at least keep enough) and add
dither noise before you finally truncate back to the desired word size.
The random dither de-correlates the quantization error from the signal.


I assume that's what good DSP volume controls do.


Dither will certainly help avoid such problems. However you can also employ
noise shaping. This essentially 'remembers' the quantisation errors and
redistibutes the information. The result is to provide output signal
pattern details which can be below the LSB, so helping to evade the
problem. Again, I think that many consumer chips do this were appropriate
as it is easy to build into the silicon.

The snag is that the above is all a matter of the details of
implimentation. Whereas a decent analog attenuator simply uses the
properties of the physical materials to do all this for you. No need for
the makers to work out a noise-shaping anf dithering process and ensure
sufficient precision, etc. :-)

Slainte,

Jim

--
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Audio Misc http://www.st-and.demon.co.uk/AudioMisc/index.html
Armstrong Audio http://www.st-and.demon.co.uk/Audio/armstrong.html
Barbirolli Soc. http://www.st-and.demon.co.uk/JBSoc/JBSoc.html
  #3 (permalink)  
Old May 21st 06, 03:51 PM posted to uk.rec.audio
John Phillips
external usenet poster
 
Posts: 294
Default Digital volume control question....

On 2006-05-20, Jim Lesurf wrote:
In article , John Phillips
wrote:
...
I assume that's what good DSP volume controls do.

...
The snag is that the above is all a matter of the details of
implimentation. Whereas a decent analog attenuator simply uses the
properties of the physical materials to do all this for you. No need for
the makers to work out a noise-shaping anf dithering process and ensure
sufficient precision, etc. :-)


True, but once you have worked it out once it's very easy to replicate
and does not have the degradation mechanisms.

--
John Phillips
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.SEO by vBSEO 3.0.0
Copyright ©2004-2025 Audio Banter.
The comments are property of their posters.