Internals of Equalization
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
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.
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.
Re: Internals of Equalization
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: Internals of Equalization
I'm not a freakin' programmer.
Re: Internals of Equalization
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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: Internals of Equalization
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?steve wrote: ↑Wed Aug 08, 2018 10:44 amYou 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.
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.
- 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.
- 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.
Re: Internals of Equalization
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
More information about window functions on Wikipedia: https://en.wikipedia.org/wiki/Window_function
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: Internals of Equalization
Indeed. But have you tested replacing Hanning in Equalizer with another window function to test quality?steve wrote: ↑Thu Aug 09, 2018 8:08 amThe 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
Re: Internals of Equalization
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.Piotr Grochowski wrote: ↑Thu Aug 09, 2018 8:14 amBut have you tested replacing Hanning in Equalizer with another window function to test quality?
The source code is available, so you are free to experiment if you wish to do so.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: Internals of Equalization
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.
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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)