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: why does pulling down volume slider not avoid clipping? (Read 5474 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

why does pulling down volume slider not avoid clipping?

Hi!

I've found a (for me) unexpected behaviour in foobar2000 concerning the volume slider at the right bottom of the interface. If I take an mp3 that wasn't clipping, add +12dB constant gain to it via mp3gain and then play it in foobar (it doesn't have ReplayGain information, of course! If it would, clipping would be avoided as expected), it of course clips as hell. BUT, when I pull down volume to -15dB or so it is _STILL_ clipping!

Does that mean that this slider works on 16-bit or so?? That's absolutely not what I expected. I expected it to work the same way as ReplayGain, just "manually".

I would have never found out if I didn't do this. Before I often used this slider to attenuate radio stations in the hope it would eliminate clipping, but now that I know about THAT I am just shocked     

Using foobar2000 v.0.9.4.5 on Windows XP SP2. I hope this behaviour can be changed because it's potentially ruining sound quality.
flac 1.2.1 -8 (archive) | aoTuVb5.7 -q 4 (pc, s1mp3)

why does pulling down volume slider not avoid clipping?

Reply #1
I think its like using preamp->poweramp...
replaygain is done in the preamp and volume regulation is done in the poweramp

why does pulling down volume slider not avoid clipping?

Reply #2
The volume slider controls the volume of the operating system, not foobar2000, and indeed operates on already-clipped data.

why does pulling down volume slider not avoid clipping?

Reply #3
An interesting finding. I can reproduce the behavior.

I have not had any real problems with how the volume control works now, but as a test I tried the same with my old installation of foobar 0.8.3 special. Its Volume Control dsp can prevent my "+12 dB" mp3 test file from clipping just fine.

The same difference can be seen with the equalizer. I adjusted all equalizer sliders to the maximum, +20 dB value and respectively reduced volume by 20 dB. Clipping was prevented in 0.8.3, but not in 0.9.4.5 or 0.9.5. beta 1.


The volume slider controls the volume of the operating system, not foobar2000, and indeed operates on already-clipped data.

No, it does not. At least not on my three different PCs. The volume sliders in the Windows or sound card specific mixer panels do not move and the other programs' volume level is not affected by the volume adjustments made with foobar2000's volume slider.

Edit: typo

why does pulling down volume slider not avoid clipping?

Reply #4
you should not confuse gain and volume

why does pulling down volume slider not avoid clipping?

Reply #5
Who should not confuse gain and volume? Me?

I am not confusing "gain" and "volume".

why does pulling down volume slider not avoid clipping?

Reply #6
The volume slider controls the volume of the operating system, not foobar2000, and indeed operates on already-clipped data.

No, it does not. At least not on my three different PCs. The volume sliders in the Windows or sound card specific mixer panels do not move and the other programs' volume level is not affected by the volume adjustments made with foobar2000's volume slider.


I can confirm this too, for the same reasons mentioned. You must be wrong about this, Garf. Volume adjustment is definitely done inside foobar2000 as it doesn't affect other apps.
flac 1.2.1 -8 (archive) | aoTuVb5.7 -q 4 (pc, s1mp3)

why does pulling down volume slider not avoid clipping?

Reply #7
You might have noticed that volume control now happens instantenously and not with a slight lag like in 0.8.x. This is one of the reasons why volume control now applies after the dsp chain and not within the dsp chain. It isn't intended to be used as clipping prevention anyway.

There are many more reasonable options to prevent clipping anyway, preamp, advanced limiter, hard limiter and replaygain clipping precention according to peaks come to mind for example. Certainly no need to be "shocked" by this behaviour.

why does pulling down volume slider not avoid clipping?

Reply #8
So really, because of speed you dropped quality?? And I always thought quality was foobars main goal!

Replaygain is impossible with streaming (radio). Advanced limiter and hard limiter don't really help, as they limit dynamic range, which is inacceptable to me. So the only thing that is useable for me is preamp. And to set this, you have to go through a number of menus.
flac 1.2.1 -8 (archive) | aoTuVb5.7 -q 4 (pc, s1mp3)

why does pulling down volume slider not avoid clipping?

Reply #9
I seem to recall users complaining continually about how foobar2000's volume control took seconds to change the volume. Now it works directly on the device, using the device's own capabilities to change the volume instantly. In the case of DirectSound, it can alter the volume of the particular channel.

You guys are taking pathological cases that are not at all representative of real-world use and attempting to claim that it is foobar2000's problem that clipping occurs. Not so. This is not foobar2000's problem. This is your use case's problem.

If this is so critical to you, it is possible (and also quite simple) to recreate the volume control DSP component. However, you're not going to find anyone who cares enough to do that. Picmixer is right. There are a great many sane ways to handle clipping in foobar2000. This volume control nonsense is not one of them.