Modem Identification
The answer tone appears to be a sinusoid at or near 2100 Hz. A good first step might be to filter the sound with a narrowband filter that passes frequencies near 2100 Hz, and attenuates other frequencies. Filter design is a fairly advanced topic, but with the tools we have developed in this class, we can nonetheless create a reasonably good filter for this purpose. The key is to figure out what impulse response we want in order to get a frequency response that is close to an ideal narrowband filter.
Recall that an impulse contains all frequencies in equal amounts. This is easily verified by computing the DTFT of a Kronecker delta function, which proves to be equal to 1 at all frequencies.
Intuitively, a filter that passes only one of those frequencies (both positive and negative) will have a impulse response that contains only one of those frequencies, ideally. This suggests an ideal impulse response h where for all integers n,
This is not a practical impulse response, however (why?). A simple FIR version of this simply truncates this impulse response by setting it to zero for n < 0 and n > M, for some positive integer M. Such an impulse response with M = 100 looks like this:
This impulse response can be calculated in Matlab as follows:
n = [0:1/8000:1/80]; h = cos(n*2*pi*2100/8000)/50;
Notice that although this not look like a terribly clean sinusoidal. This is because the frequency is relatively high (2100 Hz) relative to the Nyquist frequency (4000 Hz). Below you can see that the sine wave is clearly samples of a smooth sine wave:
The impulse response is scaled by 1/50 so that it yields unity gain at 2100 Hz, as we will see.