wwmm / easyeffects

Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications
GNU General Public License v3.0
6.43k stars 268 forks source link

Equalizer Preamp/input volume doesn't correctly mix with equalizer offset values #3177

Open jelazual opened 3 months ago

jelazual commented 3 months ago

EasyEffects Version

7.6.1

What package are you using?

Arch (easyeffects)

Distribution

Arch

Describe the bug

Input volume/preamp on equalizer doesn't correctly apply to equalizer gain values, resulting in clipping when positive gain values are applied in the equalizer regardless of negative input gain.

Expected Behavior

Negative gain on input volume should allow for positive gain in equalizer offsets without introducing artifacts.

Debug Log

No response

Additional Information

It's been that way since the start afaik, but I work around it by using only negative offsets in equalizer, which produces sound without clipping artifacts. But, websites like AutoEQ provide profiles with positive offsets and negative gain on preamp, resulting in poor sound quality with easyeffects.

wwmm commented 3 months ago

Input volume/preamp on equalizer doesn't correctly apply to equalizer gain values, resulting in clipping when positive gain values are applied in the equalizer regardless of negative input gain.

Please show an image of the controls. It is not totally clear what you mean by not correctly applied.

But, websites like AutoEQ provide profiles with positive offsets and negative gain on preamp, resulting in poor sound quality with easyeffects.

You do not have to use exactly the same preamp values. And considering that those profiles were made using a different equalizer playing audio to a different device in most cases trying to replicate the same preamp settings won't even make sense.

wwmm commented 3 months ago

Negative gain on input volume should allow for positive gain in equalizer offsets without introducing artifacts.

And they do if the appropriate value is chosen. Like I said before it is not the same equalizer as the one used in AutoEq or APO even if the LSP plugin we use has an APO mode to make things closer. Some adjustment to the preamp values will be necessary.

jelazual commented 3 months ago

image image

These ones. Lowering input by 20 and increasing gain on a bell curve by 7 results in the same clipping as lowering input by 0 and increasing gain on a bell curve by 7. This effectively makes input and output do the same thing, which seems like it's probably not intended, as they're separate controls.

wwmm commented 3 months ago

Lowering input by 20 and increasing gain on a bell curve by 7 results in the same clipping as lowering input by 0 and increasing gain on a bell curve by 7.

Humm... I do not see this happening here on my computer. An input gain of -20 dB here makes a huge change to the signal level. Kill EE easyeffects -q and restart it in debug mode G_MESSAGES_DEBUG=easyeffects easyeffects. Maybe some clue will be in the logs.

jelazual commented 3 months ago

The overall levels are fine, the issue is that positive gain on the equalizer produces the artifacts of clipping, as though the input is clipping the output post-equalization, resulting in lower frequencies essentially squashing the volume of higher frequencies. This should only happen if the negative input is less than the highest peak of the equalizer gain, but it happens at any input gain. Since the EQ is based on bellcurve offsets, though, it's hard to make a 1:1 comparison of neutral and adjusted neutral with negative input gain.

Actually, it might just be that the logic for equalization it's self is introducing these artifacts. Using positive a low shelf at 22khz and negative input gain produces high volume but very strange and very wrong sound. Any EQ With a positive gain on one of the bands seems to produce low quality sound, though. It seems I'm probably wrong on what's actually going on here.

wwmm commented 3 months ago

The overall levels are fine, the issue is that positive gain on the equalizer produces the artifacts of clipping, as though the input is clipping the output post-equalization, resulting in lower frequencies essentially squashing the volume of higher frequencies. This should only happen if the negative input is less than the highest peak of the equalizer gain, but it happens at any input gain. Since the EQ is based on bellcurve offsets, though, it's hard to make a 1:1 comparison of neutral and adjusted neutral with negative input gain.

Actually, it might just be that the logic for equalization it's self is introducing these artifacts. Using positive a low shelf at 22khz and negative input gain produces high volume but very strange and very wrong sound. Any EQ With a positive gain on one of the bands seems to produce low quality sound, though. It seems I'm probably wrong on what's actually going on here.

Do you see EasyEffects showing its clipping warning (bottom bar left corner)? Does inserting a limiter at the end of the pipeline makes the clipping noise go away? IF not then something different than clipping is causing the noise.