IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Clipping prevention suggestion, Was:Thank you ...for having made Foobar
Pio2001
post Mar 28 2004, 23:54
Post #1


Moderator


Group: Super Moderator
Posts: 3936
Joined: 29-September 01
Member No.: 73



EDIT : jump to the suggestion

___________________________________

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 smile.gif, 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 smile.gif !

So thank you, Peter for having given us Foobar !
Go to the top of the page
+Quote Post
Pio2001
post Mar 29 2004, 00:32
Post #2


Moderator


Group: Super Moderator
Posts: 3936
Joined: 29-September 01
Member No.: 73



I'm a happy user smile.gif
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 !
Go to the top of the page
+Quote Post
picmixer
post Mar 29 2004, 00:40
Post #3





Group: Members
Posts: 1428
Joined: 10-April 03
Member No.: 5916



QUOTE (Pio2001 @ Mar 29 2004, 12:32 AM)
(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.

This post has been edited by picmixer: Mar 29 2004, 00:41
Go to the top of the page
+Quote Post
Pio2001
post Mar 29 2004, 00:46
Post #4


Moderator


Group: Super Moderator
Posts: 3936
Joined: 29-September 01
Member No.: 73



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.
Go to the top of the page
+Quote Post
Lyx
post Mar 29 2004, 11:18
Post #5





Group: Members
Posts: 3353
Joined: 6-July 03
From: Sachsen (DE)
Member No.: 7609



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.
Go to the top of the page
+Quote Post
Pio2001
post Jul 19 2004, 21:54
Post #6


Moderator


Group: Super Moderator
Posts: 3936
Joined: 29-September 01
Member No.: 73



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 ?
Go to the top of the page
+Quote Post
Peter
post Jul 20 2004, 13:10
Post #7


foobar2000 developer


Group: Admin
Posts: 3275
Joined: 30-September 01
Member No.: 84



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.
Go to the top of the page
+Quote Post
2Bdecided
post Jul 20 2004, 13:14
Post #8


ReplayGain developer


Group: Developer
Posts: 5101
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (Pio2001 @ Jul 9 2004, 8:54 PM)
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.

This post has been edited by 2Bdecided: Jul 20 2004, 13:17
Go to the top of the page
+Quote Post
2Bdecided
post Jul 20 2004, 13:16
Post #9


ReplayGain developer


Group: Developer
Posts: 5101
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (zZzZzZz @ Jul 20 2004, 12:10 PM)
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.
*


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.
Go to the top of the page
+Quote Post
bleh
post Jul 20 2004, 13:40
Post #10





Group: Members
Posts: 273
Joined: 9-August 03
From: MI, USA
Member No.: 8257



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.

Edit: Minor wording change

This post has been edited by bleh: Jul 20 2004, 13:41
Go to the top of the page
+Quote Post
PoisonDan
post Jul 20 2004, 14:00
Post #11





Group: Members (Donating)
Posts: 678
Joined: 10-December 01
From: Belgium
Member No.: 622



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.
Go to the top of the page
+Quote Post
Pio2001
post Jul 20 2004, 20:05
Post #12


Moderator


Group: Super Moderator
Posts: 3936
Joined: 29-September 01
Member No.: 73



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 sad.gif ).
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th August 2014 - 12:36