SONAR - Dithering

Page: < 12 Showing page 2 of 2
Author
slartabartfast
Max Output Level: -22.5 dBFS
  • Total Posts : 5289
  • Joined: 2005/10/30 01:38:34
  • Status: offline
Re:SONAR - Dithering 2009/09/21 00:00:39 (permalink)
Dither is used to make quantization "noise" (a nonrandom artifact) "random" and thus less likely to be a nuisance. Quantization noise is introduced as an error in the least significant bit of the digital representation. So when using a 32-bit (let alone 64-bit) internal representation for something that will eventually go down to 16 bits, the chance of quantization noise rising to a level that will be audible by doing internal calculations like mixing, applying effects, or bouncing/rendering  to a 24 or 32 bit track are small.  Applying dither for these intermediate math operations is probably a waste, and introduces its own distortion. When you eventually go to 16-bit, there is some concern that an error in the LSB will be audible as you near digital 0. With loud/compressed pop music it is probably lost in the mix, but as Bit says may reach audibility on fades in quiet passages. Hence the advice to add dither (random noise) only at the final bit reduction.

Some in-depth discussion of dither here, and here.
post edited by slartabartfast - 2009/09/21 00:38:54
#31
Jose7822
Max Output Level: 0 dBFS
  • Total Posts : 10031
  • Joined: 2005/11/07 18:59:54
  • Location: United States
  • Status: offline
Re:SONAR - Dithering 2009/09/21 00:21:46 (permalink)
Like I said, if you keep rendering set to 32 bits, you don't have to worry about files getting dithered.  Everything is kept in floating point format (where no dithering is applied by Sonar).

The only thing being dithered is the output when sound comes out of your audio interface.
#32
Chris S
Max Output Level: -83 dBFS
  • Total Posts : 396
  • Joined: 2007/06/13 21:40:13
  • Status: offline
Re:SONAR - Dithering 2009/09/21 00:33:42 (permalink)
This is an excellent topic and should be pinned for all new to Sonar.
#33
droddey
Max Output Level: -24 dBFS
  • Total Posts : 5147
  • Joined: 2007/02/09 03:44:49
  • Location: Mountain View, CA
  • Status: offline
Re:SONAR - Dithering 2009/09/21 04:02:54 (permalink)
I don't think it's worth the 1/4 increase in size to store the files in 32 bit float. The conversion back to 24 bit to store any rendered audio (which would only happen when bouncing or from soft synths) is truncating at such ridiculously low levels that it's not worth worrying about. All of that stuff down there will get completely thrown away in the final product if you deliver 16 bits. So it's really only an issue when you reduce down to 16 bits, IMO.

It's not going to hurt anything to keep the dither on, but I don't think it accomplishes anytihng that anyone is going to hear in that 32/64 bit down to 24 bit world, and it's just extra overhead when there's already plenty of overhead to be had without looking for more.
The I/O overhead is also already very high when the track counts start moving up, so making the files that much longer just to avoid something that you couldn't possibly identify as being present or not really doesn't make an sense to me.
 

Dean Roddey
Chairman/CTO, Charmed Quark Systems
www.charmedquark.com
#34
JSkeen
Max Output Level: -78 dBFS
  • Total Posts : 612
  • Joined: 2007/02/01 17:13:49
  • Location: USA
  • Status: offline
Re:SONAR - Dithering 2009/09/21 05:07:57 (permalink)
it may be a myth but i remember reading that floating point calculations were easier than fixed point ones for cpus...honestly we may be splitting hairs...i record at 24 render at 32 and use power 3 to take it down to 16bit. I have never had any complaints about the power3 dither....
#35
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re:SONAR - Dithering 2009/09/21 21:47:40 (permalink)
32bit float doesn't offer any more resolution than 24bit fixed. Both store 24 bits of data. 32fp just allows those 24 bits to be scaled up to huge numbers or down to tiny fractions (by using 8 bits for exponential scaling). You get much, much more headroom/dynamic range, but still only 24 bits of meaningful data (at a time). You don't add dither when going from 32fp to 24bit because you aren't actually reducing the number of bits used to store data.

If you aren't ever (!!!) above 0db, and aren't peaking way way below 0db, there probably isn't much advantage to using 32fp when bouncing synths, but aside from disk usage, it certainly won't hurt, won't clip, and will sound as good as 24bit fixed.

In the mix engine, 32fp allows plenty of headroom (so you won't ever clip internally), but low level detail may be lost under certain circumstances (due to only 24 bits of resolution). 64bit float provides 53 bits of data (resolution), plus 11 bits for exponential scaling. This allows for both near infinite headroom and no loss of low level detail.

drewfx
#36
Jose7822
Max Output Level: 0 dBFS
  • Total Posts : 10031
  • Joined: 2005/11/07 18:59:54
  • Location: United States
  • Status: offline
Re:SONAR - Dithering 2009/09/21 22:32:25 (permalink)
Hey Drew,

It has always been my understanding that Sonar applies dithering when going from 64/32 bit float to 24/16 bits.  But what you say makes sense.  What would be the easiest way to prove wether Sonar is applying dithering (or not) from 32 bits to 24 bits?

By the way, now that I think about it, it doesn't really matter what bit depth is being used while bouncing/freezing since those are usually temporary solutions (unless you use them as permanent solutions).  If you bounce permanently then choosing the correct bit depth is important of course.  However, the most important setting would be the rendering/exporting bit depth.  After all, this is the resolution your music ends up with.

Intel Q9400 2.66 GHz
8 GB of RAM @ 800 Mhz
ATI Radeon HD 3650
Windows 7 Professional (SP1) x64
Cubase 6.03 x64
Sonar PE 8.5.3 x64
RME FireFace 400
Frontier Design Alpha Track
Studio Logic VMK-188 Plus

http://www.youtube.com/user/SonarHD
#37
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re:SONAR - Dithering 2009/09/21 23:35:29 (permalink)
Jose7822


Hey Drew,

It has always been my understanding that Sonar applies dithering when going from 64/32 bit float to 24/16 bits.  But what you say makes sense.  What would be the easiest way to prove wether Sonar is applying dithering (or not) from 32 bits to 24 bits?

Well, aside from the bakers telling us, maybe you could start with a wav file with all 0's (digital silence) and check it with the BitMeter. Then only after dithering would you see some bits light up, right? I can't see why you'd dither going from 32fp to 24bit, but from 64fp to 24 (or 64/32fp to 16bit), dithering would make more sense.

EDIT: Now that I think about it, digital silence might not work, but I suppose a carefully constructed waveform with nothing in the lowest bits, but something in the highest bits should work (i.e. a perfect digital square wave). END EDIT

By the way, now that I think about it, it doesn't really matter what bit depth is being used while bouncing/freezing since those are usually temporary solutions (unless you use them as permanent solutions).  

Well, as long as you make sure you aren't going to clip before you bounce. And of course, if you reduce level to make sure you don't clip at 24bits, you're also going to truncate the lowest bits. But the lowest few bits (at 24bit) are going to be inaudible under normal circumstances anyway. It might depend on if you're going to do major processing on the bounced tracks later (in a way which would magnify that lost very low level detail). 

If you bounce permanently then choosing the correct bit depth is important of course.  However, the most important setting would be the rendering/exporting bit depth.  After all, this is the resolution your music ends up with.

Agreed.

drewfx

post edited by drewfx1 - 2009/09/21 23:44:20
#38
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re:SONAR - Dithering 2009/09/22 00:24:32 (permalink)
I'm having a bad night. The more I think about it, it does make sense to dither going from 32fp to 24bit, because you will truncate bits if you reduce level and scale downward (negative exponent in floating point).

The highest level when going from 32fp will be 0db. Anything in 32fp that's more than 24 bits below 0db (< ~ -144db) will get truncated when you go to 24bit. If you dither, you can preserve a little of that.

And if digital silence, or a high level perfect square wave don't reveal dither on the BitMeter, a carefully constucted, very low level square wave (or DC offset) at an even bit boundry, should. If truncation is happening, the level should be equal to the level of the truncated bits (i.e. the truncated bits all equal 1). Then, after truncation, the lowest remaining bit should light occaisonally only if dither is applied.

drewfx

drewfx
#39
rosabelle
Max Output Level: -85 dBFS
  • Total Posts : 261
  • Joined: 2007/09/24 17:00:26
  • Status: offline
Re:SONAR - Dithering 2009/09/22 10:07:24 (permalink)
32bit float doesn't offer any more resolution than 24bit fixed. Both store 24 bits of data.

Except that 32 float gives you 25 bits worth of resolution.  You've left out the implicit bit.  There's 1 sign bit, 23 explicit bits and 1 implicit bit in the mantissa. that gives you 25 bits worth of resolution.

To the OP: As far as dithering in Sonar, just leave triangular on. Sonar is programmed to apply it when necessary and leave it off when not necessary. I think someone already said that, and it's the proper advice.
#40
MatsonMusicBox
Max Output Level: -73 dBFS
  • Total Posts : 879
  • Joined: 2008/07/09 10:56:31
  • Location: Hanover, PA
  • Status: offline
Re:SONAR - Dithering 2009/09/22 10:47:08 (permalink)
So what about dithering applied at "record time" - coming from analog (infinite bits, if you will) to 24 bits? That is where you get your initial quantization error. Does SONAR dither that coming in?


#41
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re:SONAR - Dithering 2009/09/22 11:16:02 (permalink)
rosabelle



32bit float doesn't offer any more resolution than 24bit fixed. Both store 24 bits of data.

Except that 32 float gives you 25 bits worth of resolution.  You've left out the implicit bit.  There's 1 sign bit, 23 explicit bits and 1 implicit bit in the mantissa. that gives you 25 bits worth of resolution.

Actually I counted the implicit bit and left out the sign bit, because I'm not sure if the sign bit is used. I thought I read that 24bit (or 16) was represented using all positive numbers (i.e. an unsigned int) and the ADC/DAC had to correct for that since the analog signal is AC (+/-). I really don't know if this correction (back to signed) is done when you convert to floating point, so I left out the sign bit (because if it's always positive, you don't get any more resolution).

Of course you are correct if the sign bit is used, you get an extra bit.

drewfx



#42
drewfx1
Max Output Level: -9.5 dBFS
  • Total Posts : 6585
  • Joined: 2008/08/04 16:19:11
  • Status: offline
Re:SONAR - Dithering 2009/09/22 11:26:11 (permalink)
MatsonMusicBox


So what about dithering applied at "record time" - coming from analog (infinite bits, if you will) to 24 bits? That is where you get your initial quantization error. Does SONAR dither that coming in?


The ADC has already introduced the quantization error before it gets to Sonar. And technically, analog doesn't really have infinite bits, and even at 24 bits, the lowest bits are impacted by noise.

drewfx

#43
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
  • Total Posts : 26036
  • Joined: 2006/09/17 11:23:23
  • Location: Everett, WA USA
  • Status: offline
Re:SONAR - Dithering 2009/09/22 11:37:48 (permalink)
I can't believe this topic is still alive and apparently on its way to 3 pages!

Let's keep a little perspective here. 24 bits is such ridiculous overkill in the first place that the term "least significant bit" takes on new meaning. The only reason we need 24/32/64 bits is so we can happily mangle data without worrying about the rounding errors. You cannot actually hear the LSB under most circumstances.

When you record 24-bit data, that LSB is literally meaningless. It could (and for all practical purposes does) toggle randomly and you wouldn't know the difference. We're talking about the representation of voltages in the microvolt range, on a scale comparable to thermal noise levels in a resistor. The bottom four bits are effectively dither.

An analogy: if 24-bit data were a stack of typing paper, it would be a stack 2 miles high, with the LSB being a single sheet. And we're devoting a forum thread to how to calculate when to add that single sheet.

Arguing about whether to dither when going from 32-bit float to 24 bit integer is like arguing how many angels can dance on the head of a pin.

Dither when you truncate down to 16 bits in preparation for putting your masterpiece on a CD. Use Pow-r 3 if you have it, MBIT+ if you use Ozone, or triangular if that's all you've got.


All else is in doubt, so this is the truth I cling to. 

My Stuff
#44
PC1211
Max Output Level: -87 dBFS
  • Total Posts : 167
  • Joined: 2006/08/29 03:56:20
  • Status: offline
Re:SONAR - Dithering 2009/09/22 14:55:55 (permalink)
bitflipper


I can't believe this topic is still alive and apparently on its way to 3 pages!

Let's keep a little perspective here. 24 bits is such ridiculous overkill in the first place that the term "least significant bit" takes on new meaning. The only reason we need 24/32/64 bits is so we can happily mangle data without worrying about the rounding errors. You cannot actually hear the LSB under most circumstances.

When you record 24-bit data, that LSB is literally meaningless. It could (and for all practical purposes does) toggle randomly and you wouldn't know the difference. We're talking about the representation of voltages in the microvolt range, on a scale comparable to thermal noise levels in a resistor. The bottom four bits are effectively dither.

An analogy: if 24-bit data were a stack of typing paper, it would be a stack 2 miles high, with the LSB being a single sheet. And we're devoting a forum thread to how to calculate when to add that single sheet.

Arguing about whether to dither when going from 32-bit float to 24 bit integer is like arguing how many angels can dance on the head of a pin.

Dither when you truncate down to 16 bits in preparation for putting your masterpiece on a CD. Use Pow-r 3 if you have it, MBIT+ if you use Ozone, or triangular if that's all you've got.


Finally some sanity.  Thanks, Bit, for such an easy-to-understand explanation that should be included in the Sonar manual.
#45
shakey.oberon
Max Output Level: -86 dBFS
  • Total Posts : 210
  • Joined: 2009/07/06 16:06:10
  • Location: Cheshire, uk
  • Status: offline
Re:SONAR - Dithering 2009/09/22 17:13:21 (permalink)
Actually, in most situations you would be correct.  However, if you work by creating sounds, bouncing them, processing them more, bouncing again, and so on, then dither noise begins to become somewhat apparent in the silence between sounds.  I work in this way, as do a large proportion of the drum&bass community.  I have been giving this some thought recently though, and am leaning towards the conclusion that powr3 dither noise is actually quite pleasing to the ear, and is in a way the modern equivalent of tape hiss.  Therefore, I am not going to worry about it.  After all, noise makes electronic music sound more organic and natural anyway.
#46
Page: < 12 Showing page 2 of 2
Jump to:
© 2025 APG vNext Commercial Version 5.1