FROM SOUND WAVES TO ONES & ZEROS

Same sound. Different data.

Change the numbers. See the signal. Hear the difference.

Your audio stays with youEverything happens in your browser.
THE SIGNAL

Look a little closer.

INTERACTIVE
A 6 ms window into your sound
AMPLITUDE
Click a sample to inspect its binary value ↗
Source signalDigital samples
1.800 s
0:00 / 0:12SPACE TO PLAY
PCM BIT RATE ↗
352.8kbps

22,050 × 8 × 2 bits/s

RAW PCM SIZE↓
529.2kB

75% smaller than CD-quality PCM

FREQUENCY LIMIT ∿
11.03kHz

Half the sample rate · Nyquist limit

01
ONE SAMPLE, UNDER THE MICROSCOPE

Every measurement becomes a number.

SAMPLE #39,690 · L
MEASURED AMPLITUDE+0.000
→
QUANTISED AMPLITUDE+0.000
→
SIGNED PCM CODE · TWO'S COMPLEMENT00000000

Click any blue dot in the waveform. More bits give each measurement a finer set of values.

THE BIG PICTURE

Three choices. One digital sound.

A microphone starts with a continuous signal. Sampling and quantisation turn its measurements into binary data.

01 / TIME

Sampling

The sample rate is the number of measurements each second. A higher rate can represent higher frequencies.

44,100 Hz = 44,100 samples / second / channel
02 / PRECISION

Quantisation

Bit depth controls the available amplitude levels. Rounding a measurement to a level introduces quantisation error.

8 bit = 2⁸ = 256 possible levels
03 / SPACE

Channels

Mono has one channel. Stereo has separate left and right channels, so it uses twice the PCM data at the same settings.

Mono → stereo = 2 × the PCM bit rate
i

A note about imported music. Your file is already digital. This lab resamples and requantises its decoded audio to model digitisation. Raising the settings cannot restore detail already lost. The smooth curve is an illustration of the decoded source, not a recording of its original analogue wave.

BIT RATE ≠ BIT DEPTH

What about MP3 or streaming?

Compressed audio has a separate target bit rate. Move the slider to estimate its size, then compare it with your uncompressed PCM. This calculator does not encode or change playback.

128 kbps
Estimated payload 192 kBYour PCM payload 529.2 kB
Size ≈ bit rate × duration ÷ 8. Headers and variable-rate encoding may change the actual size.
LEARN BY LISTENING

A few experiments to try.

A little curiosity goes a long way. ↘
01 · HEAR THE STEPS

How few bits is too few?

Start with the melody at 4 bits. Switch between original and digitised, then raise the bit depth. Listen for the grainy noise.

02 · SPOT THE IMPOSTOR

Can a high note turn low?

Sample a 6,200 Hz tone at 8,000 Hz with the filter off. It folds to 1,800 Hz. Turn the filter on and compare.

03 · SAVE SOME SPACE

Can you halve the file?

Begin with CD-quality PCM. Change only stereo to mono. Predict the new bit rate and file size before checking.