If you do not follow the rule of taking at least two samples per period of audio, unwanted alias frequencies may be captured. Alias means change of identity (think James Bond / 007…). To prevent this from happening you need to apply an ‘anti-alias’ filter before sampling. This is a low-pass filter that blocks frequencies that are higher than half the sampling rate.
This type of filter can affect the audio. Oversampling (for instance doubling or quadrupling the sample rate is used to get less influence from the filter. (However, doubling the sampling frequency also doubles the amount of data for a given recording).
If the sampling frequency is not at least twice the highest audio frequency, the reconstructed signal is not in accordance with the input.
Top: The one period of the signal is sampled six times. 6 > 2 so the reconstruction is ok.
Middle: The two periods of a signal is sampled six times, which equals 3 times per period. 3 > 2 so the reconstructions is ok.
Bottom: The six periods of the signal is sampled six times, which equals 1 time per period. 1 < 2, so the signal ends up as an alias frequency, which is different from the original.
Another very important thing to note during conversion is the interval between each sample. Each interval must be exactly the same duration. Because, when digitized, there is no information about the timing of each sample. Thus, we must rely on a steady repetition of the sampling – a constant interval. (For instance, when applying a sample rate of 48 kHz, the interval between any two samples is 20.833 micro seconds [µs]. )
The sampling clock must be stable and should not be disturbed by anything. (Un-tight sampling repetition, also called jitter, leads to noise in the reproduced audio.)
As mentioned earlier, each sample represents a point of the original signal. It is essential that the measurement of each point and the stored value is as precise as possible. After the sampling process, all references to the original signal is lost.
Establishing the value of the original signal at the time of sampling is a little like using a measuring tape in a workshop. If you are going to cut out a shelf for your closet, you must take a measurement to find out what the size should be. Now, if the measuring tape only show meters or yards, it is almost impossible to find the right size. If the tape display decimeters or perhaps inches, it's getting better. However, the shelf may still not really fit in the closet. However, if the measuring tape displays millimeters or fragments of inches, the precision is high enough to describe the size.
The term quantization comes from the Latin word ‘quantitas’ which means amount or size. To describe the size of a sample we use bits. ‘Bit’ is a contraction of the words ‘bi
’. Binary means the digit can only have one of two values, 0 or 1. If we want to count higher numbers we must add more bits. For instance, applying two binary digits leads to a possibility of four values: 00, 01, 10 and 11. Adding one more bit doubles the number of values for each bit added.
The precision of the measurement – or quantization – is determined by the number of bits available for each sample. Each bit value represents a predetermined value. If the value of the original signal exactly matches one of the predefined values everything is good. However, if not, you must accept the nearest value available. But that introduces an error that can never be compensated for. So, to reduce errors, it is essential to allocate a sufficient number of bits per sample. Very few bits per sample yield distortion. Increasing the number of bits changes the perceived distortion into noise. Then it is a question of how low noise you want for your conversion. Basically the signal to noise ratio increases by 6 dB per extra bit applied.
Computers organize bits in bundles of eight; meaning the preferred (practical) number of bits per sample is 8, 16, 24, etc. An 8-bit per sample is too low for quality sound. A 16-bit sample applies to CD-quality sound. For the production of high-quality audio, a 24-bit sample is applied.
With quantization, it is the number of bits that determine the precision of the value read. Each time one more bit is available, the resolution of the scale doubles and the error in measurement is halved. In practice, this means that the signal-to-noise ratio improves by approximately 6 dB for each additional bit available.
In the conversion from digital to analog, the objective is to produce a signal that is proportional to the value contained in the numerical digital information. Each bit represent a voltage source. The most significant bit (MSB) converts into the largest voltage; the next most significant bit converts into half of that voltage, and so on until the least significant bit (LSB) is reached. By summing all the voltage steps, and by holding each summed value until the next sample takes over, a continuous signal is created. The signal is then smoothed out by applying a low-pass filter.
Figure 5. D/A conversion
- During digital-to-analog conversion, the stored numbers are converted back into analog values.
- The numbers are read into a programmable power supply so that they recreate the corresponding voltage steps.
- The low-pass filter evens out the signal by removing the harmonic overtones (caused by the steps) lying above the desired frequency spectrum.
- The output is pure analog audio.