Professional Documents
Culture Documents
Module by: Alex Mrozack. E-mail the author Summary: Description of how to use frequency binning to apply frequency gains analogous to a graphic equalizer in MATLAB. The main focus of a graphic equalizer is to manipulate different bands of frequencies, and then reconstruct them. Therefore, to manipulate the frequencies, a group of samples were taken, and the Fast Fourier Transform of the sample set was computed. In order to maximize the efficiency of the FFT, a sample set of a power of two was used. FFTs maximize symmetry in the Discrete Fourier Transforms and are best able to do that for signals of power of two lengths. Hence a refresh rate such that 2048 samples were taken in was chosen. Once the signal is put into the Fourier domain, we then need to separate the frequencies into the desired bands so that they can be displayed, operated on, and then be displayed in their updated state. To do this we used a binning matrix. The matrix binned according to a logarithmic Q binning pattern. This means it puts the first and 2048th frequency in the first bin, the second, third, 2047th and 2046th frequencies in the second bin and so on and so forth. The matrix below is an example of how a bin matrix would look for an eight bit Fast Fourier Transform.
[n, bin] = histc(freqs, freqbins); bin = bin(:,1:spt/2); binmatrixa0 = zeros(length(n)-1, length(bin)); for k = 1:(length(n)-1) binmatrixa0(k,:) = bin == k ; end binmatrixb0 = fliplr(binmatrixa0);