EQ (equalization) adjusts relative levels of different frequency spectrum parts in audio.
Sound waves are vibrations over time; frequency is vibrations per second.
Musical instruments produce fundamental frequency, overtones, and percussive elements for timbre.
EQ changes balance between fundamental, overtones, and percussive elements in a sound.
The following is a program to equalize audio digitally.
It allows setting various parameters such as gains and filter characteristics.
The calculate_filters method computes the filter coefficients for low-pass, high-pass, and band-pass filters based on user-defined parameters.
The apply_equalization method applies the equalization to an input audio signal using the calculated filter coefficients and user-defined gains.
We can visualize the frequency response of the filters before and after equalization.
The equalized audio data is played using the sounddevice library after each round of user input.
The code is structured to encourage user interaction, allowing real-time adjustments to the equalizer parameters and immediate feedback through frequency response plots and audio playback.