jaakkopasanen / AutoEq

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

Why is this step necessary?“Shift error by it's mean in range 100 Hz to 10 kHz” #697

Closed Jinbiao-Liu closed 9 months ago

Jinbiao-Liu commented 10 months ago
# Set error
        self.error = self.raw - self.target
        if min_mean_error:
            # Shift error by it's mean in range 100 Hz to 10 kHz
            delta = np.mean(self.error[np.logical_and(self.frequency >= 100, self.frequency <= 10000)])
            self.error -= delta
            self.target += delta
autoeq_set-error
jaakkopasanen commented 9 months ago

Removing the "DC bias" of frequency response (error) ensures there is a balanced amount of boosts and cuts in the eq profile. It's not really super crucial but might make it a bit neater for the parametric eq optimizer generate the filter parameters.