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: Mihail Zenkov
Subject: Re: [fluid-dev] Purpose of dither?
Date: Tue, 8 May 2007 17:21:15 +0300

My English bad, but i try answer.

> Just a few comments.
> 
> First of all I do not understand why dithering is needed at all.

All professional quality audio apps use dithering (from free software:
jack, audacity, brutefir, etc).

> 1.Do you mean that 16-bit accuracy is not enough and a human ear can
> hear
> the truncation/round-off artefacts? I have serious doubts that this is
> true.

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.

> 2.The wiki web page states that this is done when audio CDs are written
> which, as far as I know is 16 bit resolution. If the answer on the
> first question above is yes, than I am sorry to hear how stupid sound
> engineers are. The job of dithering should be on the cd playing
> hardware, not on cdwriting one... but fluid can not fix that...

All professional audio apps save audio data in float. All effects done
with double accuracy. Only after mastering, float convert to 16bit with
dithering (in mostly case with noise shaping).

http://audio.rightmark.org/lukin/dither/dither.htm
 
> 3. I am not familiar with the fluid code, but I hope if the answer on
> the first question is "yes" this dithering should
> be done as the last stage of data processing before the data is pushed
> into the audio card.

Yes, right.

> Also, note if digital output is used, no dithering
> is needed. It is needed only if the data goes directly to DAC!! Even in
> this latter case, see my  last comment.

Dithering should by done always, when we truncate.

> 4. I do not know how imporant it is and my feeling that dithering
> should not be applied at all, but the code above does not implement
> TPDF dithering. As I said, I do not think it is needed at all, but if
> someone
> wants to implement TPDF than two calls to uniform random generator are
> needed per entery in the table. Only one call is made by the code
> above.
> This leads to dithering which is different from  TPDF.

Not sure what you mean ... See source code in other apps, audacity for
example.

> And finaly my opnion. Unless some one can show that the answer to the
> first question is yes, dithering should be removed as it damages the
> signal. If indeed, the answer to the #1 is yes, it is the job of the
> audio player to add dither. In other words, it should be as close to
> the
> speaker as possible. Since any audio producing equipment has analog
> components at the end of its chain (we can only hear analog, not
> digital), unavoidable analog noise in that part will do the dithering
> for you. Any additional dithering is not needed. Wires in the walls do
> the dithering...

You don't understand why and when dithering uses.
When we truncate without dithering we get dirty sound. Dither use
always when we truncate. In fluidsynth case dithering uses only when we
convert float to 16bits.




reply via email to

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