ADC Lab · The converter lab

From wave to samples: Sample Rate, Bit Depth and Nyquist · by Shay Shezifi
‹ All labs

Turn SAMPLE RATE: the gray wave doesn’t change, only the number of columns. Click a dot to see its number.

—
— — — — — —

Wave

Common
Anti-Alias

Format
Dither

Recon Filter

B
Inside this lab: screens and terms

Sample rate, bit depth, Nyquist and aliasing, on a sheet of graph paper

The ADC measures the wave at fixed intervals, and every measurement is a sample.

Turn SAMPLE RATE: the gray wave doesn’t change, only the number of columns. Click a dot to see its number.

Bit Depth sets how many rows the grid has, and every sample is rounded to the nearest row.

Turn BIT DEPTH and watch the rows and the red error lines.

A quiet sound uses fewer rows, and Dither turns its distortion into hiss.

Press Play, play “After the converter”, and turn Dither on and off.

At 24 bit the ceiling is 0 dBFS. In 32 bit float the Headroom is almost infinite, and the peaks aren’t cut.

Switch between 24 bit and 32 bit float, and watch the red line: that’s the ceiling, 0 dBFS.

Above Nyquist, half the Sample Rate, a sound folds over and is heard as a lower sound.

Turn FREQ past Nyquist, and listen to how the sound after the converter goes down.

The DAC turns the numbers back into voltage, and the filter smooths the steps back into a wave.

Turn Recon Filter off and on, and compare the orange line with the green line.

Terms in this lab

ADC · Analog to Digital Converter
Analog-to-digital converter: measures a continuous voltage, for example from a microphone or a guitar, and turns it into a list of numbers a computer can store and process. Found in every audio interface, phone and portable recorder.
Sample
One measurement of the wave’s level at a given moment, stored as a number.
Sample Rate
How many samples per second the converter measures, in Hz. The higher it is, the higher the frequencies you can store: up to half of it.
Sample & Hold
A circuit that captures the voltage at a given moment and holds it steady until the next one. In a converter it holds the voltage steady until the next measurement, so there’s time to measure it.
Bit Depth
How many bits each sample has, and therefore how many possible values: 3 bits = 8 values, 16 bits = 65,536. The more bits, the quieter the noise under the sound.
Bit
The smallest digit in a computer: 0 or 1. Each additional bit doubles the number of values that can be written.
Quantization
Rounding each sample to the nearest possible value, because only a number from a limited list can be written down.
Quantization Error
The difference between a sample’s true value and the value it was rounded to. It’s heard as noise and distortion under the sound, and halves (about 6 dB) with each additional bit.
Dither
Very quiet noise added before rounding. It turns quantization error from distortion that clings to the sound into an even hiss the ear tolerates easily. It’s added whenever Bit Depth is reduced, for example when exporting to 16 bit.
dBFS · Decibels Full Scale
A unit that measures the level of digital audio relative to the ceiling: 0 dBFS is the highest value, and everything below it is written as negative numbers.
32 bit float · 32-bit Floating Point
An audio file format in which each sample is stored as a number in two parts, a range and a position within the range, so it has no ceiling and can store values above 0 dBFS too.
Headroom
The space between the sound’s peak and the ceiling, 0 dBFS: how many dB you can still turn it up before the peaks are cut.
Clipping
Cutting off the peaks of the wave when the sound goes past the highest value that can be written: the peaks go flat, and the sound distorts.
Exponent
The part of a float number that says which range the number is in, with each range twice as high as the one before.
Mantissa
The part of a float number that says exactly where the number sits within the range the exponent set.
Nyquist Frequency
Half the sample rate: the highest frequency that can be stored. At 44.1 kHz it’s 22,050 Hz.
Aliasing
An effect in which a tone above the Nyquist frequency folds down and is heard as a different, lower tone that wasn’t in the original.
Anti-Aliasing Filter
A Low Pass filter before the converter that removes everything above Nyquist before sampling, so it doesn’t fold over.
Low Pass · Low Pass Filter
A filter that passes the frequencies below the Cutoff and weakens what’s above it. Here: the Cutoff of the filters in the converter sits at the Nyquist frequency.
Spectrum
A display of all the frequencies in a sound and the level of each.
Oversampling
Working internally at a Sample Rate several times higher, so harmonics created by processing don’t cross Nyquist and fold over. Found in digital synths and saturation plugins.
Harmonic
A sine whose frequency is a whole-number multiple of the fundamental: 1×, 2×, 3×. The first harmonic is the fundamental itself.
DAC · Digital to Analog Converter
Digital-to-analog converter: turns the numbers back into a voltage that moves the speaker or headphones. Found in every device that plays sound: an audio interface, a phone, Bluetooth headphones, a digital synth.
Reconstruction Filter
A Low Pass filter after the DAC, at the Nyquist frequency, that smooths the steps and brings back the original wave.

All terms on the site