You are here

Dither confusion

For everything after the recording stage: hardware/software and how you use it.

Moderator: Moderators

Re: Dither confusion

Postby RichardT » Sun Apr 11, 2021 11:31 pm

MOF wrote:
Yes in Cubase, it’s possible to choose whether the audio engine works at 32 or 64 bit float.

I presume that’s on the PC to match the plugins, all modern Macs run at 64bit and support for 32bit was dropped a while ago.

No, that’s something different - 32 bit addressing. Cubase is a 64 bit app on all platforms in that sense and only supports plugins with 64 bit addressing. The 32 / 64 bit choice in Cubase is about the word length of the data.
RichardT
Frequent Poster
Posts: 954
Joined: Fri Aug 13, 2004 12:00 am
Location: London UK

Re: Dither confusion

Postby merlyn » Mon Apr 12, 2021 12:47 pm

These are a couple of points I have found make dither more understandable :

- Hardware is 24 bit

When you hear playback from your speakers the digital audio has been truncated.

- Dither is part of PCM audio

Dither turns a non-linear system into a linear system with a small amount of noise. Quantisation error is correlated with the signal -- that means it is distortion which means in its raw state PCM is non-linear. Adding dither gets rid of quantisation distortion making the system linear at the price of a small amount of noise.

With 16 bit recording dither was added before the A/D process. With 24 bit that is unnecessary because the noise from analogue electronics serves as dither.

A question I've seen more than once is from people who want to use hardware effects as inserts in their DAW. A track goes out through the D/A, through the hardware, and back in through the A/D. Should that be dithered on the way out? Yes.

For an application like this, where dither might be used more than once on the same audio, it's recommended to use triangular dither.

For the final dither it's recommended to use noise shaped dither.

The question is then -- what do you want a 24 bit file for? If this is to be given to e.g. a mastering engineer then you could export at 64 bit float and you wouldn't need dither.
merlyn
Regular
Posts: 308
Joined: Thu Nov 07, 2019 3:15 am
It ain't what you don't know. It's what you know that ain't so.

Re: Dither confusion

Postby worshiptuned » Mon Apr 12, 2021 8:06 pm

RichardT wrote:That’s the recording bit depth? As soon as you apply gain changes or any processing to that channel, though, the signal is going to be at 32 or 64 bit float, irrespective of the recording bit depth.

yes but then, after this real time processing at 32bit float or 64bit float the file is recorded at the set recording bit depth. Then for the dithering you have to consider the recording bit depth
from Cubase manual
see the paragraph Bit Depth

source:
https://steinberg.help/cubase_pro/v10/e ... log_r.html
worshiptuned
Regular
Posts: 78
Joined: Mon Feb 08, 2021 4:36 pm
my Spotify my YouTube  
 

Re: Dither confusion

Postby worshiptuned » Mon Apr 12, 2021 8:11 pm

CS70 wrote:Guess it may help a little with performance and RAM usage.

Greg Ondo of Steinberg explains at 48:55 that the 64 bit float processing precision is intended for recording at 32bit integer, some Steinberg soundcards have this option, I think also others as Merging Anubis. He says he made a blind test and there is a better audio quality (subjective)

https://www.youtube.com/watch?v=RFXBscdP5nQ
worshiptuned
Regular
Posts: 78
Joined: Mon Feb 08, 2021 4:36 pm
my Spotify my YouTube  
 

Re: Dither confusion

Postby RichardT » Mon Apr 12, 2021 8:39 pm

worshiptuned wrote:
RichardT wrote:That’s the recording bit depth? As soon as you apply gain changes or any processing to that channel, though, the signal is going to be at 32 or 64 bit float, irrespective of the recording bit depth.

yes but then, after this real time processing at 32bit float or 64bit float the file is recorded at the set recording bit depth. Then for the dithering you have to consider the recording bit depth
from Cubase manual
see the paragraph Bit Depth

source:
https://steinberg.help/cubase_pro/v10/e ... log_r.html

Yes, and if you add processing to the recorded track after you’ve recorded it, it will be back at 32 bit or 64 bit float!
RichardT
Frequent Poster
Posts: 954
Joined: Fri Aug 13, 2004 12:00 am
Location: London UK

Re: Dither confusion

Postby worshiptuned » Tue Apr 13, 2021 9:06 am

RichardT wrote:
worshiptuned wrote:
RichardT wrote:That’s the recording bit depth? As soon as you apply gain changes or any processing to that channel, though, the signal is going to be at 32 or 64 bit float, irrespective of the recording bit depth.

yes but then, after this real time processing at 32bit float or 64bit float the file is recorded at the set recording bit depth. Then for the dithering you have to consider the recording bit depth
from Cubase manual
see the paragraph Bit Depth

source:
https://steinberg.help/cubase_pro/v10/e ... log_r.html

Yes, and if you add processing to the recorded track after you’ve recorded it, it will be back at 32 bit or 64 bit float!

Yes thanks, you are right, it's confusing.
This is why they suggest in order to keep the best audio quality and avoid clipping, to set the recording bit depth also to 32 bit float, when recording with effects.
Then in Cubase is the bit depth to consider when dithering, whenever some processing is applied, 32 bit float or 64 bit float, even if there is a different recording bit depth? :think:
The Elf said differently :!: :?:
worshiptuned
Regular
Posts: 78
Joined: Mon Feb 08, 2021 4:36 pm
my Spotify my YouTube  
 

Re: Dither confusion

Postby Hugh Robjohns » Tue Apr 13, 2021 9:54 am

All DAWs process internally at either 32-bit floating point or (more recently) 64-bit floating point.

Any sources that you process internally (even if that's just a volume change) will grow in wordlength to one of those formats, and any tracks that you bounce or re-record internally will normally (and sensibly) be stored at one of those formats too.

However, the physical outputs (and inputs) are normally in a 24 bit fixed point format (or 16 bit for some legacy applications).

And any word-length reduction always requires dithering to prevent quantisation distortion.

The mantissa in a 32-bit float format is 24 bits so, in theory, any internal processing should already involve dithering to maintain the 24 bit mantissa accurately. That being the case, if you get your gain structure right that mantissa can be passed directly to a 24-bit fixed point output without further redithering.

The same is not the case with 64-bit floating point which has a larger mantissa.

If in doubt, redither at 24 bit anyway... at worst you'll raise the digital noise floor by a few dB (but it will still be below the actual noise floor of your D-A converter), and it will guarantee nothing nasty happens during fades.
User avatar
Hugh Robjohns
Moderator
Posts: 31087
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound
In my world, things get less strange when I read the manual... 

Re: Dither confusion

Postby worshiptuned » Tue Apr 13, 2021 1:48 pm

Hugh Robjohns wrote:The mantissa in a 32-bit float format is 24 bits so, in theory, any internal processing should already involve dithering to maintain the 24 bit mantissa accurately. That being the case, if you get your gain structure right that mantissa can be passed directly to a 24-bit fixed point output without further redithering.

The same is not the case with 64-bit floating point which has a larger mantissa.

If in doubt, redither at 24 bit anyway... at worst you'll raise the digital noise floor by a few dB (but it will still be below the actual noise floor of your D-A converter), and it will guarantee nothing nasty happens during fades.

I appreciate! Now is much clearer!!! :thumbup:
worshiptuned
Regular
Posts: 78
Joined: Mon Feb 08, 2021 4:36 pm
my Spotify my YouTube  
 

Re: Dither confusion

Postby CS70 » Tue Apr 13, 2021 3:28 pm

worshiptuned wrote:He says he made a blind test and there is a better audio quality (subjective)

I guess... :)

Using double vs float simply changes the size of the unavoidable approximation errors present in every real-numbers numerical calculation made with a digital computer. Assuming that the mixing engine (as it must) uses numerically stable and good algorithms, even with single precision these errors will be very small. With double precision they will be even smaller... which in turn may make an occasional difference to what gets rounded to integers for D/A conversion, ultimately leading to a difference in sound, especially for minute details. So it may be that someone can perceive a difference. I am pretty sure I wouldn't perceive any. :D
User avatar
CS70
Jedi Poster
Posts: 7799
Joined: Mon Nov 26, 2012 1:00 am
Location: Oslo, Norway
Silver Spoon - Check out our latest video and the FB page

Re: Dither confusion

Postby Hugh Robjohns » Tue Apr 13, 2021 4:08 pm

I remember back when I was lecturing at the Beeb training centre in the mid-90s, when DAWs were just beginning to be 'a thing', there were lots of arguments about sound quality between 32-bit fixed point (as used on a lot of hardware digital mixers) and 32-bit float (with 24 bit mantissa).

We tried to find a way of reliably demonstrating any audible differences... and failed.
User avatar
Hugh Robjohns
Moderator
Posts: 31087
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound
In my world, things get less strange when I read the manual... 

Re: Dither confusion

Postby James Perrett » Tue Apr 13, 2021 5:06 pm

CS70 wrote:
worshiptuned wrote:He says he made a blind test and there is a better audio quality (subjective)

I guess... :)

While I'm usually sceptical about these things, I've seen people who know much more about DSP than I do say that 32 bit floats don't give enough precision for some calculations which is why many audio programs work with 64 bit floats internally.

Even the earlier versions of Protools running on Motorola 56k DSP chips used 48 bit integer calculations AIUI.
User avatar
James Perrett
Moderator
Posts: 10799
Joined: Mon Sep 10, 2001 12:00 am
Location: The wilds of Hampshire
JRP Music - Audio Mastering and Restoration. JRP Music Facebook Page

Re: Dither confusion

Postby Hugh Robjohns » Tue Apr 13, 2021 5:16 pm

It's surely fairly standard now to perform complex calculations (EQ, dynamics etc) at double-precision or even triple-precision, and even summing is typically done with a longer mantissa than 24 bit?
User avatar
Hugh Robjohns
Moderator
Posts: 31087
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound
In my world, things get less strange when I read the manual... 

Re: Dither confusion

Postby CS70 » Tue Apr 13, 2021 6:42 pm

Well, when we use any finite-size representation for real numbers, we're essentially defining a mapping between the infinite, uncountable set of real numbers and a finite and countable set of combinations of say 32 or 64 bits..

When the mapping is made according to floating point representation rules, larger numbers will have less representatives than smaller ones. That is to say, when the numbers get bigger, the representation is less dense, so each sequence maps a larger set of different reals, so everything else being equal approximations due to the representation may become a factor. In theory. :)

Now, I have absolutely no idea how this would affect perception when computations carried on using these numeric representations is ultimately used to drive a speaker...

I could guess that if one drives things a lot over digital 0dBFS in buses (i.e. the calculations begin to involve very large numbers), before returning back down in the main bus, it might lead to some perceptual difference... but if people use a reasonable gain structure, or just occasionally go a little over 0 db FS, all computations will occur within or near the band of maximum representational density, so it won't make any difference - only the stability and the error size of the algorithms will matter (as we expect and experience).

Perhaps some of the people noticing differences love to push their digital levels in the red. :lol:
User avatar
CS70
Jedi Poster
Posts: 7799
Joined: Mon Nov 26, 2012 1:00 am
Location: Oslo, Norway
Silver Spoon - Check out our latest video and the FB page

Re: Dither confusion

Postby CS70 » Tue Apr 13, 2021 7:05 pm

Hugh Robjohns wrote:It's surely fairly standard now to perform complex calculations (EQ, dynamics etc) at double-precision or even triple-precision, and even summing is typically done with a longer mantissa than 24 bit?

It really depends on the application. For example, in lots of graphics, fp numbers far smaller than 32 bits are often used, because the approximations don't matter too much and the tradeoff between that and performance and memory footprint makes it desirable.

Whereas when you're crunching numbers from sensors in a gravity waves detector, you do absolutely use variable size representation and if it takes weeks to get to the end of the computation, so be it! :lol: (a friend of mine worked at the Virgo detector, a fascinating endeavor).
User avatar
CS70
Jedi Poster
Posts: 7799
Joined: Mon Nov 26, 2012 1:00 am
Location: Oslo, Norway
Silver Spoon - Check out our latest video and the FB page

Previous