How a CD player works

From Class Wiki
Revision as of 13:58, 10 November 2005 by Wilspa (talk | contribs) (→‎Sampling)
Jump to navigation Jump to search

Back to my page

How a CD player works

So, what is actually happening when you put a CD into your CD player? The disk spins and music comes out, but how exactly does that work? The answer is that it works by combining the properties of sampling and Fourier Transforms to change the data on the CD into the music coming out of the CD player.

Nyquist Theorem

The problem with a computer is that when it records the music, it actually is only sampling the wave over and over again, and then it stores those samples instead of the actual wave itself. The samples are usually expressed as a series of delta functions multiplied by their respective coefficients:

However, from these samples it is possible to recreate the original wave if the sampling rate is greater than or equal to twice the frequency of the maximum frequency of the wave being sampled. So,

This is called the Nyquist Theorem, and it allows us to select the sampling rate we need in order to recreate the music.

Sampling

Because a computer must use sampling in order to store music, it is necessary to have ways of turning the sampled data back into music. When we sample in time, it changes the characteristics of the frequency domain. This changes the music, so we need to figure out how to undo those changes and bring back the original music so that it will sound good to listen to. The change the occurs is called ??something?? and it means that when we sample in time, the original frequency response is repeated every 1/T Hz, which means that you are adding in a whole bunch of high frequency responses that shouldn't be there. How do we fix this? Well, one method is to send the output (a series of impulse functions corresponding to the sampled values) through a perfect brickwall (basically brickwall means perfect) low pass filter that will take out all of the high frequency components and just leave the original sound wave. This would be nice, but it doesn't exactly work that way, since it isn't humanly possible to create a perfect brickwall filter. So, instead we use other methods to create the output we are looking for, starting with the Digital to Analog converter.

D/A converter

A Digital to Analog converter doesn't send out impulse functions, instead it sends out a function that will step along with the height of the steps being the height of the impulse functions, basically convolving the impulse functions with a pulse of period T and amplitude 1. This changes things a bit. Because the impulse functions are being convolved with the pulse, their fourier transfers are being multiplied. The fourier transform of the pulse, when multiplied by the fourier transform of the impulse functions, changes the output in two ways. It smushes the response that we want, the low frequency components of the wave, but it also cuts out a big portion of the high frequency components we don't want since the fourier transform of the pulse is zero in the middle of the higher frequency responses, thereby making them much much smaller and less significant. This is very good because we can correct for the smushing of the response we want by changing our low pass filter, and we don't have to worry as much about the stuff we don't want, since it is mostly removed by the pulse function. The shape of the low pass filter is determined by the shape of the fourier transform of the pulse function. Then, after the signal passes through the low pass filter, it comes out of the speaker as music!

2 times oversampling