Page 1 of 2

Dither and bits and this and that

Posted: Thu Oct 16, 2008 3:39 am
by krizrox
Don't know why I'm asking about all this at this point in time but a few strange things recently prompted me to investigate and understand better.

I have an A16 Ultra. Sonar. Scope. The whole shebang. My quesion is in regards to bit depth and sampling rates through the signal chain. Analog audio going through the A16, it's being converted to 24 bit right? And that can't be changed right? The only thing I can change on the A16 is the sampling rate, right?

Now in Sonar (or any DAW I guess), there is an option to set dither during playback and record and also, exporting or bouncing. I'm curious why it matters if dither is applied during playback, or even recording? I can understand why it's important for a bounce or export but what advantage would there be just for playback or for initial tracking (recording)?

Re: Dither and bits and this and that

Posted: Thu Oct 16, 2008 4:02 am
by astroman
well, they have to invent these gimmicks now and then to have another sales argument...
I'm under the strong impression that any dither at all is pretty irrelevant considering how much character your signal may loose in the analog stage before the converter - with the majority of recording gear.
Admittedly, I caught a heavy analog virus infection recently when A/B-ing some vintage stuff to 'modern' opamp based input stages...
me starting to rely on listening (only) and dispose of all spec sheet bs :D

cheers, Tom

Re: Dither and bits and this and that

Posted: Thu Oct 16, 2008 5:00 am
by krizrox
Well, I'm not trying to start a debate about whether dither is necessary or it's just a marketing ploy, but maybe I got confused about what happens to my audio signal as it travels from the input connector on the A16 through the Z-Link cable to my Scope board, through the ASIO driver to Sonar (or Samplitude, if I'm feeling like I need to spice my life up a bit). What I end up with on my hard drive is a 24 bit 48Khz WAV file (which is how I have Sonar set up to record normally). When I play back that file (or files), the audio comes back through Sonar's engine, into Scope through the ASIO driver and out of the analog outputs on the back of the card as an analog signal to my power amp. Until I decide to down convert to 16 bit, dither has no bearing right? Or does the fact that Sonar (with it's 32 bit float audio engine) need to dither? I mean the option is there to have dither on and running all the time. But I don't see what difference that makes except that the type of dither eats up CPU resources (the newer Pow-r dither is very CPU intensive).

Or does the fact that I'm going from 32 bit float back to a 24 bit soundcard mean I need dithering enabled?

Re: Dither and bits and this and that

Posted: Thu Oct 16, 2008 5:21 am
by pollux
Dithering is an alternative to truncation when lowering bitrates (ok, you knew that :D)

If Sonar has a 32 bit sound engine, and it has to send audio data through the ASIO channels which are 24 bit, there has to be some dithering done somewhere.. Either sonar sends a dithered signal, or the sound card will dither what comes in.
My guess is that the option "dither during playback" allows sonar to send to the audio HW a signal that is already dithered by an algo that sonar handles (and that you can control), therefore what you listen on your monitors is as close as possible to what sonar will render.

Re: Dither and bits and this and that

Posted: Thu Oct 16, 2008 5:35 am
by krizrox
That makes sense. So what, potentially, is the problem with having dither disabled during playback in this scneario? Is there possibly some distortion or noise added due to the downconvert?

Re: Dither and bits and this and that

Posted: Thu Oct 16, 2008 5:41 am
by pollux
Dithering always adds noise.. I presume the "risk" of not using "dither during playback" is that the noise added during playback might not match the noise added when rendering, or put in the other sense, it has the advantage of allowing you to control the noise added during playback in a fashion that will most closely match the noise added during render.
This way the playback is true to the render, and you can "audition" different dithering algos to choose the one that sounds best to you.

I guess this feature is important when, for example, working with a classical recording, in a well treated room, and with a good set of monitors..

In my personal case, it doesn't matter that much.. loud distorted guitars already add enough noise on their own :lol: and with my monitors I'd probably won't notice the difference... :D

Re: Dither and bits and this and that

Posted: Thu Oct 16, 2008 9:27 am
by garyb
dither is noise meant to help alleviate artifacts caused by downsampling. if dither sounds better, great. if dither doesn't sound better and you don't dither, great. work at 44.1k for audio and 48k for video and dither will never be an issue.

going from 24bit to 16bit doesn't use or need dither. the bitcrushing's only disadvantage is the loss of 8 bits of headroom. work in 24bit, burn the cd at 16bit(which must happen).

Re: Dither and bits and this and that

Posted: Fri Oct 17, 2008 12:19 pm
by chriskorff
Hi Gary,

Sorry dude, you're wrong. Dither has NOTHING to do with downsampling whatsoever.

Dither has EVERYTHING to do with reducing bit depth.

Going from 24-bit to 16-bit, it is most advisable to dither. Not dithering in that context doesn't just 'lose headroom', it causes truncation. You don't lose 8 bits from the top, you lose them from the bottom, which means that all the low-level information contained in the lower 8 bits of the 24-bit version will be lost - and worse than that, will suddenly jump to absolute silence. Dither allows, for example, the endings of sounds (such as reverb) to fade gently into the noise floor of whatever bit-depth you're reducing the audio to. Without it, you get quantisation distortion.

Cheers,

Chris

Re: Dither and bits and this and that

Posted: Fri Oct 17, 2008 1:37 pm
by Tau
I read somewhere that PowerCore DSP cards always work at 24 bit, and that it was reccomended, when inserting a PoCO effect on a channel that:

a: the signal was dithered to 24 bits before going to that insert (beacuse internal processing is 32 or 64 bit);
b: the signal was kept under 0db at all times prior to that insert (due to the different headroom btw different bit depths);

Maybe that's what Sonar devs are addressing with this feature?



cheers,

T

Re: Dither and bits and this and that

Posted: Fri Oct 17, 2008 1:52 pm
by chriskorff
Basically, dither is random noise (we percieve it much like white noise) added to the signal, at the least significant bit - ie. the lowest level that a particular bit depth can record (-96dBFS in the case of 16 bits, or -144dBFS if 24 bits). If you're reducing the bit depth from 24-bit to 16-bit, then you basically add noise to the 24-bit audio. The reason that this is a good thing, is because when you truncate (ie. throw away the lowest 8 bits of dynamic range), instead of everything below -96dBFS suddenly becoming silent, it 'toggles' between being silent and being a signal at the least significant bit. Because this happens randomly, we perceive it as white noise.

Take, for example, a 24-bit file that has a signal at -96.5 dBFS. If you truncate that to 16 bits without dithering, you just get silence. But if you add dither, then the average level of the signal will be... -96.5dBFS! And so you've retained information below the *theoretical* dynamic range of the format (16-bit, in this case).

Dig it?

Cheers!

Chris

Re: Dither and bits and this and that

Posted: Fri Oct 17, 2008 2:09 pm
by chriskorff
Apologies - I just re-read that, and while it's right in principle, the numbers are a bit wrong there...

Dither is actually added *below* the least significant (lowest) bit - not sure of the exact figure, but it would be below -96dBFS if you're applying dither in order to truncate to 16 bits.

Its function is to add to the lowest signal level conveyed in the higher bit-depth signal prior to truncation, such that on average, a signal just below the least significant bit of the new (lower) bit depth is still captured.

Cheers,

Chris

Re: Dither and bits and this and that

Posted: Fri Oct 17, 2008 4:08 pm
by garyb
thanks, those last few posts were correct. :oops:

i really appreciate the correction. i don't like giving bad info.

it's been so long since i used dither, i just don't like the sound, myself, at least where the algorythms available to me are concerned. i prefer the truncated files. it would depend on what type of material was involved, as to what would sound best. dynamic sounds like a solo piano or clasical guitar or one of the ensembles in kabuki might benefit most. pop music doesn't require dither in my experience.

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 1:12 am
by chriskorff
Quite true - particularly something with distorted guitars throughout! As long as everything was recorded at a reasonable level to begin with, the quantisation distortion should be negligible (for delicate acoustic recording and classical works though, I'd say it's pretty necessary for things like reverb tails to fade out smoothly).

Cheers,

Chris

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 2:39 am
by astroman
agreed - yet the precondition of high-class recording gear and environment applies to (at best) 2% of the target group of Cakewalk, Yamaha, Apple, Magix...
Still the feature is advertized as a quality breakthrough for everyone ;)

Probably even 'extensions' of parameters exist (in one ore the other implementation) to make it affect more bits than 'scientifically' required - in the sense of fx processing.
Afaik the dither noise isn't applied randomly at all, but choosing the 'type' (aka 'algorithm') allows to noticably colour the sound - impossible if it was about a lsb...

cheers, Tom

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 7:20 am
by chriskorff
Shaped dither isn't an algorithm - it's noise, which by its nature is random.

Dither shaping is basically a weighting curve (usually similar to the inverse of the Fletcher-Musnon curve), which applies more noise to areas of the frequency spectrum to which we are less sensitive.

It's not marketing bollocks at all, just good practice!

Cheers,

Chris

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 8:14 am
by astroman
well, let's chop off 8 bits from #24 to #16
according to your description above that process will have an influence on sound levels below the -90db Range
while you may be able to notice it under optimal listening conditions with an isolated signal, I really don't subscribe to the idea it will be possible in track context - not at all ;)
that only refers to the method as a way of preserving signal integrity (or precision), as usually mentioned in context with truncation.
while it's mathematically correct, it lacks all real-world relevance (imho)

I do not refer to any other appication of 'dithering' which most likely exist, as the item is an integral part of digital signal processing - but unfortunately that type of math is beyond my abilities ;)

if people are told that 'dithering' is required to preserve signal integrity when chopping from 24 to 16 bits, then this is rubbish for 99,5% of all music produced.
my ears may be defunct, or I might suffer from a severe misunderstanding of the topic, tho... :D
(no offence btw)

cheers, Tom

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 9:21 am
by Shroomz~>
krizrox wrote:Now in Sonar (or any DAW I guess), there is an option to set dither during playback and record and also, exporting or bouncing. I'm curious why it matters if dither is applied during playback, or even recording? I can understand why it's important for a bounce or export but what advantage would there be just for playback or for initial tracking (recording)?
Dithering should only be applied as a final stage in mastering. Take care also not to apply dithering to your tracks then decide to X-fade them for a compilation since that can apparently introduce artifacts. In such a case you would be better to leave the tracks alone & apply dithering after creating the compilation of audio material with X-fades.

Check out this Sonar notes article by Chris Anderton

Mark

(staying out of the 'to dither or not to dither debate') :D

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 10:56 am
by astroman
Mark, it's not about to dither or not to dither ...
it's only about the 'loose-quality-by-chopping-argument' that repeatingly shows up in discussions about the topic
other than that I don't mind at all how anyone processes his or her tracks :D

cheers, Tom

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 11:53 am
by Shroomz~>
Well, it is indeed about to dither or not to dither in the context here Tom, because the question was mostly about whether to use Sonar's real time dither or not. :wink:

Mark

Re: Dither and bits and this and that

Posted: Sat Oct 18, 2008 12:24 pm
by garyb
i wouldn't use anything that Sonar hypes.... :lol:


:P :roll: