Resampling quality compared
Aliasing examplesVisible aliasingAliasing occurs whenever a signal (e.g. a sound or an image) needs to be digitized from an analog source waveform or if a digital signal needs to be converted (resampled) from one digital resolution to another. You probably know the most popular example of aliasing from the wagon wheels in western movies. When the wagon accelerates the wheels seem to switch between backward- and forward-rotation and in between they even seem to stop. The reason is the digital time resolution (sampling frequency) of a movie, which is way to low to capture the fast rotation frequency correctly. To simplify the example, let's assume the wheel doesn't have spokes but just a big dot at one position. This way we are not confused by the additional visual aliasing caused by the equally looking spokes. The movie has been recorded at 24 frames per second (fps). This is the sampling frequency, we took 24 samples per second. The Nyquist theorem (see bottom of this page) tells us we won't be able to catch frequencies (rotation speed) greater than half the sampling frequency, which is 12 revolutions per second (rps) in this case. For all frequencies greater than 12 we see a wrong rotation speed:
Audible aliasingThe same problem exists for frequencies in digital audio. When we record a sound with a sampling frequency of 44100 Hz (CD quality) we won't be able to catch frequencies greater than 22050 Hz. Higher frequencies reflect at the virtual mirror line of 22050 Hz and become a low frequency in the digitized signal. The same happens when converting a digital signal to another digital resolution, which is what a sampler does when you hit a key. The two screenshots below show this reflection. To simplify the example, the source signal contains just sine waves at five differently rising frequencies.
Bottom line: the recorded sound contains wrong frequency components in addition to the "good" ones, they are not completely replaced as in the wagon wheel example. The challenge is to separate good from bad. We need to remove aliasing frequencies as good as possible while retaining the source frequencies as good as possible. During recording or resampling this is done by a filter, which removes frequencies which would be outside of the possible target frequency range. It's not closer to the truth, but less annoying to the ear then adding them at the wrong place. Nyquist theoremShort definition: A source waveform may be reconstructed (without error) by taking samples at equal time intervals, as long as the sampling rate is at least twice as high as the highest frequency component in the source signal. Google search: Nyquist Theorem
|