Sampling, reproduction, and transmission distortions
|The physical and human spects dealing with audio, video, and images
Noise stuff: Stray signals and noise · sound-related noise names · electronic non-coupled noise names · electronic coupled noise · ground loop · strategies to avoid coupled noise · Sampling, reproduction, and transmission distortions · (tape) noise reduction
device voltage and impedance, audio and otherwise ·
amps and speakers ·
basic audio hacks ·
Simple ADCs and DACs ·
digital audio ·
multichannel and surround
For more, see Category:Audio, video, images
On wire type
When you consider a thing you want to measure, there is such a thing as sampling too slowly.
Consider wheels on television (and assume that your 25 or 30 frames per second are samples much faster than 1/25 or 1/30 seconds, so that blurring is not an issue here).
Spokes on these wheels are spaced at regular intervals, some angle apart, so if the wheel turns exactly that angle between two video frame samples, the next image will look identical, and the wheel will appear not to move while the car does. If you're slightly slower or slightly faster, you will see frames that suggest it is turning very slowly in one way or the other (at some speed, and often direction, that clearly doesn't match the car's movement). Due to the practicalities of wheel size and car speed, spokes often turns multiples faster than the video capturing/reproduction, which gives even more arbitrary frames when the wheel changes speed, which is why it more easily appears to switch direction.
Which is a long winded analogy to point out the inability to measure something happening faster than your sampling speed.
If you try, you will still happily store things, but represent and reproduce something that never happened.
...at a lower frequency than that it did in reality. Let's shift to sound. Consider a 1000Hz sine wave and sampling it at exactly 1000 samples per second. You will catch the wave at exactly the same point in its oscillation, which will yield a flat line.
Nyquist states that a frequency of half the sample rate is the highest you're going to find in your recording (for example, 1000 samples can at best express the high and low points of a 500Hz wave). Put another way, the Nyquist frequency is the frequency whose period is two sampling intervals.
Also, this is just for the one frequency, and the real problems are the speeds around the Nyquist frequency. Higher ones will appear as lower-frequency non-harmonic content; consider:
This mainly implies that you should filter out frequencies above the Nyquist frequency before sampling. That is, you wish to limit the signal bandwidth to that of your recording device, and there are some practical aspects to this. Theoretically, you could sample at a frequency just larger than the signal bandwidth, but this requires an a filter to counteract the aliasing that would perfectly passes frequencies up to this point and perfectly remove frequencies above it. Such a filter cannot be realized, so in reality some degree of oversampling (or some filtering out of the signal) is necessary.
For example, 44KHz recording tends to apply a filter that cuts out above 20KHz - commonly a lowpass filter that has its transition band between 20 and 22kHz. (Note that since we barely hear 20Hz anyway, any distortion around there matters less)
Things at and just under the Nyquist frequency won't be perfect, though only in amplitude, and this is rarely a problem. Consider a sine wave; you'll catch two points from the sine wave, hopefully a high and a low point, as they are half the wavelength apart, but so are the zero crossings, so you'll get something between zero and the correct amplitude. This effect also applies somewhat for frequencies just below as well.
Note that there is suggestion that the wheel analogy mis-suggests: Frequencies just under the Nyquist frequency will not alias, because of the way Fourier Transform works, specifically because it bases frequency content on a fairly large window of samples.
In a wider sense, aliasing refers to any distortions that come from forgetting the above effect. While 44kHz is more than enough for a straight sample-then-reproduce process, this is not the end of the story.
Various transformation, such as resampling, pitch effects, time/frequency-domain conversions, and digital effects may implicitly change the frequency content to introduce those beyond the Nyquist frequency. These details mean you may need additional lowpass filtering to avoid aliasing.
Quantization refers to an effect of digital sampling, that of taking analogue values and recording it as discrete numbers.
An Analog-to-Digital Converter (ADC) could be called a quantizer device, and a DAC takes quantized data by nature. By the nature of these devices, quantization error always exists around these.
Any processing of that data inbetween will also contend with quantization.
When we say quantization error refers to the difference between the analogue values and the digital values, we refer to the precision of the sample at the instant of sampling.
For example, when converted into integers, you will note that you have only so many. Say we want to save voltages between 0 and 1V, and have a (pathologically bad) 3-bit ADC, meaning 8 steps, each representing a 0.125V jump.
You get 0.6V. What do you save? The value 5 representing (5*0.125=)0.625, I guess.
That seems pretty inaccurate. And is.
It is, however, also the source of a lot of confusion, and a few myths, about what this actually presents as.
In particular the stair-step effect.
If we, say, assume that an DAC works like a sample-and-hold thing, that holds the last level it was given, then the difference between the blocky wave it produces, and the original sample. If you would literally subtract the two waveforms it would how weird shapes, and in fact a lot of harmonics. That would be bad.
The issue with this is that this is not how any audio DAC works.
But it's inaccurate!
How much do we need?
Rumble refers to vibrations from turntable mechanics (motor, bearing, belts, pulleys) being introduced into the signal.
This is impossible to avoid completely, but can be minimized.
Wow and flutter refers to effects from the variation in (analog) mechanically driven reproduction, such as in tapes.
The term wow comes from vinyl. If the hole isn't exactly in the center, then every rotation sees a slight speedup and slowdown in every rotation. Similarly, a warped record would change the distance to be traveled.
The fact that this variation is regular and slow (0.75 rotations per second = 45rpm)
Flutter refers to other reasons. Classically wow and flutter were split up as the slower and faster components (below and above 4Hz or so(verify))
That said, there are other reasons even in a turntable (e.g. the belt drive) and they are often less regular, so we now often think about this as a combined 'wow and flutter'.
In digital systems, a similar variation-in-timing effect still applies, but on a much smaller timescale, and is referred to as jitter.
There actually exists as similar split - wander and jitter as the problems below and above 10Hz or so(verify).