INTERACT FORUM

Please login or register.

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

Author Topic: Reduce Maximum of Peak Level Normalize to Prevent Clipping (aka add headroom)  (Read 630 times)

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

I may not use the most accurate audio terminology, but hope to communicate the issue clearly—

Sometimes I'll convert files in a playlist so I have a set of separate files collected as a compilation. (It is an unfortunately convoluted process, involving further steps outside of JRiver, that'd be so much easier if JRiver had naming & numbering and/or tagging options for conversion, but that's another topic for which there's no answer.)

I may apply both Volume Leveling to get a somewhat consistent playback volume across the collection, and Adaptive Volume: Peak Level Normalize because otherwise results tend to be very quiet.

I have seen across MediaCenter versions, and across different systems (Mac or Linux), the peakier of resultant output files usually have clipping. I can easily tell by dropping the FLAC files, for instance, into Audacity. Yes, I have "Clip protection" selected at bottom of DSP menu.

Is there anywhere to specify headroom or peak dB that the peakiest of peaks should attain? Seems it always aims for 0 and then there is clipping. This old post from long ago
https://wiki.jriver.com/index.php/Normalization
 seems to indicate there is a percentage one can set for normalizing,
"...The normalization percent that you set is the percent of the maximum that you want the new peak level to be at…"
but looks like it goes way back to before changes in the program’s handling of normalization and I don't see any similar setting anywhere.
Logged

mwillems

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

So Mediacenter's volume leveling and adaptive volume account for this during live playback and won't boost tracks until they clip.  It sounds like when applying DSP for file conversions volume leveling and peak level normalize work slightly differently then during live playback, which may be a bug? Its hard to tell without knowing if you're applying any other DSP in the chain because other DSP can also inadvertantly produce clipping in loud tracks (even DSP that you wouldn't expect to result in boost).  Are there any other steps in your DSP chain for conversions?  Do all the tracks in a given playlist clip (which would be very unexpected) or just the one or two "loudest" tracks in any given playlist?

In the meanwhile, the simplest way to add some headroom by far is to add a parametric equalizer step to reduce the volume after the volume leveling and adaptive volume steps in DSP studio.  Just setup a PEQ "adjust the volume" filter to globally reduce volume by 2 dB or so and you should eliminate any incidental clipping from tracks that were mastered too loud, while preserving the volume leveling in between tracks.  All of the DSP operations are handled in 64-bit floating point so there should be no clipping until the end of the chain when it gets dithered back down to 16 or 24 bit. As long as you reduce the volume to create headroom somewhere in there after adaptive volume step (where the boost is presumably coming from) you should be fine.
Logged

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

No other DSP(s) in chain. And...

Actually I did happen shortly later to try this...
"Just setup a PEQ "adjust the volume" filter to globally reduce volume by 2 dB or so"
& it appeared to work. I just was not sure about whether I was being misled by results, like if there were clipping and then the volume move simply lowered volume afterwards, or if it really was working because of something like you note—
"All of the DSP operations are handled in 64-bit floating point so there should be no clipping until the end of the chain when it gets dithered back down to 16 or 24 bit"
So ... thank you for confirming before I even got back here to ask!

I am aware of related buggy behavor on this, and I cannot find a topic on it, so maybe I should start another thread in case developers see it. It happens on Mac & Linux, too. Even with Audio> Apply DSP... unchecked in the Audio Conversion window, JRiver nonetheless applies DSP unless you first, with Apply DSP checked, go into DSP Studio dialgue and uncheck any and all checked DSPs. Maybe somehow the results differ, but files are being changed in what appears at quick glance to be same way whether or not Apply DSP is checked, if DSPs are checked in the DSP Studio window, making the Apply DSP checkbox useless, but worse, misleading. That's a different issue though.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42734
  • Shoes gone again!

The whole point of Peak Level Normalize is to find the maximum safe gain before any clipping.

You need to analyze files for Media Center to be able to calculate the levels properly.

I use the feature each day and really appreciate it.

If you have a set of files you think are using an incorrect level, you could send them to me (matt at jriver) for further investigation.

Thanks.
Logged
Matt Ashland, JRiver Media Center

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

Thanks for reply.

The files have all been analyzed and it's not any one set of files that clip; it happens all the time.

Audacity wiill show a few red lines throughout the processed files; this could mean clipping, or it could mean just hitting 0 dB. Analyzing the processed files back in JRiver will show peaks just above zero— for instance: +0.3 dBTP; +0.2 Left; +0.3 Right. Including a Parametric Equalizer step in conversion at say, -1dB or -2, etc, will work around and avoid that, unless it just obsures final result and fools me into thinking it is not happening.

Upon further consideration, though, using Peak Level Normalize to make up for the Volume Leveling drop in volume seems to run counter to the Volume Leveling goal of getting things to sound the same, no? If Volume Leveling is perceptive, then forcing all tracks to then peak at same level seems less like a companion move than, say, amplyfing all Volume Leveled tracks as a group up until loudest one peaks at a designated point, leaving the difference between tracks. Only way I could think to acheive that within JRiver would be to run a second step: first, Voume Leveling, then check highest peak across all tracks and run Parametric Equalizer step to amplify all tracks to just shy of that.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42734
  • Shoes gone again!

I just converted an album with Adaptive Volume (Peak Level Normalize) and Volume Leveling selected.

After conversion I analyzed the new files. They had a peak of -0.2 dB which should mean they're hitting peak just like expected.

Playing the files should perform the same procedure.

So I'm not seeing a problem with my tests. Thanks.
Logged
Matt Ashland, JRiver Media Center

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

edit: various sources, consistently getting results peaking slightly over 0
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42734
  • Shoes gone again!

Are you converting to floating point that can hold a louder value?
Logged
Matt Ashland, JRiver Media Center

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

I don't see any such options, floating point vs fixed point or whatever it might be; bit depth is Automatic
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42734
  • Shoes gone again!

Well there really can't be a value over 0.0 dB because that's the maximum. Use MC to analyze the audio and look at "Peak Level".

I just converted an album to 32-bit float and still -0.1 dB from the max like expected.
Logged
Matt Ashland, JRiver Media Center

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

Peak Level (Sample) hits +0.0dB, but Peak Level (R128) often goes over, as in the example shown above-
+0.3 dBTP; +0.2 Left; +0.3 Right

so another track, Peak Level (Sample) hits +0.0dB but  Peak Level (R128) will get to
+0.1 dBTP; +0.1 Left; +0.1 Right

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42734
  • Shoes gone again!

The R128 peak is after applying R128 processing. The value that matters for playback is Peak Level (Sample).
Logged
Matt Ashland, JRiver Media Center

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

I've been wondering about that
Logged

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 80

Before any processing, just upon Audio Analysis, is there a meaningful difference between Peak Level Sample -0.0 and Peak Level Sample +0.0? I often see either. Does the + indicate there is clipping, or are -0.0 and +0.0 effectively the same?
Logged
Pages: [1]   Go Up