pulseaudio-equalizer-ladspa / equalizer

Pulseaudio LADSPA Equalizer
GNU General Public License v3.0
135 stars 15 forks source link

Flat preset *does* make sound louder #71

Open travnick opened 1 year ago

travnick commented 1 year ago

While enabling EQ with flat preset selected, then it sounds like whole volume is a little bit increased.

ghost commented 1 year ago

Could that be because by default the Preamp is set at the value of one (1)? Has anyone tried to manually modify any preset setting the preamp at zero or two or other value, and noticed any difference?

travnick commented 1 year ago

where I can find the preamp option?

ghost commented 1 year ago

It's the fourth field from the top, just above the preset name, in the preset files at /usr/local/share/pulseaudio-equalizer-ladspa/presets/ Example:

mbeq_1197
mbeq
Multiband EQ
2.0   <=== this one
Flat
15
0
0
travnick commented 1 year ago

I've created ~/.config/pulse/presets/Flat-tuned.preset, but preamp seem to have no effect (0, 1, 5, removed). In custom presets saved by equalizer, it's even empty.

ghost commented 1 year ago

Ah sorry, it was just an idea. Maybe the main equalizer code doesn't even take that field into account. But please do not remove the field completely, it will screw up everything as the fields are being read sequentially by position.

travnick commented 1 year ago

On the other hand I see strange difference, what's happening here? ~/.config/pulse/presets/kolumny_3.preset:

mbeq_1197
mbeq
Multiband EQ

kolumny_3
15
3.0
-9.0
-9.0
-6.0
-3.0
0.0
0.0
0.0
0.0
0
0
0.0
0.0
0.0
0.0
50
100
156
220
311
440
622
880
1250
1750
2500
3500
5000
10000
20000

~/.config/pulse/equalizerrc:

mbeq_1197
mbeq
Multiband EQ
1.0
kolumny_3
1
1
-30
30
15
3.0
-9.0
-9.0
-6.0
-3.0
0.0
0.0
0.0
0.0
0
0
0.0
0.0
0.0
0.0
50
100
156
220
311
440
622
880
1250
1750
2500
3500
5000
10000
20000
ghost commented 1 year ago

The second file uses a different sequence of fields, you shouldn't mess with that one. Some time ago while working on a Cinnamon applet driving this Equalizer I had decyphered its meaning but forgot all about it later on (bad memory, unfortunately).

travnick commented 1 year ago

Anyway, do you have any clue what's the reason of this behaviour and how to fix it?

edit: to be verified https://github.com/swh/ladspa/issues/70#issuecomment-896712748

ghost commented 1 year ago

No idea off the top of my hat. Will look into the hint presented in the comment you linked. The real fix should be a tad more elaborate than that though.

ghost commented 1 year ago

OK, had a brief look at the pulseaudio-equalizer script and it seems to override PA_PREAMP from the presets somehow, or better said doesn't take it into account. That, unless persistence (Keep settings) is enabled in Equalizer's settings. But even then there are some slight differences when the Preamp field is set to 0.5 in the preset file.

Please note the Preamp field in the presets should not exceed 1.0 as it will completely screw up the audio if the driver can't take amplification values higher than 100%.

For testing various settings you can run pulseaudio-equalizer log in a Terminal window and check the values for PA_PREAMP and/or other variables.

The issue has to be dug deeper into.

travnick commented 1 year ago

I'm kind of puzzled. For the first time I run the pulseaudio-equalizer log the PA_PREAMP was equal to 1.0. After modifying the preset file

mbeq_1197
mbeq
Multiband EQ

Flat-tuned
15

to

mbeq
Multiband EQ
0.5
Flat-tuned
15

PA_PREAMP is equal to 0.5 regardless of equalizer being enabled, disabled, and the value in the preset, or if any other preset is selected.

ghost commented 1 year ago

That's the result of settings persistance I guess. Honestly I don't fully understand equalizer's behavior either. There is something not quite logic there but can't pinpoint it. You may wanna enable a different preset that has PA_PREAMP equal to 1.0 and toggle the settings persistence checkbox in the EQ GUI, see if that brings the value back to 1.0.