Initial Analysis
When analyzing our audio signals, we wanted to look at different ways to graphically analyze the waveform. As seen in Fig. 1a, data was extracted from a .wav file for the song Sweet Child O’ Mine, then was plotted. This is not easy to read and understanding the frequency data from this graph would be extremely difficult. In order to get a better look at the frequency data, the FFT function on Matlab was used. The FFT function returns the frequency response of our signal, and this was then graphed as shown in the Fig. 1b. This gives us an idea of which frequencies are more prominent in the signal.
As a different method for analyzing the audio signal, two functions on Matlab were used, pwelch and spectrogram. Pwelch shows the frequencies of the signal and the power density of each frequency. In the graph below, it is seen that the normalized frequencies of around 0.1 to 0.3 are the stronger frequencies in the signal. This plot is shown in Fig. 2b. The spectrogram function prints a spectrogram of the function, which in this case is the audio data that was extracted from .wav file. This shows the frequencies and power density also, but instead of seeing this density over the frequency, the spectrogram shows the frequency and power density over time. A spectrogram is shown in Fig. 2a . If a song has a quick change in frequency, spectrogram will show us when it happened, while pwelch will just show the density of that frequency.
Overall, these graphs help display certain aspects of the audio signal. However, from what is seen in the research that was conducted, the FFT and pwelch could be the most useful in our analysis. These could be used in the HPS method that would help in pitch detection. This would ultimately lead to using the algorithm discussed above for key detection.


Figure 1: .wav file of Sweet Child O’ Mine graphed over time (left) and FFT of data extracted from .wav file (right).
(a)
(b)


(a)
(b)
Figure 2: Spectrogram (left) and Power Spectral Density Graph (right) for Sweet Child O’ Mine.