Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Clipping prevention (Read 4652 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Clipping prevention

I've read many posts about the solutions to avoid clipping in the best way, including some different points of view about the use of limiters.

I see that the option "use peak info to scale down tracks that still clip after applying replaygain" is useful when listening tracks with high dynamic but this kicks in only when replaygain is enabled. Why don't include options like the Musepack decoder/plugin ?

Something similar to:
replaygain off | clipping prevention track based
replaygain off | clipping prevention album based

I think that, at least for replaygained files, this would be a safe solution to avoid clipping wthitout the use of limiting.
Of course, for non replaygained files the limiter is the only solution.
Am i wrong ?
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1

Clipping prevention

Reply #1
The only problem is when you get a file that has very bad clipping.  The whole track is reduced to sometimes an almost unhearable volume, in which case a limiter would be better IMO.

Clipping prevention

Reply #2
And there are also some Mp3s with corrupted data that get a peak of 32768.000.
"You have the right to remain silent. Anything you say will be misquoted, then used against you."

Clipping prevention

Reply #3
Well, for me it would be extremely useful, because I use 'album based clipping protection' a lot when decoding to wav. So for mpc --prev --gain 1 and mp3gain with mp3 (and what about vorbis?). Foobar could be used as 'unified decoder'
I think that it would be better than limiter when playing (I don't have any corrupted mp3's ) and I would be useful for sure when decoding whole lossy compressed album.
--
pozdr.
yq

Clipping prevention

Reply #4
Does replaygain do anything that fiddling with the hardware's volume control doesn't do?

Clipping prevention

Reply #5
Quote
Well, for me it would be extremely useful, because I use 'album based clipping protection' a lot when decoding to wav. So for mpc --prev --gain 1 and mp3gain with mp3 (and what about vorbis?).

If i'm not wrong, Ogg-Vorbis Winamp plugin has a replaygain implementation similar to the current one in foobar2000, the plugin has an hard limiter, a preamp and a clipping protection that works only when replaygain is enabled. If replaygain is disabled (or absent) you must activate the 6dB hard limiter to prevent clipping.
Musepack implementation resolve the clipping issues without limiting the signal at all using RG peak levels, IMHO including this possibility in foobar would be a great thing.
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1

Clipping prevention

Reply #6
Quote
IMHO including this possibility in foobar would be a great thing.


I second that.
--
pozdr.
yq

Clipping prevention

Reply #7
Example of what I meant:

http://home.attbi.com/~billamral/clip.mp3
(about 250k 15 sec clip)

select "use peak info to scale..." and listen to the volume drop.
turn that off and use advanced limiter...

I admit...you really should not keep tracks with beeps like that though :-)

(there is no real downside to advanced limiter anyhow...it is "transparent" until clipping occurs...so may be a safe idea to have it running "just in case")

Clipping prevention

Reply #8
  Is this beep artificial or what? Or a frame was modified/damaged? Or mayby a bug in encoder? Can you provide not encoded version?

Quote
(there is no real downside to advanced limiter anyhow...it is "transparent" until clipping occurs...so may be a safe idea to have it running "just in case")


Yes, I know. And have it running all the time. But when decoding to burn CD I would still prefer clip protection based on peak info. (But I would have to remeber to check if my files don't have  57.8948 peak value )
--
pozdr.
yq

Clipping prevention

Reply #9
Quote
Is this beep artificial or what? Or a frame was modified/damaged? Or mayby a bug in encoder? Can you provide not encoded version?


It must have happened during the encode...I didn't place it there...could re-rip but not an option atm, my cd-drive is bork.

Just found it floating on my HD.

Clipping prevention

Reply #10
Quote
But I would have to remeber to check if my files don't have  57.8948 peak value

just check %__replaygain_track_peak% or do sth. like

$ifgreater($add(%__replaygain_track_peak%,%__replaygain_album_gain%),0,!Clip !,No clip)

Clipping prevention

Reply #11
Does it make "%__replaygain_track_peak% + %__replaygain_album_gain%" ? I don't know if it will work correctly, as peak is (max value/max possible to decode value) and gain is dB? But really I don't know.
--
pozdr.
yq

Clipping prevention

Reply #12
Quote
,Mar 9 2003 - 07:11 PM] If replaygain is disabled (or absent) you must activate the 6dB hard limiter to prevent clipping.

You should use the advanced limiter instead, which is a transparent look-ahead limiter.
It doesn't effect your music unless/until it clips.

Clipping prevention

Reply #13
Quote
Quote
,Mar 9 2003 - 07:11 PM] If replaygain is disabled (or absent) you must activate the 6dB hard limiter to prevent clipping.

You should use the advanced limiter instead, which is a transparent look-ahead limiter.
It doesn't effect your music unless/until it clips.

He was talking about winamp ogg vorbis plugin. And yes, the way the advanced limiter handles clipping is much better but anyway I still miss peak based clipping prevention a lot.
--
pozdr.
yq

Clipping prevention

Reply #14
Quote
You should use the advanced limiter instead, which is a transparent look-ahead limiter.
It doesn't effect your music unless/until it clips.

Yes, i know but i was talking about ogg vorbis plugin.
Nevertheless, i just noticed that, even with advanced limiter, the signal might clip.
What is the purpose of advanced limiter ? Avoid or reduce clipping to make it inaudible ?
The same track with soft clipping limiter is clipping free.

Of course, if the peak based clipping protection will be added (IMHO very useful to decode full albums with diskwriter), it should disable the DSPs because in this case we don't need neither limiters nor preamp.
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1


Clipping prevention

Reply #16
Quote
I just wonder... what have you done to make it "clip"?
preamping? gaining somewhere?

Nothing, the song is lossy coded (MPC) and it clips without gaining or preamping.
With advanced limiter enabled the number of possible clipped samples is only reduced (from 10658 to 3675).
Maybe the purpose of this limiter is to make clipping inaudible....
I think that should be quite easy to find similar tracks, in any cases i can provide a small sample on request.
WavPack 4.3 -mfx5
LAME 3.97 -V5 --vbr-new --athaa-sensitivity 1

Clipping prevention

Reply #17
I guess foobar2000 users might have the savvy to use mp3DirectCut to apply -48 dB gain to the beep (about 4 frames) and rescan the ReplayGain. It worked for me on your file (though I was warned about changing gain in a file with CRC on each frame)

Anyhow, I too would like to allow clip prevention only and a choice between album and track clip prevention. Does Foobar2000 currently apply the appropriate clip prevention (e.g. album clip prevention if you've selected album gain), or always track-based?

DickD.