Catch the Wave!
Turning a smooth sound wave into numbers.
Your mission
Sound is a smooth, continuous wave, but a computer can only store numbers. Your mission: catch the wave with samples! Adjust the sampling rate and the bit depth, watch how closely your digital copy follows the real sound, listen to the difference, and find out what it costs in file size.
Explore
Try all five: hear the original, tap a sample, change the sampling rate, change the bit depth and hear the digital copy.
The smooth line is a real sound wave. The dots are the samples a computer takes of it. Listen to it, tap a dot, and move the controls to see how well the samples catch the wave.
0 of 5 discoveries made
Experiment
Complete all six experiments in the sound lab.
Sound lab experiments
Keep an eye on the match score and the size meter. Each experiment ticks itself off.
0 of 6 experiments done
Challenge
You are the sound engineer now. Get through six recording takes.
Sound engineer's notes
- Sampling rate = samples per second (Hz)
- Number of levels = 2bits
- Each sample is rounded to the nearest level
- Size in bytes = rate × seconds × bits ÷ 8
- Stereo: multiply by 2 channels
Finish all 6 takes to continue.
Understand
Here is what the sound lab was showing you, in the words you need for the exam.
Analogue in, digital out
Real sound is an analogue signal: a smooth, continuous wave with a value at every moment. A computer can't store infinitely many values, so it measures the wave at regular intervals. Each measurement is a sample, and the stored list of samples is the digital version of the sound.
Sampling rate
The sampling rate is the number of samples taken per second, measured in hertz (Hz). CD audio uses 44,100 Hz: 44,100 samples every second.
More samples per second follow the wave more closely, especially high-pitched sounds, but make the file bigger. 44,100 Hz is just over twice the highest pitch humans can hear (about 20,000 Hz).
Bit depth and rounding
The bit depth is the number of bits stored for each sample. With n bits there are 2n levels: 8 bits give 256 levels and 16 bits give 65,536. Each sample is rounded to the nearest level, and that level's binary code is stored.
| Measured sample | 0.2 | 1.7 | 2.8 |
|---|---|---|---|
| Nearest of 4 levels | 0 | 2 | 3 |
| Stored (2 bits) | 00 | 10 | 11 |
The rounding makes small errors. More levels make the errors smaller. Bit depth changes the number of levels and the file size, not the number of samples per second.
Working out the file size
Size in bytes = sampling rate × seconds × bits per sample ÷ 8. For stereo, multiply by 2 channels.
30 seconds at 8,000 Hz and 16 bits: 8,000 × 30 × 16 = 3,840,000 bits ÷ 8 = 480,000 bytes ÷ 1,024 = 468.75 KiB.
Words to know
- Analogue
- Continuous: the wave has a value at every moment in time.
- Sample
- One measurement of the wave's height at a moment in time.
- Sampling rate
- Samples per second, in hertz (Hz). 44,100 Hz is CD quality.
- Bit depth
- Bits per sample. It sets the number of levels: 2bits.
- Channels
- Mono has 1, stereo has 2 (left and right), which doubles the size.
Exam tip
Write every value with its unit: 8,000 samples/s × 30 s × 16 bits = 3,840,000 bits. Then divide by 8 for bytes, and by 1,024 for KiB. If the question says stereo, don't forget the × 2!