• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

What are the best settings for digital sources and DACS with volume controls?

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,403
If the signal chain and/or audio format involve floating point, the maximum level can exceed 0dBFS. That's why people should use the internal software volume control and/or ReplayGain to avoid clipping.

Please read every link in the post below.

https://www.audiosciencereview.com/...lity-in-windows-using-wasapi.5272/post-116878

I think it's a bit more complicated then this, see Intersample Peaks and the possibility of overloading the DAC. Some DAC's eg Benchmark DAC3 & RME ADI-2 FS are able to handle Intersample Peaks between +2-3dB.

Archimago has a lengthy discussion here - - > http://archimago.blogspot.com/2018/09/musings-measurements-look-at-dacs.html

Edit: @bennetng beat me to it ... ;-)

Ok, I think we actually all agree, I was just not precise enough in my language.

When I said the maximum level would never exceed 0dBfs, I didn't intend to suggest that intersample clipping could never occur when the level is set at 0dBfs (that depends on whether the DAC is designed to handle this properly).

What I was intending to get across was that using digital volume control will not exacerbate (and in fact will tend to prevent) intersample clipping.
 

andymok

Addicted to Fun and Learning
Joined
Sep 14, 2018
Messages
562
Likes
553
Location
Hong Kong
Competent DAW uses True Peak (TP) meters over-sampled, to detect inter-sample amplitude. Good master will always make sure its content does not exceed, say -1 dBTP
(EBU R 128)

If it ever goes beyond -0 dBTP, it's the Master/content that has been trashed already and there is nothing you can do to save that bit back.
 

LF78

Member
Joined
Oct 4, 2018
Messages
89
Likes
41
Location
Italy
reducing too much volume in digital domain can harm dynamic range. Let's say the DAC reviews in this site usually show something like 110 to 120dB dynamic range, if you reduce a 110dB device by 30dB, it will become 80dB

Thinking again about this concept, I'm not sure I understood. Let's make a couple of examples assuming we have a DAC with 110 dB of dynamic range:
  • Your content has a DR of 20 dB (not bad). You attenuate the volume digitally by 30 dB, so output is between -50 dB and -30 dB. No loss.
  • Your content has a DR of 90 dB (WOW!). You attenuate the volume digitally by 30 dB, so output is between -110 dB and -30 dB. There's a loss of 10 dB of dynamic range. HOWEVER, isn't it the same with an analog attenuator? You cannot hear those extra quiet passages anyway, if volume level is bearable at loudest passages.
Am I correct?
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
Competent DAW uses True Peak (TP) meters over-sampled, to detect inter-sample amplitude. Good master will always make sure its content does not exceed, say -1 dBTP
(EBU R 128)

If it ever goes beyond -0 dBTP, it's the Master/content that has been trashed already and there is nothing you can do to save that bit back.
The name "True Peak" is a misnomer. It is just a generalized algorithm to predict the clipping point of various equipment. Different true peak meters actually show different readings. This website tested a lot of true peak meters, all meters show different values. If there is a "truth", then there is only one truth, not multiple "truths".
https://www.saintpid.se/en/isp-true-peak-limiters-test/

EBU R128 is a recommendation based on BS.1770. BS.1770 is the actual document to describe the "recommended" prediction algorithm.
https://www.itu.int/rec/R-REC-BS.1770-4-201510-I/en
 
Last edited:

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
Thinking again about this concept, I'm not sure I understood. Let's make a couple of examples assuming we have a DAC with 110 dB of dynamic range:
  • Your content has a DR of 20 dB (not bad). You attenuate the volume digitally by 30 dB, so output is between -50 dB and -30 dB. No loss.
  • Your content has a DR of 90 dB (WOW!). You attenuate the volume digitally by 30 dB, so output is between -110 dB and -30 dB. There's a loss of 10 dB of dynamic range. HOWEVER, isn't it the same with an analog attenuator? You cannot hear those extra quiet passages anyway, if volume level is bearable at loudest passages.
Am I correct?
If the meaning of "DR" is something like the DR meter reading like this:
https://www.maat.digital/droffline/

No, it is not the DR I am talking about. I meant the AES17 dynamic range, a standard for measuring equipment, not audio content.
https://www.audiosciencereview.com/...out-manufacturer-measurements.3628/post-86830

There are other content loudness measurement methods, look at this example:
As you can see there are a lot of numbers, they are based on short/long term average, within a range, like those stock market graphs. The idea is a single "DR" number cannot reflect short term large variations, and pretty unreliable.

However you are correct about the concept, a digital volume control can decrease dynamic range, but it will not increase the noise floor. If you ask this question, then it means you can't hear the noise floor anyway since it is too low already. Therefore it really doesn't matter.
 

andymok

Addicted to Fun and Learning
Joined
Sep 14, 2018
Messages
562
Likes
553
Location
Hong Kong
The name "True Peak" is a misnomer. It is just a generalized algorithm to predict the clipping point of various equipment. Different true peak meters actually show different readings. This website tested a lot of true peak meters, all meters show different values. If there is a "truth", then there is only one truth, not multiple "truths".
https://www.saintpid.se/en/isp-true-peak-limiters-test/

EBU R128 is a recommendation based on BS.1770. BS.1770 is the actual document to describe the "recommended" prediction algorithm.
https://www.itu.int/rec/R-REC-BS.1770-4-201510-I/en

Yeh lesson learnt, good to have your input :D!
 

LF78

Member
Joined
Oct 4, 2018
Messages
89
Likes
41
Location
Italy
The idea is a single "DR" number cannot reflect short term large variations, and pretty unreliable

Got it. With DR in my example I meant something like the difference (in dB) between the maximum and minimum sample value in the source content. Of course the minimum sample value needs to be selected wisely: if silence at beginning or end of the material is taken into consideration you end up overestimating the dynamic range.
 

PierreV

Major Contributor
Forum Donor
Joined
Nov 6, 2018
Messages
1,447
Likes
4,805
Going back to the original question, I'd say that if the parts of the chain are properly implemented, it generally doesn't matter, with a few caveats.

1 - some devices have outstanding specs on paper but aren't properly implemented either from a firmware/software point of view or a hardware point of view. That what's great about this site, on paper everything tested seems perfect based on specs, in practice not always.

2 - if you are applying DSP, room corrections, etc... Roon has that nifty headroom management setting that should take care of most issues, if properly implemented (and given how cleanly Roon seems to be implemented I am tempted to trust it even if I haven't analyzed its behavior in details)

3 - as far as the CCA is concerned, actual behavior can change at any time as those who have been using them from the start have probably noticed...

But to make a visual analogy, in image processing (directly from CCD or, to a lesser extent CMOS sensors) one obviously wants to expose to the right (maximize photon collection) without over-exposing (clipping). Under-exposing makes sure you won't clip but brings you closer to the noise floor (matters a lot more than in audio imho, especially on weak signals, for a bunch of reasons). Now, when you have that perfect shot and want to process it, you better convert your eventual 16 bits signal to a 32 bits signal or you are going to hit all kinds of nasty artifacts (a bit similar to poorly done DSP).

On the plus side,

- audio specs are, on paper, well beyond what we can hear while image sensing specs are behind our eyes (not in pure peformance terms, but because we can adjust our vision dynamically and our brain is a great processor).
- headroom should be easy to get.
- if we are lowering the volume, we are already reducing DR anyway so an eventual loss shouldn't worry us, only artifacts caused by excessive DSP or poor implementations.
- apparently, affordable amps (and possibly expensive amps) are way behind the digital chain.

So yes, seeing a pure lossless path can have a positive psychological impact which may matter in terms of listening enjoyment, but does it objectively matter in practice? AFAIC, I can't hear an objective testable difference between preamp level adjustment and DAC/DSP level adjustment but I know I do feel emotionally better when I see "pure lossless" :)
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
To reiterate the importance of floating point compatibility, intersample headroom in DACs cannot avoid floating point induced clipping.
https://en.wikipedia.org/wiki/Single-precision_floating-point_format

3.402823e+38 is the max 32-bit float value, copy and paste the following line in Google:

20*log(3.402823e+38)

Which means it can handle +/-770dB before blowing up. A 256-bit integer system (~1541dB) is necessary for full compatibility without using an internal software volume control.
https://hydrogenaud.io/index.php/topic,71696.0.html

While a 32-bit float value only has 25 bits of integer precision, it can handle a very wide range. Think about a ruler of 100 units. In an integer system, the unit is fixed, for example centimeter. In a floating point system, that unit can scale from nanometer to kilometer when measuring different things. A fixed ruler of 10000cm is completely useless for measuring driving distance or bacteria size. Regardless of what internal precision the DAC is, the link between software output and DAC input is not working in floating point.

Take a look at this track, apart from some mild limiting, the waveform looks much better than typical loudness war songs.
space traveler.png


isp.PNG

However it actually has pretty high intersample peaks. If you trust foobar, it is 20*log(1.757828) = +4.9dBTP, if you trust Audition then it is +5.2dBTP. Now assume it is +5dBTP, then according to EBU R128 recommendation of -1dBTP output, this song should be mastered at -6dBFS. However it is not the end of the story, someone will say you need to consider the non-intersample floating point peaks after passing a lossy encoder because distributors or streaming services use lossy codecs. However, every lossy encoder yield different peaks at different settings, like CBR/VBR/ABR bitrate and so on, different versions of the same encoder can yield different peaks, even the same version of the same encoder can yield different peaks if compiled differently!
https://hydrogenaud.io/index.php/topic,114777.msg946510.html#msg946510

Now, if you are a mastering engineer, what level should you use when submitting the lossless master? If end users are unwilling to use the volume control correctly, then they should not blame mastering engineers for the consequences mentioned in the post below:
https://www.audiosciencereview.com/...lity-in-windows-using-wasapi.5272/post-117704

Loudness war is wrong, but intersample and floating point overs are different things completely.
 
Last edited:

JohnPM

Senior Member
Technical Expert
Joined
Apr 9, 2018
Messages
344
Likes
919
Location
UK
EBU R128 is a recommendation based on BS.1770. BS.1770 is the actual document to describe the "recommended" prediction algorithm.
https://www.itu.int/rec/R-REC-BS.1770-4-201510-I/en
Bit odd that they don't recommend even something as trivial as a parabolic interpolation between the 4x oversampled values around peak samples to obtain something closer to the true peak (in a band-limited sense).
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
Bit odd that they don't recommend even something as trivial as a parabolic interpolation between the 4x oversampled values around peak samples to obtain something closer to the true peak (in a band-limited sense).
When considering the fact that modern DACs have so many choices of filters (ESS:7, AKM:6?) the actual clipping point could be different anyway.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,246
Likes
17,159
Location
Riverview FL
While a 32-bit float value only has 25 bits of integer precision, it can handle a very wide range. Think about a ruler of 100 units. In an integer system, the unit is fixed, for example centimeter. In a floating point system, that unit can scale from nanometer to kilometer when measuring different things. A fixed ruler of 10000cm is completely useless for measuring driving distance or bacteria size.

It seems you're inferring that the additional digits expand the high end of the range.

It doesn't (somewhat to my dismay). It just further subdivides the existing amplitude range.

16 or 24 or 32 bits - the max output voltage of a DAC remains the same, the way it's been implemented.

If it wasn't, you'd need to turn the volume knob couterclockwise by 48dB when playing 24bit after playing 16bit.

If going from 16 to 24 bit did expand the amplitude of the DAC, the max voltage would increase from 2Vrms (typical) to 502.38V

1543620149054.png
 
Last edited:

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
It seems you're inferring that the additional digits expand the high end of the range.

It doesn't (somewhat to my dismay). It just further subdivides the existing amplitude range.

16 or 24 or 32 bits - the max output voltage of a DAC remains the same, the way it's been implemented.

If it wasn't, you'd need to turn the volume knob couterclockwise by 48dB when playing 24bit after playing 16bit.

If going from 16 to 24 bit did expand the amplitude of the DAC, the max voltage would increase from 2Vrms (typical) to 502.38V

View attachment 18264

This point is addressed in one of my quoted link already.

My point is to illustrate why users should normalize float values to fixed values to avoid clipping. That means, I was explaining why users should use the internal software volume control. Read 2Bdecided's post to see why +770dB is not more dangerous than +10 or +20dB.

I made another calculator to illustrate this issue.
https://www.audiosciencereview.com/...lity-in-windows-using-wasapi.5272/post-117437

Enter 0 in the dBFS to sample field, it shows +/-32768 sample value.
16bit.PNG



However, +32768 signed and 65536 unsigned are illegal, the maximum should be +32767 and 65535. When you click "Convert to fixed", it shows "clip".
clip.PNG



The integer bit depth can be changed, for example 24-bit. The calculated values will be changed accordingly.
24bit.PNG



The calculator has two parts: analog and digital. The digital part does not involve voltage at all.
 
Last edited:

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,693
Top Bottom