Attenuation Effects
6.2 Equalizer Effect
padding size 23 is added to the latter term:
gs[n] = (Q1.47) + (Q1.47) (6.8)
This verifies that the correct notation can be used in the algorithm and the assumed Q fixed point notation was properly placed.Once gs[n] is calculated, it is multiplied to the original input signal x[n] yielding the output y[n].
y[n] = x[n] ∗ gs[n] (6.9)
This signal chain was simulated via a test bench with a monotone signal with increasing amplitude to test the noise compression over different ranges. The simulation in Figure 6.4 verifies that when the incoming audio signal is below the threshold for a set hold time, the signal is attenuated in a roll off fashion as well as when the signal recovers and is greater than the threshold.
Figure 6.4: Noise gate test bench simulation
6.2 Equalizer Effect
Guitar effects can often add unwanted signal imaging into the desired signal. These signals fall into three broad categories depending on their frequency spectrum. A guitar that is tuned to
6.2 Equalizer Effect 52
standard E tuning at A440 will have a dynamic audio range from 80Hz to 1200Hz excluding natural harmonics past 1200Hz. This broad range of frequencies is broken down into three main sub regions: low, medium, and high frequencies. The standard music terminology calls low frequencies bass, medium frequencies are called mids, and high frequencies are called treble [38]. Within each of these three sub categories, musicians can break down the ranges even further. This project scope only centers around equalizing bass, mids, and treble as demonstrated in Figure 6.5. In some cases, a bright and crisp (mids and treble) sounding signal can be come dark and muddied (bass) after passing through distorting effects. In cases like this it is desirable to equalize the incoming signal before the distortion effect and drop amplitude of the frequencies in the bass region so when the distortion effect is applied, the overall frequency response is much flatter. Conversely, the EQ could also be used to boost the mids and the treble in order to account for the increase in the bass response [39, 40]. Equalizers are also used to account for issues when playing in certain environments and rooms or even to make the voicing of the guitar sound different. An example of the latter would be to make a humbucker pick up sound like a single coil pick up by dropping the bass and the treble while boosting the mids.
Figure 6.5: Equalizer Block Diagram
There is no definitive acceptance for the range of values associate with bass, mids, and
6.2 Equalizer Effect 53
treble; however most sources give a range of values. A general guide line for most amp man-ufactures has a bass response from 20Hz-300Hz, a mids response is typically centered around 600-700Hz, and a treble response contains 1200Hz and up. Different guitar tuning and tonali-ties of the instrument will give varying frequency responses so the design of this effect sought to stay close to these design criterion. This effect will use the three bands of frequencies and generate the corresponding filters with the three user inputs corresponding to the gain applied to the outputs from the filter banks. The gain parameters will have a Q0.8 format and then the resulting accumulations will be summed together and result in the output of the algorithm.
MATLAB DSP tool box was used to create the necessary digital filters as well as evaluate their performance between fixed point implementation and floating point. MATLAB filterBuilder UI was then used to create the desired filter and create the HDL code to implement the nec-essary filtering. The Xilinx Zynq 7020 has 220 DSP slices which limits the overall filter sizes in addition to the performance of the filter roll off. The goal to design each of the three filters was to keep the DSP slice count under 50 units per filter which would still leave more than enough DSP slice resources for the other effects being implemented with less rigorous filtering requirements. The filter taps will all use a Q12.0 fixed point format and a symmetric FIR filter topology in order to minimize resource usage.
The low-pass filter for bass response shown in Figure 6.6 was designed to pass frequencies with a 1db pass band ripple and a 20dB attenuation in the stop band at 600Hz. This filter resulted in a total DSP slice utilization of 47 units and a 92 tap FIR filter. The band-pass mids filter was designed and shown in Figure 6.7 to have a 20dB attenuation at DC and 1600Hz with a .1dB ripple in the pass band from 600Hz to 800Hz. This filter also utilized a symmetric FIR topology and had a DSP slice utilization of 58 units and a total of 127 taps. Lastly, the high-pass treble filter was designed and demonstrated in Figure 6.8 to have a 20dB attenuation in the stop band up to 800Hz and a .1dB pass band ripple above 1600Hz. The filter utilizes a
6.2 Equalizer Effect 54
direct for symmetric FIR filter with a DSP slice utilization of 45 units and a total of 90 taps.
All of the filter frequency responses are presented for their ideal float point representation and their quantized response. All critical frequencies selected for the equalizer are grouped together in Table 6.3
Table 6.3: Filter Specifications for EQ Filter
Filter Type Fpass1[Hz] Fpass2[Hz] Fstop1[Hz] Fstop2[Hz] Pass Band Ripple
[dB]
Stop Band At-tenuation
[dB]
Bass LPF 0 N/A 600 N/A 1 20
Mids BPF 600 800 DC 1600 .1 20
Treble HPF 1600 N/A 800 N/A .1 20
Figure 6.6: Low-pass bass filter response
6.2 Equalizer Effect 55
Figure 6.7: Band-pass Mids filter response
Figure 6.8: High-pass Treble filter response
6.2 Equalizer Effect 56
Figure 6.9: Equalizer filter response
When the three filters are plotted together using the MATLAB fvtool command and shown in Figure 6.9, it can be seen that the filters create a fairly flat frequency response in the oper-ating frequency of the guitar.The HDL generated files from the MATLAB filter design were then called in the equalizing algorithm. Various test cases were used to verify the filters per-formance using a generalized input case of low, medium and high frequencies. The simulation in Figure 6.10 verifies that the filters are able to attenuate frequencies out of their respective pass bands as well as pass the frequencies in the desired pass bands. The simulation output shows three test cases: only bass, only mids, and only treble.
6.2 Equalizer Effect 57
Figure 6.10: Equalizer Algorithm HDL Simulation