A new MATLAB command that we learned about while working on our project is the butter() command. This command allows us to get the transfer function equation of a butterworth filter. We use this function in order to create a low-pass butterworth filter equation. The way we do this is with the following code: [b, a] = butter(n, Wn) “n” is the order of the filter. “Wn” is the cutoff frequency of the low-pass filter “b” contains the coefficients for the numerator of the filter equation “a” contains the coefficients for the denominator of the filter equation The transfer function for the filter is of the form: H(z) = ( b(1) + b(2)*z^-1 + … + b(n+1)z^-n ) ( a(1) + a(2)*z^-1 + … + a(n+1)z^-n )
The reason why this command is relevant is because our project involves analyzing audio recordings in order to figure out the notes being played in the recording. The recordings we have taken are of a violin, a piano, and/or a flute; and all of the notes that we played on these instruments did not exceed frequencies of 6 kHz. These recordings were not done in a professional recording setting and thus might contain some high frequency noise. The existence of these higher frequencies in our recordings may degrade the effectiveness of our note detection algorithm, because we are looking at spectograms of the recordings and high frequency noise might be incorrectly interpreted as harmonics of a note that doesn't exist in the recording. Therefore, in order to try and improve the accuracy of our note detection system, we will filter out any higher frequency noise from our recording. To accomplish this desired filtering, we thus utilize MATLAB’s butter() command.