NPB 163/PSC 128
Lab #4 - Frequency analysis and sound localization
(due Friday, 1/30)
1. Compute the Fourier transform and plot the amplitude spectra of the
(a) 500 Hz pure tone.
(b) Complex tone with five harmonics and same fundamental as (a).
(c) Gaussian noise.
Each waveform should be 1 second in length, sampled at 8192 Hz. Play each one using soundsc to hear what it sounds like.
2. Create one cycle of a square wave occupying 32 samples (i.e., 16 samples equal to +1 followed by 16 samples equal to -1). Use the Fourier transform to compute the amplitudes of all 16 frequency components of this waveform, and plot as a bar chart. Show what an approximation to the waveform looks like when you use just the first three largest frequency components. Verify that adding all frequency components back together with proper amplitudes and phases reconstructs perfectly the original signal.
3. For each of the following waveforms (available on the class web page), compute its amplitude spectrum and spectrogram.
4. Create five different stereo pairs of sinewaves that would result in the percept of being localized to five different locations: far-left, left-of-center, center, right-of-center, and far-right. Play these through earphones (read the help on 'sound' to find out how to play stereo). Do they sound like they are coming from different locations?