Resampling quality compared 

Table of contents
Page 1/7 Back  |  Next:  The Test

Introduction

The most important instrument for many musicians is the sampler, since it's able to transform into any other natural or synthesizer instrument. Its core function is to convert recorded Samples to the pitch according to the keys you press and then to output them all together at the sample rate demanded by the connected output device (host sequencer or soundcard). This process is called "resampling" or "interpolation". It takes place independently and in real-time for every audible voice. The applied resampling algorithm substantially decides about the audible playback quality of a sampler.

The problem: aliasing

Aliasing occurs whenever an analog waveform needs to be digitized or if a digital signal needs to be converted (resampled) from one digital resolution to another. And this is exactly what happens in the sampler when you press a key. You probably know a popular example of an aliasing error from the apparent backward rotation of wagon wheels in western movies. It's demonstrated at the next page Aliasing examples. The consequences of aliasing in audio data:

  • Loss of harmonics: The added aliasing frequencies destroy the harmonic relations of a sound, it becomes atonal. Aliasing doesn't know musical harmonic rules. The added frequencies are just mathematically related to the digital resolution (sampling frequency)
  • Loss of SNR: The added aliasing frequencies degrade the effective SNR (signal to noise ratio) of your samples.
  • Irreversible: Aliasing frequencies can't be removed subsequently, once the resampling process produced them. It's as impossible as subsequently telling whether e.g. the number 8 was the result of 3+5 or 8+0.
  • Harsh "digital" sound: The audible grade of aliasing depends on the type of the sound and the frequency relations. In most situations you won't hear the added aliasing frequencies itself, but what you hear is the general result of aliasing: a rather harsh sound, often referred to as "digital cold". The picture at the right demonstrates this effect for graphics: the 1st ellipse is anti-aliased, the.2nd isn't.

The challenge: better resampling

The challenge is to separate "good" from "bad" frequencies. The sampler needs to remove aliasing frequencies as good as possible while retaining the source frequencies as good as possible. During the resampling process this is done by a filter, which removes frequencies outside of the possible target frequency range. That's not closer to the truth, but less annoying to the ear then adding them at a completely wrong place. Classical methods currently found in almost any sampler are linear interpolation or cubic spline interpolation. Both are fast and in the past years they were the only possible real-time solution matching the available CPU power. But both are not ideal for audio data, they produce heavy aliasing as you can see in some of the screenshots to follow.




Page 1/7 Back  |  Next:  The Test


Table of contents
  Introduction
  The Test
  Results 1/3 - heavy aliasing
  Results 2/3 - average aliasing
  Results 3/3 - no audible aliasing
  Test your own sampler!
  Aliasing examples