• SONAR
  • Questions RE default 32 bit rendering bit depth (p.5)
2018/07/20 15:23:48
The Maillard Reaction

2018/07/20 16:53:37
drewfx1
Noise is just another signal mixed in with your signal at whetever level it's at - consider setting up mics and recording a complete band: The mics pick up vocals, guitar, keys, bass, drums and noise.
 
 
 
 
2018/07/20 17:48:29
The Maillard Reaction

2018/07/20 18:17:49
The Maillard Reaction

2018/07/20 19:07:12
drewfx1
Original Pranksta
I juggled a few numbers in my head this morning, I made several casual assumptions, any of which may need correction:
 
 
If 16bit files can store 96dB of dynamic range
 
If a human is hard pressed to identify a 1dB change in amplitude.
--see for yourself: 
---- http://harmoniccycle.com/hc/sounds/wav/tones-1dB/4000Hz.wav
---- http://harmoniccycle.com/hc/sounds/wav/tones-1dB/12000Hz.wav
 
If there are 32,767 integers in a 16bit audio file.
 
And there are 32,767integers / 96dB = 341 integers / decibel in a logarithmic system.
 
In other words the *granularity* of a 16bit file is something like 1/341 of a decibel.
 



It doesn't work quite that way. Decibels are logarithmic expressions of ratio, so you have to remember that and treat them accordingly. And there are 65,536 possible values in 2^16 (the sign bit still counts towards the number of possible values). 
 
 
Decibels as used in audio equate +20dB to a ratio of 10x (and -20dB is .1x). The formulas to convert between ratio and dB and back are:
 
dB = 20 * log10(ratio)
ratio = 10^(dB's/20)
 
From this, if you do the math for a ratio of 2 (or .5), you'll get the well known ~6dB per bit resolution figure (because each bit doubles the number of possible values and 2x = +6.0206dB).
 
Note here that +40dB is NOT a ratio of 20x (i.e. 2 * 10x); it's 100x (i.e. 10x * 10x).  And thus +60dB=1,000x, +80dB=10,000x and +100dB=100,000x. You might note here that 96dB (i.e. 6*16) isn't far below 100dB and 65,536 (i.e. 2^16) isn't far below 100,000. The ratio of the largest signal to the smallest signal = 65,536:1 = 96.3296 dB = (6.0206 * 16)
 
 
Anyway, what all of this means is that, using your example, the difference between 32767 and 32766 is indeed a tiny fraction of a dB whereas the difference between 2 and 1 is 6.0206 dB and you have to be careful not to confuse sample values - which have a given ratio to other sample values - with dB's - which are an expression of that ratio.
 
It's tricky, and you're on the right track in your thinking, but you will see that it's often useful and easier to understand if you do certain calculations using the ratios instead of dB's - even if only to check your work. If it's not expressed in dB's you probably need to be thinking in terms of ratios when you do your calculations and then convert that to dB's.
2018/07/20 21:54:51
gswitz
So cool. Thanks 😎
2018/07/20 22:09:28
The Maillard Reaction

2018/07/20 22:29:18
gswitz
original pranksta,

The original recording may not benefit from float as it is recorded or if you convert it directly, but when you add reverb it could.

All the precision of the float will be used all the time. So when the signal is strong, the numbers have to represent the full signal. As the band stops and you have a reverb tail, all of the float is used for that reverb. There are no leading zeros. The most significant bit is presumed to be a 1 which is why floats often can't be zero without rounding. Making this assumption gives 1 more bit of resolution for every number.

So float is a little weird for audio to describe. Points near zero are vastly more precise than points near 1 in terms of decimal places represented.

Because of this, with 64 bit floats, you can probably reduce the level of every track to 1/2 and mix them add the gain back and actually lose none of the original precision.

Reducing the input gain on a bus loses nothing that will be exported in a final 24 bit wave if your levels are at all reasonable.
2018/07/21 00:01:53
The Maillard Reaction

2018/07/21 02:46:37
drewfx1
Original Pranksta
The exercise demonstrated to me why it is difficult to find an accepted specification for the threshold of recognition regarding changes in sound levels. (I had made a very generalized statement when I mentioned 1dB in a previous post) Disregarding the variance of sensitivity across the frequency spectrum, it seems fair to say that a 6dB change at low amplitude levels is almost impossible to recognize while a 6dB change at high amplitudes will seem obvious.

 
In general, the absolute limit for perception of volume changes is somewhere between .1 and .3 dB. I don't remember the details, but this is for a reasonably loud listening level and we are less sensitive to changes at lower listening levels.
 
 

In other words the 6dB change between 00001 and 00002 is, in my opinion, impossible to hear, so any subtlety lost due to lack of precision must also be impossible to hear.

 
But first, can you even hear the 00002 at all?
 
Isn't what we really want to talk about here first is if it's possible to hear something at -90dB (or whatever)? The first question we can ask is, "Where is 0dBFS, in terms of dB SPL?". If we know where 0dBFS is, then we just subtract 90 from that and compare that to the noise floor in the listening environment and/or the threshold of hearing. IOW, if you're playing back your 16 bit audio loud enough so that the absolute peaks are at, say, 110dB SPL (i.e. loud), then -90 dBFS = 20 dB SPL and so on. I suspect a lot of people might be surprised how loud their 16 quantization error plus dither is played back at compared to the level of noise in their room. And the point is playback level matters.
 
In terms of precision, if you do, let's say, 100 billion calculations in sequence on the same samples first with 32 bit floats and then 64 bit doubles, I'll be happy to put some money against you on that one.   If you do 20 calculations, then no.
 
So that matters, and sometimes double precision is actually necessary. The problem is one has to know:
 
1. Where do the errors start accumulating from?
2. How do they accumulate?
3. How many calculations we are doing?
4. What level we have to keep them below?
 
The last one people can argue about a little (within reason), but I would submit that the first three are often either knowable or measurable (perhaps with a little ingenuity) for a given task. So do we need to speculate?
 
 
Another interesting tidbit to play with:
 
Let's say we have 2 similar noise sources, but not identical copies of the same noise. First let's say that they're both white noise of the exact same level. We might know that if they're the same level when we add them together then the peak level will go up by 6dB and the RMS level (the one we care about from a human perspective) by about +3dB. (If one tries it and gets +6dB for both peak and RMS, it means you either copied the noise or have a worthless noise generator.)
 
But what if one of the noise sources is -16dB down compared to the louder one? How much does the RMS level go up by then when we add them together?  
 
© 2025 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account