INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: 16bit vs 24bit effective dynamic range  (Read 9970 times)

soongsc

  • World Citizen
  • ***
  • Posts: 106
16bit vs 24bit effective dynamic range
« on: November 23, 2015, 07:28:34 pm »

Reading through the wiki, it seems that playing back 16bit music into a 24bit DAC effectively provides only 16bit dynamic range.  Is it possible to setup JRiver to allow full utilisation of the DAC dynamic range?  The reason why I am asking is that I am using a 24bit convolution file to do some equalisation, and hope to utilise the digital bits to the fullest extent.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: 16bit vs 24bit effective dynamic range
« Reply #1 on: November 23, 2015, 08:09:43 pm »

You could use MC's Output Settings in DSP Studio to resample everything to 24bit, but it won't add anything.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #2 on: November 23, 2015, 08:21:00 pm »

I was wondering if you could add the equalisation in a way to add gain to the 16bit so that it will use the additional headroom 24 bit provides.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: 16bit vs 24bit effective dynamic range
« Reply #3 on: November 23, 2015, 08:41:35 pm »

You can't add dynamic range without some sort of expander DSP.  Expansion is the opposite of compression.  But really, you're barking up the wrong tree.  Most songs have WAY less than 20 dB of dynamic range.  But 16 bits gives you 96 dB of dynamic range.  So....

Brian.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #4 on: November 23, 2015, 08:59:10 pm »

I am not trying to add dynamic range.  The issue at hand is that when I am applying equalisation through DSP, increasing the gain of bass means reducing gain in other ranges of spectrum.  Since the bits above 16 are not used anyway, is there a possible way to boost the equalisation into this range?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: 16bit vs 24bit effective dynamic range
« Reply #5 on: November 23, 2015, 09:07:35 pm »

MC does all DSP processing in a 64 bit space.  It's not limiting itself to 16 bits.

If you want more range for bass boost, you don't have to reduce other bands.  Just apply a gain reduction first on the whole range, then boost the bass as much as you want.  If you want +12 dB of bass, just apply -12 dB of overall gain, then add your bass boost.

Brian.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #6 on: November 23, 2015, 09:19:44 pm »

I was wondering, because the equalisation is in an ir WAV file in the 24bit format.  How would I add gain to do that with the internal volume already at maximum?  All I need is a constant gain.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: 16bit vs 24bit effective dynamic range
« Reply #7 on: November 23, 2015, 09:24:07 pm »

Sorry I don't have any experience with convolution.  Sounds like cool stuff, but I haven't experimented with it yet.

I just opened the convolution tab in the DSP and I see a check box labeled "normalize filter volume".  I'm not sure what that does but it's worth trying it to see.

What problem are you experiencing?  Are you getting clipping or something?

Brian.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #8 on: November 23, 2015, 09:28:29 pm »

I am getting lower than desirable maximum volume and was trying to figure out if it can be solved through the unused bits when playing 16bit music.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: 16bit vs 24bit effective dynamic range
« Reply #9 on: November 23, 2015, 09:35:27 pm »

Ok, so it's an overall volume issue.  That implies that your convolution filter is performing a lot of "cuts" reducing the volume.  Doesn't the normalize check box I mentioned bring back that lost volume?  Is yours turned on?

If that's not working (and I'm not sure if it does or not), you can certainly add a fixed amount of gain using Parametric Equalizer 2.  Experiment to see how much you can add, and watch the analyzer to see what the overall volume level looks like with a loudly recorded track.

Are you using Volume Leveling, or Adaptive Volume?  Volume Leveling tends to reduce the overall volume, while making the volume pretty consistent track to track.  Adaptive Volume, in peak normalize mode, can bring back quite a bit of the lost volume.

Brian.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #10 on: November 23, 2015, 10:13:11 pm »

The normalise checkbox is already used, I did not notice any difference with and without.  I am not using any volume levelling or adaptive volume.  But the Adaptive volume sounds interesting, I will investigate this some more.
I guess I will look into the parametric equaliser last.

Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #11 on: November 24, 2015, 01:49:18 am »

Adaptive volume reduces level by -1db? Fixed?  Don't quite understand what is going on.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #12 on: November 24, 2015, 02:37:31 am »

Parametric equalizer gain works, but the sound becomes a bit edgy and harsh.
Is the information to make a more technical judgement?
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: 16bit vs 24bit effective dynamic range
« Reply #13 on: November 24, 2015, 03:18:18 am »

Adaptive volume reduces level by -1db? Fixed?  Don't quite understand what is going on.
IIRC this is what it does when faced with a track that hasn't been analysed. What are you playing? An analysed track from your library? What does audio path say?

Anyway you sound like you have a gain structure not a dynamic range problem. What is your signal chain? how is it configured?

Also what does your filter look like? Perhaps you can post the frequency response of it.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
16bit vs 24bit effective dynamic range
« Reply #14 on: November 24, 2015, 04:21:57 am »

The response of the filter looks like the mouth of a smiling face.  Lowest dip is around -8db probably more.  I was hoping to place the dip at 0db and use the additional 8bits to fully use the 24bits, now looking at the audio path, it says the output is 32 bit, so I am even more confused.  Only convolution is used in the audio path, but I do have one zone setup to invert polarity.

Signal chain is simple, MacBook - Meridian Explorer DAC - active speaker.  I do plan to try other DACs.  So I need to understand how the digital dynamic range is used.

Since insufficient information is available to determine how to use full dynamic range of DACs, I will just have to generate 16bit and 24bit test files to see what is happening.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: 16bit vs 24bit effective dynamic range
« Reply #15 on: November 24, 2015, 05:20:23 am »

You're barking up the wrong tree if you have a volume issue.

The bit depth controls the no of steps that exist between "no signal" and "a full scale signal". A full scale signal is a full scale signal irrespective of what the bit depth is. This is then turned into an analogue signal by your DAC and a full scale signal will come out as some particular voltage, https://www.meridian-audio.com/wp-content/uploads/2015/06/Explorer-ds.pdf says this voltage is 2Vrms. This signal is then passed onto your active speakers for amplification. If your active speakers require more than 2Vrms to drive them then you have a gain structure issue as your DAC is unable to drive your speakers to their potential.  The important value here is the input sensitivity of your speakers. What speakers are they?

Obviously your filter is cutting so you are losing some output there, you can't add this back by increasing the bit depth. The only way you can add this back digitally is by adding gain to the filter but you *have* to either attentuate subsequently (e.g. by limiting yourself to a fixed maximum volume level) or you will clip the output *digitally*. You can raise the level in a subsequent analogue stage though (subject to noise issues that), one way to do this would be to increasing the sensitivity of your speakers. For example lets say they had an input sensitivity of 2V so they needed the full output of your DAC to drive them, your max output is 8dB down because of the filter so that's about 0.8V. If you were able to increase the sensitivity such that they only required 0.8V then you'd be back to "full volume" without any concerns about clipping.

Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
16bit vs 24bit effective dynamic range
« Reply #16 on: November 24, 2015, 07:34:34 am »

Well, if I play without the convolution I get bit perfect which means that playing 16 bit music leaves 8 bits unused.  While the convolution does lower the total volume, the idea is that if all of the 24bits are used, then I should regain 8db.  This has nothing to do with the analog side.  However, it is not clear what really happens to the scaling if MC is sending in the 32bit format as indicated in audio path.

From all the answered so far, I will just have to rinse out myself.

Thanks for the input anyway.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: 16bit vs 24bit effective dynamic range
« Reply #17 on: November 24, 2015, 07:41:37 am »

Well, if I play without the convolution I get bit perfect which means that playing 16 bit music leaves 8 bits unused.  While the convolution does lower the total volume, the idea is that if all of the 24bits are used, then I should regain 8db.  This has nothing to do with the analog side.  However, it is not clear what really happens to the scaling if MC is sending in the 32bit format as indicated in audio path.
no sorry but you really are well off track here. You don't lose "8 bits of volume" when you switch from 16 to 24 bit and 8 bits != 8dB anyway (there's nearly 50dB between 16bit and 24bit in SNR terms).

This is a gain structure problem in the first instance relating to the peak magnitude of the signal that is coming out of your signal chain and what that means when it goes through your DAC/amp.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
16bit vs 24bit effective dynamic range
« Reply #18 on: November 24, 2015, 07:50:01 am »

The gains structure is a problem only if you scale 16 bit mathematically to 24bit.  I am not sure this is the case.  If a 24bit DAC is only receiving signals peaking at 16bits, it is never going to output full scale.

Without knowing the technical detail,  the only way is to send use 24bit full scale track and 16bit full scale track to see if there is any difference at the DAC output.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: 16bit vs 24bit effective dynamic range
« Reply #19 on: November 24, 2015, 08:03:35 am »

The gains structure is a problem only if you scale 16 bit mathematically to 24bit
it is padded with zeroes
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: 16bit vs 24bit effective dynamic range
« Reply #20 on: November 24, 2015, 08:11:05 am »

The gains structure is a problem only if you scale 16 bit mathematically to 24bit.  I am not sure this is the case.  If a 24bit DAC is only receiving signals peaking at 16bits, it is never going to output full scale.

Without knowing the technical detail,  the only way is to send use 24bit full scale track and 16bit full scale track to see if there is any difference at the DAC output.

I think you might have some confusion about how bitdepth works.  Mattkhan tried to talk through it above, but I'll take another go at it.  

Bitdepth is the measure of how low/quiet a signal can get below digital fullscale (called 0dBFS), hence bitdepth.  A 16 bit source will have peaks at 0dBFS.  A 24 bit source will also have peaks at 0dBFS.  The difference between the two formats is how much quieter 24 bit can get than 16 bit, not how loud (think depth).

Your DAC outputs the most power it can without clipping (the loudest signal) at 0dBFS.  It will output the same maximum volume with 16 bit and 24 bit inputs because they both have the same maximum volume (0dBFS).  Because almost all music is mastered to peak at 0dBFS, you can't add net digital boost to a source without pushing parts of it into clipping.  Putting a 16 bit source in a 24 bit wrapper (padding with zeroes on the bottom) doesn't help because the 16 bit source already has peaks at 0dBFS (which is by definition as loud as your DAC can play).

So you can't get any gain back by going from 16 bit to 24 bit; you need to change the gain structure after the DAC if you're trying to recover volume lost through convolution.  As Matt put it, you're barking up the wrong tree.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #21 on: November 24, 2015, 08:24:42 am »


I think you might have some confusion about how bitdepth works.  Mattkhan tried to talk through it above, but I'll take another go at it.  

Bitdepth is the measure of how low/quiet a signal can get below digital fullscale (called 0dBFS), hence bitdepth.  A 16 bit source will have peaks at 0dBFS.  A 24 bit source will also have peaks at 0dBFS.  The difference between the two formats is how much quieter 24 bit can get than 16 bit, not how loud (think depth).

Your DAC outputs the most power it can without clipping (the loudest signal) at 0dBFS.  It will output the same maximum volume with 16 bit and 24 bit inputs because they both have the same maximum volume (0dBFS).  Because almost all music is mastered to peak at 0dBFS, you can't add net digital boost to a source without pushing parts of it into clipping.  Putting a 16 bit source in a 24 bit wrapper (padding with zeroes on the bottom) doesn't help because the 16 bit source already has peaks at 0dBFS (which is by definition as loud as your DAC can play).

So you can't get any gain back by going from 16 bit to 24 bit; you need to change the gain structure after the DAC if you're trying to recover volume lost through convolution.  As Matt put it, you're barking up the wrong tree.
Well, for example, if I rip an HDCD disk using dbpoweramp, the final format actually uses 20 bits, I have the option of rip as is or scale to the MSB of a 24bit word, from the manual, scaling to the MSBs will give more gain.
I have worked with coding to DAC outputs at the assembly code level, so I think I understand enough about interfacing with a particular DAC bitdepth.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: 16bit vs 24bit effective dynamic range
« Reply #22 on: November 24, 2015, 08:28:18 am »

Well, for example, if I rip an HDCD disk using dbpoweramp, the final format actually uses 20 bits, I have the option of rip as is or scale to the MSB of a 24bit word, from the manual, scaling to the MSBs will give more gain.

If that works as you say that a very unusual situation (there aren't a lot of HDCDs out there), and if they're not mastering HDCD's to peak at 0dBFS that's unusual (redbook CDs and most other digital formats are mastered to peak at 0dBFS).  And, as you say, once you've scaled it, the file is as loud as it can go. 99% of commercially produced music is as loud as it can be digitally. You can easily see that for yourself: run JRiver's audio analyzer on the audio in your collection, and then have a look at the data field for True Peak level on the files in JRiver.  You'll see that 99% of them are within 1dB of 0dBFS. You can't add gain to something that's already as loud as it can be.  


I have worked with coding to DAC outputs at the assembly code level, so I think I understand enough about interfacing with a particular DAC bitdepth.

If you think you can hack the DAC driver to trick it into outputting more voltage at 0dBFS, go for it, but that's a totally different proposition than "using bitdepth"  to gain volume in software which won't work.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: 16bit vs 24bit effective dynamic range
« Reply #23 on: November 24, 2015, 08:50:30 am »

I have worked with coding to DAC outputs at the assembly code level, so I think I understand enough about interfacing with a particular DAC bitdepth.
well that would be useful knowledge if it had something to do with your problem :)

If you want to post details about your speakers then I'm sure we can give some pointers on how to configure and verify (both in software and in the analogue stage) your setup.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #24 on: November 24, 2015, 08:52:38 am »

I guess MC probably scales the 16 bits to the MSBs of a 24bit word.  I assumed they were not doing that.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #25 on: November 24, 2015, 09:01:05 am »


well that would be useful knowledge if it had something to do with your problem :)

If you want to post details about your speakers then I'm sure we can give some pointers on how to configure and verify (both in software and in the analogue stage) your setup.
Thanks, hardware is pretty straightforward.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: 16bit vs 24bit effective dynamic range
« Reply #26 on: November 24, 2015, 09:07:48 am »

I'm confused on two points:

1.  If you disabled the convolution filter entirely, do you get enough volume out of the system?  If so then...
2.  If the convolution filter is reducing the gain digitally, why can't a simple digital gain boost bring back some or all of the lost gain?  Convolution isn't variable with source media right?  It's just an EQ with very sophisticated parameters that control the shape of the EQ.  If it reduces gain, I don't see why adding gain *after* convolution wouldn't fix the overall gain.

Brian.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: 16bit vs 24bit effective dynamic range
« Reply #27 on: November 24, 2015, 09:11:34 am »

I'm confused on two points:

1.  If you disabled the convolution filter entirely, do you get enough volume out of the system?  If so then...
2.  If the convolution filter is reducing the gain digitally, why can't a simple digital gain boost bring back some or all of the lost gain?  Convolution isn't variable with source media right?  It's just an EQ with very sophisticated parameters that control the shape of the EQ.  If it reduces gain, I don't see why adding gain *after* convolution wouldn't fix the overall gain.

Brian.

The problem is that the convolution filter he's using has variable attenuation by frequency. He said he's dialed in a smile curve in the convolution with a -8dB low point.

So, say 1000Hz is -8dBFS, but 20Hz is at or near 0dBFs and so is 20KHz.  So he can't add digital gain after convolution because he has variable attenuation, and adding the boost would push the corners of his smile into clipping, if that makes sense.  But it makes music sound much quieter because most of the "music" is in the middle of the spectrum.

At least that's how I understood his situation.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: 16bit vs 24bit effective dynamic range
« Reply #28 on: November 24, 2015, 09:26:45 am »

I guess MC probably scales the 16 bits to the MSBs of a 24bit word.  I assumed they were not doing that.

As noted above, they just pad the 16 bits with zeroes on the "bottom" to create the 24 bit word.  Look at it another way: if they tried to pad on the "top" like you're contemplating it would actually force significant attenuation.  Because music is mastered to peak at 0dBFS and DACs put out maximum volume at 0dBFS, adding the 8 bits "on top" would have the effect reducing the effective digital volume of the music by 48dB! Hardly a desirable outcome.
Logged

soongsc

  • World Citizen
  • ***
  • Posts: 106
Re: 16bit vs 24bit effective dynamic range
« Reply #29 on: November 24, 2015, 09:34:44 am »


The problem is that the convolution filter he's using has variable attenuation by frequency. He said he's dialed in a smile curve in the convolution with a -8dB low point.

So, say 1000Hz is -8dBFS, but 20Hz is at or near 0dBFs and so is 20KHz.  So he can't add digital gain after convolution because he has variable attenuation, and adding the boost would push the corners of his smile into clipping, if that makes sense.  But it makes music sound much quieter because most of the "music" is in the middle of the spectrum.

At least that's how I understood his situation.
Yes,
Without convolution, the wound level is where I am used to having.

When using parametric equalizer to increase the gain by 6db, the level is more desirable, but the sound becomes slightly edgy and harsh.  I cannot understand why it would do that even though the exact levels never clip.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: 16bit vs 24bit effective dynamic range
« Reply #30 on: November 24, 2015, 10:00:05 am »

So, say 1000Hz is -8dBFS, but 20Hz is at or near 0dBFs and so is 20KHz.  So he can't add digital gain after convolution because he has variable attenuation, and adding the boost would push the corners of his smile into clipping, if that makes sense.

I just wrote up 3 paragraphs about why this is wrong.  Then I realized it's right!  If you play 20 Hz, full scale, by itself it will be full scale with or without the convolution filter.  But if you then add in my global boost of (for example) 8 dB, then 20 Hz will get pushed 8 dB above full scale and clip like no tomorrow.

I guess I'm too used to working in the analog domain where there are so many gain stages in so many places, you mostly don't notice this kind of thing.

This makes me wonder about how the "bit structure" in MC works then.  MC knows what bit depth and rate the files it plays are.  Say 16 bit 44.1 kHz.  MC knows what's going out to the DAC.  Say 24 bit 44.1 kHz.  MC works in a 64 bit domain internally.  So... hmm.. I'm confused as to how this all plugs together.  I have to go think about this for a while.

Brian.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: 16bit vs 24bit effective dynamic range
« Reply #31 on: November 24, 2015, 10:52:05 am »

This makes me wonder about how the "bit structure" in MC works then.  MC knows what bit depth and rate the files it plays are.  Say 16 bit 44.1 kHz.  MC knows what's going out to the DAC.  Say 24 bit 44.1 kHz.  MC works in a 64 bit domain internally.  So... hmm.. I'm confused as to how this all plugs together.  I have to go think about this for a while.

It's 64 bit floating point internally so that's apples and oranges. For 16 bit integer 44.1KHz sampling rate music imagine a datagram of a "moment" of music in the form of a two dimensional chart.  The x axis is the frequencies between 0Hz and 22 KHz; the y-axis is the volume running from 0dBFS to the noisefloor at -96dBFS (technically slightly lower with dither, but let's ignore that).  Any value on the x axis can have any value on the y axis.  This signal goes into JRiver and is converted to 64-bit floating point, goes through the signal chain, and gets spit out as a 24 bit integer signal.  While it's in the 64-bit portion there's space "above" and "below" the data to allow for manipulation and DSP (there's no chance for clipping while things are still floating point), but when it gets winnowed down to 24 bit integer again the information is put back "where it was" (subject to DSP), with zeros below it.

In the "pure" case (where there's no processing) the 24 bit output's datagram would look like this:

1) The original 16 bit input occupies the entire x -axis across the "space" between 0dBFS to -96dBFS (ish) reproduced exactly as it was in the source (it's bit perfect).
2) On the graph, in the space between -97dBFS and around 140dBFS the entire x-axis is occupied by silence (zeroes)
3) Depending on your settings, JRiver applies or doesn't apply dither just above the noisefloor (-144dBFS).

Obviously if you do any processing (or volume adjustments) everything moves and changes, but the pure case should give you an idea.

Not sure how helpful that is, but I find a visual to be handy.
Logged
Pages: [1]   Go Up