[LAU] Dithering - Was: master levels

Gene Heskett gheskett at wdtv.com
Tue Feb 3 06:46:43 UTC 2015

On Monday 02 February 2015 23:44:50 Ralf Mardorf did opine
And Gene did reply:
> On Mon, 02 Feb 2015 22:25:49 +0100, Atte wrote:
> >I had a fairly unpleasant experience last weekend. A band (indie/folk)
> >in which I play and for whom I also did/does some recordings + mixes
> >for, were played on national danish radio on the national chart. The
> >unpleasant part was that our song sounded really wimpy compared to the
> >other tracks.
> I don't think that it has to do with the loudness war. How well do you
> chose Linux EQs? Most of them are completely unusable. IMO
> Fons' parametric EQ is ok.
> If I record an ALESIS D4 cymbal with Linux, the result is week. If I
> record it with a consumer DAT recorder, there's no audible difference
> to the original sound. Even a 4-track cassette player with Dolby C
> still sounds better, than the Linux recording (tested with TerraTec and
> RME cards).

First, that cymbal (and the snare drums and banjos all have harmonics that 
are well into the ultrasonic range.  Our ears, generally are their own 
brickwall filter.  I say generally because ears do vary, and when I walk 
into a store that has an ultrasonic motion detector for a burglar alarm, I 
don't waste a lot of time, not because I can hear it, but because my ears 
are feeling it and hurting, and I'm now 80 yo, with a right ear thats not 
even up to telephone bandwidth anymore!

Part of the specs for a DAT recorder, in order for it to use the 
trademarked DAT logo, will cause it have a brickwall filter to prevent 
digital aliasing, which will otherwise be translated down into the audible 
by the digitizer.  Even at my age I can hear the aliasing and it is not 
conducive to enjoying the crash of the cymbal.

There are 2 ways to stop this, first being the brickwall filter, some sort 
of Chebychev (or better) 5 to 7 stages deep thats pretty flat to 19 or 20 
kilohertz, but is 30 db down by 30 kilohertz.  That is quite a stack of 
parts, taking up board real estate and both cost lots of sheckles.  So you 
will not find that, at least to a usable degree in any sub $300 audio 
card.  Facts of life.

The other way is to raise the digitization rate, commonly 44 or 48 
kilohertz IIRC, to something in the 200-250 kilohertz range so that there 
is essentially no upper sideband as it moved upward in frequency as the 
sample range is raised, by a factor of 2x the sample frequency increase.

Digitally this high speed sample is then down sampled in a shift register 
by mathematically averaging the last 4 or 8 samples by just adding them 
and throwing away the LSB for every 2 samples added, usually by a right 
shift that shifts the LSB's out to nowhere, leaving a net gain of one, and 
that digital sample is then taken at a more sane rate, maybe 96 kilohertz, 
and fed to the media for storage.

Aliasing is a cast iron bitch, because once it has managed to get into 
your data stream, there is no known way to remove it
> Assumed it should be missing dithering, then what dithering to use?
> Linux dithering is a PITA, it adds annoying audible noise, no stand
> alone consumer gear, no proprietary DAW and especially no professional
> gear comes with such audible dithering noise.
> Is there usable dithering available for Linux?

Dithering, to be useful  must be applied to the reference, or to the 
signal itself, in an amount that is not more than about half the value of 
the least significant bit.  In a 24 bit system, that amount of dither is 
less than the thermal noise.  If that 24 bit output is fed to a 32 bit 
word, which 3/4ths of the word do you use? Often there will be a random 
noise fed into the lSByte, and the 3 upper bytes are the signal.

But this solution is not used in any product I know of.  But there are 
many I have no experience with too. 

Now lets see what Fons A. has to say, we often disagree. ;-)

Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS

More information about the Linux-audio-user mailing list