Digital sampling
2. Digital sampling#
In the previous chapter, signals were assumed to exist in continuous time. A signal was represented as \(x(t)\), where \(t\) could be any continuous value representing time: \(0, 3, -1/12, \sqrt{2}, ...\) are all valid values for \(t\).
Digital computers, the kind we write programs for, cannot work directly with continuous signals. When a signal enters a digital computer, it must be discretized before the computer can be processed. There are two ingredients to discretization: sampling, and quantization.
If you’ve ever looked at the file information for digital audio on a computer, you may have seen something like the following (generated by the soxi program):
$ soxi my_signal.wav
Input File : 'my_signal.wav'
Channels : 1
Sample Rate : 22050
Precision : 16-bit
The channels
field tells you how many signals are contained in the file: in this case, only 1 because it’s monophonic.
The other two fields, sample rate
and precision
have to do with sampling and quantization.
This section introduces discrete sampling: the process of summarizing a continuous signal \(x(t)\) by a discrete sequence of sample values. There is a vast and deep literature around the topic of sampling, and this chapter generally covers the basics.
At the end of the chapter, we’ll come back to quantization, but sampling is by far the more important part of the discretization process.