# Method for Resonant Frequency Attenuation in Dynamic Audio Equalizer
## 2 Materials and Methods
### Input Signal Preprocessing  
Within the context of an audio plug-in, the input signal is expressed as a finite digital signal. This signal is represented in floating point format, with values between \(-1\) and \(1\) with levels depending on the bit depth. The signal is represented as a matrix of N samples for each of the audio channels. For monophonic signals, this is one channel; for stereophonic signals, this is two channels. This matrix is known as the input buffer. The number of samples depends on the buffer size (N) determined by the user in the audio interface and in the digital audio workstation (DAW) where the plug-in is hosted. The size of the input buffer is typically one of the following values: 128, 256, 512, or 1024 samples. Buffer size is defined based on computing power and latency. Low buffer sizes result in lower latency but more processing power, while high buffer sizes result in higher latency but less processing power. Once the signal has been stored in the input buffer, the data are transferred to a vector (referred to as the analysis buffer) with a greater number of samples than the input buffer. This vector is utilized for further processing. The analysis buffer was designed to contain a greater number of samples than the input buffer in order to have more information from the input signal for analysis. The size of the analysis buffer was set to 4096 samples, which is a multiple of the common input buffer sizes. The greater the number of samples analyzed, the greater the resolution between frequencies. The analysis buffer stores the input signal in a manner that considers only one channel. When the signal is monophonic, the stored values are identical to those of the input signal. Conversely, in the event that the signal is stereophonic, the buffer stores only the central portion of the signal, which is obtained by averaging the values present in the left and right channels. The analysis buffer still contains values between \(-1\) and \(1\) in floating point as it is a representation of the input signal. The initialization of the analysis buffer is set to zero. The analysis buffer is segmented into blocks of dimensions identical to those of the user-defined input buffer. The data are transferred by shifting the analysis buffer through a cycle with \(M\) steps, where \(M\) corresponds to the number of blocks in the analysis buffer. In cases where the input buffer contains 128 samples, \(M\) will be 32, while in instances where the input buffer comprises 1024 samples, \(M\) will be 4, as shown in Figure 2. This process results in the second block being stored in the first, the third in the second, and so on, until the last block is stored in the penultimate one. In the final block, the input buffer is stored, containing the current signal and the past samples. The Discrete Fourier Transform (DFT) of the signal stored in the analysis buffer is obtained using the FFT algorithm. The Fast Fourier Transform (FFT) was computed using MATLAB R2022a FFT function. The function accepts an input array x with double, single, or int format values and delivers the frequency domain representation returned as a vector. In this case, the function returns an array of complex numbers, representing each complex exponential by discrete frequencies. Subsequently, the magnitude spectrum of the signal is obtained by calculating the magnitude of each complex exponential. Furthermore, the  
Figure 1: A general block diagram of the system. non-reflected spectrum is obtained in order to have a representation of the signal from the origin to the Nyquist frequency. The magnitudes of the complex exponentials obtained in the FFT are subsequently normalized by dividing each amplitude by the total sample value, thereby ensuring that the magnitude spectrum is within the range of zero to one. Figure 3 shows in the first section the analysis buffer of a part of some audio corresponding to a voice; in the second section, the spectrum of the signal is shown.