Internals of Equalization

My guess is that Equalization works like this:

  1. Do inverse fast fourier transform on the frequency response.
  2. Window it with an unknown windowing function.
  3. Convolute with every sample.

But what windowing function does it use? Here are some examples:

  1. Rectangle
  2. Triangle
  3. Parzen
  4. Sine
  5. Hann
  6. Hann squared
  7. Hamming
  8. Hamming squared
  9. Hamming^2.5
  10. Dolph–Chebyshev

It would be nice to allow various windowing functions. One might be curious what would be the quality of Equalization with Dolph–Chebyshev window.

See: https://github.com/audacity/audacity/blob/master/src/effects/Equalization.cpp

I’m not a freakin’ programmer.

You don’t need to be a freakin programmer to read the comments at the top of the file.

\class EffectEqualization
\brief An Effect that modifies volume in different frequency bands.

Performs filtering, using an FFT to do a FIR filter.
It lets the user draw an arbitrary envelope (using the same
envelope editing code that is used to edit the track’s
amplitude envelope).

Also allows the curve to be specified with a series of ‘graphic EQ’
sliders.

The filter is applied using overlap/add of Hanning windows.

So it uses Hann windows repeated every half of window size, then filters in FFT to the user defined frequency response before combining the Hanns?

What if you use one of these windows to reduce spectral leakage? It contains some promising cosine sum windows:

2–term:

  • Hanning has -31dB peak sidelobe and -18dB decay per octave. It’s currently used.


  • Hamming has -43dB peak sidelobe and -6dB decay per octave.

3–term:

  • Error has -47dB peak sidelobe and -30dB decay per octave.


  • Error has -64dB peak sidelobe and -18dB decay per octave.


  • Error has -71dB peak sidelobe and -6dB decay per octave.

4–term:

  • Error has -61dB peak sidelobe and -42dB decay per octave.


  • Error has -83dB peak sidelobe and -30dB decay per octave.


  • Error has -93dB peak sidelobe and -18dB decay per octave.


  • Blackman–Nuttall has -98dB peak sidelobe and -6dB decay per octave.

The choice of Window function is in most cases, a compromise between different properties, such as the frequency resolution, dynamic range, SNR losses, computational efficiency …
More information about window functions on Wikipedia: https://en.wikipedia.org/wiki/Window_function

Indeed. But have you tested replacing Hanning in Equalizer with another window function to test quality?

I haven’t personally done so, and I have no interest in doing so as I don’t see any evidence to suggest that there is a problem to fix.
The source code is available, so you are free to experiment if you wish to do so.

Are you sure I can run the source code in Android?

Are you just trying to waste my time?
I did not say anything about Android.

It is possible to run C++ on Android, but Audacity code will not run on Android without a lot of modifications because Audacity has many dependencies that are not available on Android.

HELL NO!!!

I admit you didn’t know that my PC has broken system beyond repair.