jaakkopasanen / AutoEq

Automatic headphone equalization from frequency responses
MIT License
12.89k stars 2.47k forks source link

Feature request for autoeq.app and wiki for Linux/PipeWire, suggest EqualizerAPO ParametricEQ presets #700

Closed kode54 closed 9 months ago

kode54 commented 10 months ago

Is your feature request related to a problem? Please describe. https://github.com/wwmm/easyeffects/issues/2002#issuecomment-1680728599 From this issue comment I made a while back, and received a reply, apparently the Convolver plugin that EasyEffects uses doesn't really support the dynamic latency design of PipeWire, so I see garbage effects when the latency changes, such as sounds momentarily bypassing the convolver filter, causing large volume differences.

Describe the solution you'd like It appears that EasyEffects' Equalizer plugin does support dynamic latency properly, and it can import ParametricEQ preset text files using the "APO" button. It does also support a more obviously labeled "GraphicEQ" preset button, but does not support the massive number of bands present in the GraphicEQ presets offered by autoeq.app. However, the ParametricEQ presets seem better suited to this case, anyway.

Describe alternatives you've considered I'm not sure what other alternatives there really could be at this point, other than somehow fixing the convolver plugin to support rewinding the input and output stages of audio properly to support dynamic latency shifting. However, pointing users to the EqualizerAPO ParametricEQ presets and instructing them to import it into EasyEffects Equalizer using the "APO" button seems like an effective option.

Additional context In my case, some apps suddenly playing sounds, or starting new sound output, would cause the latency to shift a bit, and cause the convolver to produce unfiltered output in its stream, which resulted in the presets with large preamp reduction to introduce a burst of loud sound.

edwloef commented 9 months ago

This could be done by calling eqapo_graphic_eq with f_step = 1.2496 which would result in 32 bands with a greatest frequency of 19995. Alternatively, a matching value for f_step could be calculated for any n number of output bands with f_step = np.e ** (np.log(20000 / 20) / (n - 0.9999)) within eqapo_graphic_eq.

jaakkopasanen commented 9 months ago

Do we know how easy effects treats the APO outputs? I could customize the GraphicEQ.txt for EasyEffects to have 32 values but that's not very good precision. Parametric eq would probably be better.

edwloef commented 9 months ago

https://github.com/wwmm/easyeffects/issues/1808#issuecomment-1239810003 Apparently it's not identical but close to EQAPO

jaakkopasanen commented 9 months ago

@edwloef I see. The implementation is too crude right now for me to implement this in AutoEq. I left a comment in the issue thread.

jaakkopasanen commented 9 months ago

@kode54 @edwloef have either you tried to import EqualizerAPO ParametricEq files as is into EasyEffects? If that works, then I'll just make the EasyEffects eq app option in the web app to be standard parametric eq.

bhack commented 9 months ago

/cc @wwmm

edwloef commented 9 months ago

@kode54 @edwloef have either you tried to import EqualizerAPO ParametricEq files as is into EasyEffects? If that works, then I'll just make the EasyEffects eq app option in the web app to be standard parametric eq.

Yes, that works.

With this file:

Preamp: -4.65 dB
Filter 1: ON LSC Fc 105.0 Hz Gain 2.3 dB Q 0.70
Filter 2: ON PK Fc 55.9 Hz Gain -6.3 dB Q 0.78
Filter 3: ON PK Fc 144.3 Hz Gain -2.4 dB Q 2.87
Filter 4: ON PK Fc 199.7 Hz Gain 5.8 dB Q 2.53
Filter 5: ON PK Fc 939.3 Hz Gain -1.3 dB Q 3.43
Filter 6: ON PK Fc 2365.1 Hz Gain -1.7 dB Q 3.33
Filter 7: ON PK Fc 3546.0 Hz Gain 4.7 dB Q 3.56
Filter 8: ON PK Fc 4943.5 Hz Gain -3.0 dB Q 4.67
Filter 9: ON PK Fc 6688.1 Hz Gain -3.6 dB Q 3.08
Filter 10: ON HSC Fc 10000.0 Hz Gain -5.0 dB Q 0.70

this is the generated equalizer: image by using the APO button under "Import Preset". The filter mode is automatically set to APO (DR), which is what EqualizerAPO uses according to https://lsp-plug.in/?page=manuals&section=para_equalizer_x32_mono.

jaakkopasanen commented 9 months ago

Awesome! I'll make EasyEffects Parametric eq.

jaakkopasanen commented 9 months ago

Changed EasyEffects into parametric eq. Thanks for everyone who helped out here by reporting, commenting etc.

clintfred commented 7 months ago

In case anyone else finds this, I am still using the convolver because it can also apply autogain without having to add another effect stage. You can still find the appropriate Impulse (wav) file.

Start here: https://github.com/jaakkopasanen/AutoEq/tree/master/results