Skip to main content

Topic: Clipping prevention suggestion (Read 4484 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Pio2001
  • [*][*][*][*][*]
  • Global Moderator
Clipping prevention suggestion
EDIT : jump to the [a href=#entry227318]suggestion[/a]

___________________________________

I just wanted to say thank you !

Foobar have been installed for monthes on my computer... since I bought MP3s from E-Music and needed gapless playback in fact...

But now I have completely migrated from Winamp 2 to Foobar, and its features are amazing.

Since there is no more parametric equalizer (I user Shibatch super equalizer), I created an impulse response with Winamp Disk Writer and loaded it into Foobar Convolver ! Works like a charm. Great component.

I customized the playlist color to remind me of Winamp...
...and for the first time, I can clearly see where I am in my playlist  , thanks to the title formatting feature.

My directory structure is
"Artist -- Year -- Album", exept for compilation, "Compilation", or Soundtracks "Movie soundtrack", or some other exeptions. So that everything can be easily found alphabetically.

Just to tell you that you did not include all the formatting instructions in vain, because I found them very useful, see :

$num(%_playlist_number%,$len(%_playlist_total%)).
$if2(%artist%,unknown artist)
$tab(2)
$if2(%title%,%_filename_ext%)
$tab(3)
$ifgreater($strstr($right(%_directoryname%,$sub($sub($len(%_directoryname%),$strstr(%_directoryname%,'--')),2)),'--'),1,$right(%_directoryname%,$sub($sub($len($right(%_directoryname%,$sub($sub($len(%_directoryname%),$strstr(%_directoryname%,'--')),2))),$strstr($right(%_directoryname%,$sub($sub($len(%_directoryname%),$strstr(%_directoryname%,'--')),2)),'--')),2)),$ifgreater($strstr(%_directoryname%,'--'),1,$right(%_directoryname%,$sub($sub($len(%_directoryname%),$strstr(%_directoryname%,'--')),2)),%_directoryname%))
$tab(4)
$if(%_isplaying%,'|] ')
[['['$if2(%__codec%,$upper($ext(%_path%)))']' ]$pad_right(%_length%,5,0)]

Loool !
In english, the third monstrous field means :
"If the directory name has an "A -- B -- C" structure, then display C, else if it has an "A -- B" structure, then display B, else display A"
And it works  !

So thank you, Peter for having given us Foobar !
  • Last Edit: 19 July, 2004, 05:00:15 PM by Pio2001

  • Pio2001
  • [*][*][*][*][*]
  • Global Moderator
Clipping prevention suggestion
Reply #1
I'm a happy user
I just noticed that the volume control works before the end of the decoding and can be used as a clipping prevention ! Until there is a replaygain clipping prevention (based on album peak), I can set the volume process to -2 db so as to avoid problems.
(I don't use replaygain, because I don't want to output -10 db digital to my external converter, and into the hifi).

Thank you again !

  • picmixer
  • [*][*][*][*][*]
Clipping prevention suggestion
Reply #2
Quote
(I don't use replaygain, because I don't want to output -10 db digital to my external converter, and into the hifi).

Thank you again !

Hmh, you could work around that by using replaygain after all and simply adding a few db to the preamp for replaygained files.  That would give you the option to use replaygain and avoid the lowered output level.

Simply experiment around a bit and try to find a value that doesn't clip for you.  You can enable clipping warnings in the console to do so.
  • Last Edit: 28 March, 2004, 06:41:03 PM by picmixer

  • Pio2001
  • [*][*][*][*][*]
  • Global Moderator
Clipping prevention suggestion
Reply #3
If it doesn't detect clipping automatically, I don't see the advantage compared to my current method.

Edit : Replaygain detects clipping once enabled, I know, and I'll end up with something like this eventually.
  • Last Edit: 28 March, 2004, 06:48:15 PM by Pio2001

  • Lyx
  • [*][*][*][*][*]
Clipping prevention suggestion
Reply #4
another way you may want to try is going into the preferences to the "playback" page. There, you can set the "preamp" for files without replaygain-info. I've set it to lower the volume a bit on all non replaygained files, to avoid clipping.
I am arrogant and I can afford it because I deliver.

  • Pio2001
  • [*][*][*][*][*]
  • Global Moderator
Clipping prevention suggestion
Reply #5
Encouraged by 2BDecided ( http://www.hydrogenaudio.org/forums/index....ndpost&p=227165 ), I bump this thread in order to suggest the addition of clipping prevention based on replaygain peak album value, but without applying any replaygain correction.

The purpose would be to prevent clipping during the playback of lossy files for people who don't want to use replaygain.
It can be useful in order to burn audio CD from lossy files, for example. Replaygain is not useful when a full album is burned on CD, but clipping prevention is needed in order to avoid distortion. The current preferences don't allow to prevent clipping like this. Either you apply replaygain, either your files clip.

The final result would just change the "playback" part of the preferences. The current checkbox Use peak info to scale down tracks that still clip after applying replaygain should be changed into Use album peak info to scale down tracks that clip after decoding.

It means two internal changes :
-Use album peak instead of track peak
-Activate regardless of the replaygain mode. Do not restrict its action to replaygain being activated.

What do you think ?

  • Peter
  • [*][*][*][*][*]
  • Administrator
Clipping prevention suggestion
Reply #6
I think I'll add that for next big release. For now, you can enable album RG mode (or track mode to use track peak instead of album peak), enable "use peak info..." and set very high preamp, so you basically get album-level (or track-level) peak normalization.

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Clipping prevention suggestion
Reply #7
Quote
What do you think ?


I think yes, but knowing what people are like, you actually need a drop down menu (sorry!) like this:

Clipping prevention:
1. Off
2. by track
3. by album

...independent of ReplayGain (but using the peak value stored alongside ReplayGain, obviously)

Cheers,
David.
  • Last Edit: 20 July, 2004, 08:17:44 AM by 2Bdecided

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Clipping prevention suggestion
Reply #8
Quote
I think I'll add that for next big release. For now, you can enable album RG mode (or track mode to use track peak instead of album peak), enable "use peak info..." and set very high preamp, so you basically get album-level (or track-level) peak normalization.
[a href="index.php?act=findpost&pid=227479"][{POST_SNAPBACK}][/a]


No, that doesn't work - because not only does it bring the clipping tracks down (which is whaty Pio wants) but it also bring non-clipping tracks up! Which isn't wanted in this case.

Cheers,
David.

  • bleh
  • [*][*][*][*]
Clipping prevention suggestion
Reply #9
Actually, no, it won't bring the other tracks up.  The peak info option is used to scale whichever type of info is currently being applied, so if you're using album gain, it'll bring down all of the tracks based on the album peak.  I just tested this with two tones, one full-scale, one with an amplitude of around 0.2, and the quiet track maintained the same amplitude even though I had the preamp turned up to +12 dB.

[span style='font-size:8pt;line-height:100%']Edit:  Minor wording change[/span]
  • Last Edit: 20 July, 2004, 08:41:58 AM by bleh

  • PoisonDan
  • [*][*][*][*][*]
  • Members (Donating)
Clipping prevention suggestion
Reply #10
I think David meant it will bring non-clipping albums up.

Anyway, if you use the method zZzZzZz described with a quiet, non-clipping album the volume will be increased, which is probably not what Pio2001 wants.

Well, I guess you could manually try this workaround for each album individually: scan the album for replaygain, and use the album gain value as the preamp value (with inverted sign, of course).

E.g., if the album gain is -8.5, move the preamp slider ("Files with RG info") to 8.5 dB, and then check the "use peak info to scale..." option.

This method of course implies that you have to do a lot of manual work, but it may be acceptable as a workaround until the "next big release" of Foobar2000 is out.
Over thinking, over analyzing separates the body from the mind.

  • Pio2001
  • [*][*][*][*][*]
  • Global Moderator
Clipping prevention suggestion
Reply #11
Thank you for your interest in this matter.
For what it's worth, my current method is simply to set the volume DSP to -2 db. Clipping at -2 db is rare enough not to worry about. The several cases that I found were not audible, while regular clipping, at 0db, is often audible (ABX and samples on request, though I've not got very much time currently  ).