fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Purpose of dither?


From: Z F
Subject: Re: [fluid-dev] Purpose of dither?
Date: Wed, 9 May 2007 06:12:10 -0700 (PDT)

--- Mihail Zenkov <address@hidden> wrote:

> 
> > > Yes, I hear.
> > > 1. 16bit accuracy give 96 dB resolution. Human limit 120dB.
> > > 2. For mostly purpose 96 dB enough. But when we truncate audio to
> 16
> > > bit, we get new harmonics (distortion) with -60 dB level.
> > > 3. When i play on midi keyboard, i set gain 0.1-0.2 to prevent
> > > clipping. It narrows dynamic range. Without dithering i got only
> > > 40-46
> > > dB dynamic range when play one note.
> > 
> > The points 1 and 2 are interesting and improtant. This tells me
> that
> > the
> > 16 bit sampling was used as a trade-off and is not good enough for
> > high quality audio. I was under the impression that audio CDs were
> > adequate. Apparently not, thanks for this clarification.
> > 
> > Your point 3, however, indicates a problem somewhere else, which
> can
> > not and should not be solved by dithering. My feeling is that this
> > problem
> > should be solved by a non-linear aplification process.
> 
> With dithering i don't hear any distortion, it enough for me. I also
> try sound card with 24 bits (108 dB dynamic range)  - it slightly
> better then dithering.

Yes, this confirms my statement. This problem should not be solved
by dithering, but rather by dynamic range adjustments. This is not
easy to do, but what is relatively easy to do is to introduce
exponential gain function. I do not know the audio terminology here,
but
in image processing, I think it is called gamma-correction.

The idea is that there should be a mapping between the sound level
computed by the sythesizer and the actual audio output level. This
fucntion, roughly should have a shape of 

out_volume =( 1- exp(-in_volume))

in_volume is the signal amplitude computed by the sythesizer and
out_volume is what should be pushed to the audio card. Now, this is
simply the rought shape can be adjusted to anything one wants. I think
that this is how your problem needs to be fixed, not dithering. This
way
you will use the dynamic range of the audio card DAC more efficiently.
The fluid synthesizer may have this already. If it does, this is the
place to fix your problem. If not, that this module has to be added.

> 
> Truncation with dithering not produce new harmonics. Just try do
> experiments in fresh audacity (old version have broken dithering).
> 
[snip]
> 
> If we do float-int-float conversion without dithering, we get
> distortion.
> If we do it with dithering noise level slightly grows, without
> distortion.
> 


Well, unfotutanely, as far as I know, it is a common misconception in
engineering. Truncation with or without dithering produces new
harmoncis
just in a different way. I call them distortions. So no matter what you
do,
as soon as you truncate, there will be distortion. You can only argue
that with dithering we do not percieve the audio signal better than
without dithering. This has to do with the structure of our ear/brain
and human audioty processing. That is all. That is why dithering helps
(or what engineers say needed or works). But if we agree on that,
dithering should be done only once at the end before going to the
speakers otherwise, as you say, noise grows all the time without any
reason. This point about our brain and audio perception is often
misunderstood by engineers!!!


ZF

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]