jaakkopasanen / AutoEq

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

Question on Sampling rate #760

Closed hiiamboris closed 4 months ago

hiiamboris commented 5 months ago

Hi! About 10 years ago I though "why don't we have a website with EQ for every headphone?!". You basically made one of my dreams come true :) Thanks for that a lot.

But I have a question. Why does AutoEQ produce filters with different parameters depending on the sampling rate? Very non-obvious that there should be a dependence, and I don't recall my custom EQ tunings sound off when I switch the rate. Can you explain the technicalities please? 🙏

markanini commented 5 months ago

It's due to the nature of non-oversampling digital filters. Such a filter setup is used in EqualizerAPO, which AutoEQ targets. The fact that AutoEQ anticipates this is actually clever and ensures consistent results. Googling EQ will give you more in depth explanation if you need it. You can also look at a frequency graph and observe how filters change their shape when approaching the highest frequencies.

hiiamboris commented 5 months ago

@markanini Thanks! Do you know a resource that covers this in depth?

markanini commented 5 months ago

@markanini Thanks! Do you know a resource that covers this in depth?

I meant to say, google EQ cramping, you will get a large number of results pertaining to this specifically.

hiiamboris commented 5 months ago

OK that means that for all those years PeaceEQ was drawing a misleading EQ plot, only fixed recently! Good to know :)

One thing I still don't get. If discrepancies in AutoEQ are only due to cramping, I shouldn't see any difference between 96,192 and 384kHz, because Nyquist frequency then is over 48kHz, far beyond where it can affect the audible frequencies. That doesn't seem to be the case, and all frequencies are affected:

jaakkopasanen commented 4 months ago

The explanations here are correct. The "cramping", however, can affect frequencies way below Nyquist frequency. The effect is small though and I've done in AutoEq what reasonably can be done. The accuracy at high frequencies is not high enough in the first place that what remains of the problem should be a real concern. The difference in headphone frequency responses between individual listeners deviates 20 dB above 10 kHz. In priciple I could just remove the whole sample rate selector to avoid confusing the user with things that don't matter in practice.

hiiamboris commented 4 months ago

OK thanks! I guess since 48k is really not so far from 20k on log plot, basically slight cramping-related changes in the filter shape together with the high tolerance you're using on trebles propagate filter to filter throughout the whole spectrum and result in optimization algorithm choosing completely different filter centers. After some thinking it makes sense to me now.

hiiamboris commented 4 months ago

The difference in headphone frequency responses between individual listeners deviates 20 dB above 10 kHz.

Are you referring to ear canal length resonances (and for over-ear models reflections from the ear itself) or something else is at play as well?

jaakkopasanen commented 4 months ago

The difference in headphone frequency responses between individual listeners deviates 20 dB above 10 kHz.

Are you referring to ear canal length resonances (and for over-ear models reflections from the ear itself) or something else is at play as well?

I'm not 100% sure of all the contributing factors but geometry (ear canal and pinna) and acoustic impedance and up there.