INTERACT FORUM

Please login or register.

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

Author Topic: Bug: Room Correction clips when full strength signal is present on all channels  (Read 6927 times)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3930

extracting as an explicit bug report from http://yabb.jriver.com/interact/index.php?topic=95717.0

test method was

- send full strength sine wave from REW signal generator to jriver via ASIO line in at 25Hz
- set jriver to 5.1 output + JRSS mixing + to use room correction
- add PEQ stage to copy input channel to all other channels
- review output in analyser and audacity (set to record the SW output)
- turn on bass management in jriver (24dB and 48dB/octave slopes to ensure main channels not involved in output stage)
- remove clip protection
- repeat output checks

Pictures to demonstrate are be found in the 3 posts from http://yabb.jriver.com/interact/index.php?topic=95717.msg659468#msg659468

This indicates that jriver is using the "standard" approach to bass mgmt of leaving 5dB headroom for main channel summation which has been shown to be insufficient in certain BDs (I believe How to Train Your Dragon is one example).
 
The suggested manual workaround is to add a PEQ stage to reduce gain ahead of bass management but it seems the more correct solution would be to do this within bass management itself.
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver

I played back some of How To Train Your Dragon and had lots of clipping. Maximum peak levels were at 160%.
Settings:
7.1 DTS-HD Track
80 Hz XO on all channels
Volume set to 100%
Flat Line Overflows

I did Analyze Audio and found a Peak Level (R128) of 1.7 dBTP which is most of the problem. With Peak Level Normalize turned on (which is recommended), then it only clipped once at 112% during the same scene. With clip protection turned back on it didn't clip at all.

The levels could be lowered slightly, but the slight clip that did happen won't ever be noticed audibly.


Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3930

Thanks for testing with some real content to confirm the magnitudes involved. I don't understand this comment though

With Peak Level Normalize turned on (which is recommended), then it only clipped once at 112% during the same scene.
my takeaway from http://yabb.jriver.com/interact/index.php?topic=82023.0 was that turning on adaptive volume = need to adjust volume levels each time you play as there is no longer a fixed absolute level to refer to (when you look at the volume control). Admittedly I was thinking of that more in terms of music listening. Anyway my point is that I don't understand how this reduces the extent of the clip in this case, what is going on there?

With clip protection turned back on it didn't clip at all.
I thought clip protection was basically a limiter aka a graceful way to handle the clipping. If so then I'd see that as a perfectly useful workaround but not a solution (to the clipping issue) per se.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5162
  • "Linux Merit Badge" Recipient

Thanks for testing with some real content to confirm the magnitudes involved. I don't understand this comment though
my takeaway from http://yabb.jriver.com/interact/index.php?topic=82023.0 was that turning on adaptive volume = need to adjust volume levels each time you play as there is no longer a fixed absolute level to refer to (when you look at the volume control). Admittedly I was thinking of that more in terms of music listening. Anyway my point is that I don't understand how this reduces the extent of the clip in this case, what is going on there?

I was a bit confused by that too; volume levelling would resolve the intersample peak overage, and the combination of volume leveling and adaptive volume would too (because volume leveling would resolve the issue, and adaptive volume never adds back in enough volume to clip).  I'm not sure what adaptive volume by itself would do here. 

I know mojave uses both volume leveling and adaptive volume in combination, so maybe he was referring to the combination and shorthanding it by just referring to adaptive volume?

Quote
I thought clip protection was basically a limiter aka a graceful way to handle the clipping. If so then I'd see that as a perfectly useful workaround but not a solution (to the clipping issue) per se.

I think his point was that with the appropriate volume leveling setup to resolve the bad mastering (the intersample overs, which are a no-no), there was only one place where the content would theoretically clip and clip protection caught it (no audible clip).  That does result in a temporary attenuation, so is not "ideal," but is still pretty good for "worst case" real world material. 

That said, it wouldn't take much additional attenuation to ensure no clip (about 0.3 dB of additional attenuation based on your sine wave experiment), so it might be worth fixing programmatically. 
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3930

volume levelling would resolve the intersample peak overage
this means I was more confused than you were as I don't understand the quoted bit either. Can you enlighten me pls? :)
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5162
  • "Linux Merit Badge" Recipient

My understanding is that either as part of the file analysis or as part of the DSP algorithm, volume leveling not only reduces all audio volume to bring the average level of the music to a reference level (-23 loudness units below fullscale, equivalent to -23dBFS), but also (as an edge case) looks at the True Peak of the audio, and if it would not otherwise be attenuating enough to bring the file out of clipping reduces the target further.  

Adaptive volume when engaged alongside volume leveling adds volume back, but is setup to never add enough volume to cause clipping based on the analyzed true peak of the file.  What I don't know is what adaptive volume does in this context when it's running by itself (whether adaptive volume by itself ever applies negative gain).  I can't test right now, but I have How to Train Your Dragon at home, so I can test and see.

None of this necessarily applies once you start mixing channels, it's only designed to resolve intersample clipping baked into the file itself (i.e. the track itself clips as mastered, and JRiver resolves it)[EDIT: looks like the downmix does take True Peak levels into account, see below].  If you need some additional detail on intersample clipping, I can explain further, but the basic idea is that you can have a signal that has consecutive samples at or below 0dBFS that is nonetheless clipping like crazy because when the waveform is reconstituted, the "line" connecting the two samples pushes above 0dBFS.  JRiver's True Peak measurement is made by reconstituting the waveform and seeing what the real peak actually is.

The consequence is that there is commercially mastered content that cannot be played back at 0dBFS without clipping because the folks recording/mastering the audio either had cheap clip meters (that don't show intersample overs) or were ignoring their expensive ones.

Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver

Adaptive Volume > Peak Level Normalize works in both directions - it increases volume when a reduction by Volume Leveling isn't needed and it reduces volume due to intersample peak overage as seen in the Peak Level (R128) tag.

For my movie Zone, I never use Volume Leveling. I don't care if they all play the same or not since I listen at different levels depending on who is watching the movie, time of day, type of movie, etc. I do have Peak Level Normalize turned on, but in my system I would have to be listening to peaks at 125+ dB to be at maximum volume and ever run into any clipping issues.

Another reason I don't use Volume Leveling for movies is that I calibrate my system to Reference Level just to give me some sort of comparison to others. I do use Volume Leveling for music.

Those that decode, but use a receiver, should definitely analyze audio in movies and use Peak Level Normalize all the time to prevent intersample peak overage.


Analysis is also important because of the following:
Quote
19.0.24 (8/9/2013)
2. NEW: JRSS downmixing uses per-channel peak levels from audio analysis when they're available to make a better determination about how much (if any) volume reduction is required to prevent clipping after the downmix.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5162
  • "Linux Merit Badge" Recipient

Ok so both DSP modules will independently address intersample overages, that's good to know.  It also looks like the downmix (but not necessarily the bass management) takes True Peak into account as well.

Thanks for the added detail mojave  :)
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver

And some more info:
Quote
19.0.11 (7/18/2013)
6. Changed: 'Peak Level' values calculated by the audio analyzer are R128 True Peak values.
7. Changed: Volume Leveling and Adaptive Volume in Peak Level Normalize mode target -1.0dB instead of 0.0dB (as per R128 recommendations).

Here is a summary:
1.  Analyze Audio is recommended for movies because it helps Volume Leveling and Adaptive Volume prevent clipping during bass management.
2.  When Volume Leveling or Adaptive Volume > Peak Level Normalize aren't used, JRiver can clip during bass management. I would say the clipping will be rare.
3.  When Adaptive Volume > Peak Level Normalize is used by itself, it can prevent clipping in most cases.
4.  When Volume Leveling and Adaptive Volume are used, there will never be clipping during bass management.

Additional Suggestions:
1.  For movies with know high levels one can also save a DSP with levels lowered in PEQ and assign a DSP tag to that movie.
2.  When using Convolution, Adaptive Volume > Peak Level Normalize maintains the maximum headroom. Convolution always lowers levels so clipping should never be an issue.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3930

v useful info all round, thanks. I imagine some of this should go on the wiki (assuming it's not there already).

I think I now have the info I need to be able to recover all of the gain I'd lost since switching to the PC as a source.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5162
  • "Linux Merit Badge" Recipient

v useful info all round, thanks. I imagine some of this should go on the wiki (assuming it's not there already).

I'll try and get it in over the weekend; I did a preliminary overhaul on the volume leveling wiki last weekend, and need to do some work on adaptive volume.  Slow and steady wins the race.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3930

just for completeness, what does adaptive volume/peak normalise do when presented with a synthetic signal like I was using for my test case? i.e. unanalysed content played via asio line in.

The reason I ask is because I ran a quick test, using my existing convolution filters, and found that this meant I could get to -3dBFS (rms) with a sine wave from REW and hit 100% peak signal level. If I then added the normalise option in convolution (which I normally turn off) then it actually increased the peak level to ~105%. This seems confusing behaviour.
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver

Adaptive volume > Peak Level Normalize will use a fixed -1.0 dB adjustment for non-analyzed content.

The "normalize filter volume" option in Convolution should probably be off since it has been reported in many systems to cause clipping. Matt was going to revisit it, but hasn't gotten to it yet. When used with internal volume control, the "normalize filter volume" option tries to regain back the loss of volume done by the convolution filter.

It isn't always clear in MC20 which features work best with internal volume and shouldn't be used if controlling the volume externally.

Edit:  I found this quote from Matt regarding "normalize filter volume" in Convolution.

Quote
Currently the normalize system pushes pink noise through the convolution engine and targets -6dB of change.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608

I moved that thread to the public board:
http://yabb.jriver.com/interact/index.php?topic=81837.0
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3930

Adaptive volume > Peak Level Normalize will use a fixed -1.0 dB adjustment for non-analyzed content.

The "normalize filter volume" option in Convolution should probably be off since it has been reported in many systems to cause clipping. Matt was going to revisit it, but hasn't gotten to it yet. When used with internal volume control, the "normalize filter volume" option tries to regain back the loss of volume done by the convolution filter.

It isn't always clear in MC20 which features work best with internal volume and shouldn't be used if controlling the volume externally.
OK good to know. I didn't know that about convolution at all, all the (previously) public threads on here say "use normalize filter volume" but all the comments on the acourate group say "turn it off" so it looks like they were right :)
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver

I checked out the beginning of Edge of Tomorrow. Max peak levels were at 112%.
Settings:
7.1 DTS-HD Track
80 Hz XO on all channels
Volume set to 100%
Flat Line Overflows

I did Analyze Audio and found a Peak Level (R128) of 1.4 dBTP (in the center channel). With Peak Level Normalize turned on then the maximum peak level was 93%. This demonstrate how beneficial it is to do an Audio Analysis and use Peak Level Normalize.  8)
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver

I realized that I never tested clipping after Analyze Audio but without Peak Level Normalize turned on. I just tested again and with the audio analyzed and Peak Level Normalize off, the max peak levels were at 94%.

This means JRiver is super smart and uses the data from Analyze Audio during bass management even if Adaptive Volume and Volume Leveling are off. Nice!
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3930

All the detail & investigation here is much appreciated, thanks to mwillems & mojave for guiding me through this one. Just to round it off from end, I now have the following result;



This is all channels 1/1 octave smoothed to show the relative levels with a sweep at -30, my curve goes +6 to 10Hz from ~120Hz and -4 by 20kHz (though speakers themselves seem to rolloff before then anyway in this measurement, not sure what is going on there). It feels like a nice, if minor, achievement to finally have my setup working such that MV=0=Reference :)
Logged
Pages: [1]   Go Up