Dips in a headphone frequency response are a problem for equalization because a naive approach would "fix" them the by producing a narrow (high Q) spike in the equalizer frequency response at the same frequency. These narrow spikes are not wanted though because they introduce ringing. Dips are also not very audible, so a trade between ringing and fixing the frequency response doesn't serve us well in this case. Therefore it's better to leave the dips alone. Unfortunately there are no good existing solutions to this problem, or at least any that I would know of.
Here's an equalizer frequency response for Beyerdynamic DT 770 without any smoothing or reqularization for the spikes. Those 4 kHz and 9 kHz ones do not sound good.
Any kind of smoothing tricks are not going to help here since they are all affected by the depth of the dip / height of the peak. It doesn't matter if the peak would naively be 10 dB or 30 dB, it needs to be avoided all the same. The width of the dip does play a role however, wider the dip the more it needs to be equalized because wider means less ringing and a more audible error in the frequency response.
I came up with a novel reqularization algorithm to address this problem. The peaks in the equalizer requency response are limited by the steepness of the slope (first derivative). This approach produces the same result regardless of the dip height but produces more correction for wider dips. Let's take a look at the same DT 770 equalizer frequency response with reqularization.
Here the dashed green curve is the same naive equalizer frequency response and the orange curve is the reqularized one. The naive frequency response is first smoothed to avoid problems caused by noisy artifacts and then traversed left to right and right to left. In both directions the slope is limited to 18 dB per octave. The smaller value of the two curves is the selected at each frequency and finally sharp kinks are rounded by smoothing the curve. The graph above also shows the areas where the slope has been limited. Blue areas for left to right traversal and red aread for right to left traversal. The green areas are excluded from the limited slope. This is done to avoid widening narrow dips in the equalizer frequency response. A better example of this is Adam SP-5.
Pay attention to the 6 kHz dip. Without the green zone, the orange curve would have a much wider dip there. Dips in the frequency response don't cause ringing so there's no need to limit them in any way.
So how does this sound then? A lot better, if you ask me. I own 80 ohm DT 770, Sennheiser HD 800 and Custom Art FIBAE 3 headphones, all of which have some kind of dips in the frequency response (HD 800 only has the 9 kHz one which should be there) and I clearly prefer the reqularized equalization to the one with only smoothing.
I encourage you to test it out for yourself, assuming you have headphones which have these problems, not all do. The current state of AutoEq results has the
reqularized eq settings and the Git history holds the
old results.
I believe this new algorithm concludes my search for automatic headphone equalization. There are some things still to do however. The 18 dB per octave limit is somewhat arbitrarily chosen. It's the maximum slope in a parametric filter with 10 dB of gain and Q of 2.0. I did some testing to compare 18 dB/oct vs 24 dB/oct vs 12 dB/oct but the test wasn't blind so cannot really say anything conclusive. 18 dB/oct is more relaxed than 24 dB/oct and 12 dB/oct tends to produce problems because it starts to cut things which should not be cut. We eyeballed the debug plots with oratory1990 and it looks like 18 dB/oct produces somewhat similar reqularization as he has been doing manually. I still want to conduct a proper double blind listening test with a decent population to have more data for the decision.
Parametric equalizers are not completely solved with this new algorithm. AutoEq has an algorithm to produce parametric eq settings by searching for an optimal combination. While the search target is now good, the end result might still contain parametric filters with positive gain and too high Q values. The parametric eq optimizer in AutoEq is a very creative creature and might produce things we humans can't think of. This will be solved later time when I implement a Q reqularization specifically for the parametric eq filters.
I hope you enjoy the new settings and if there are any questions, leave a comment and I'll try my best to clarify. Happy listening!