Sound — sampling and file size
Turning sound into numbers
- Sound in the real world is a smooth (analogue) wave.
- To store it, a computer measures it many times a second — sampling.
- Two settings decide the quality and the file size.
Sampling
- Sampling records the wave's amplitude at regular time intervals.
- Sampling rate = samples per second, in hertz (CD quality is $44.1\ \text{kHz}$).
- Sample resolution (bit depth) = bits used for each sample's amplitude (CD quality is 16 bits).

The sampling rate of a digital sound is:
Sampling rate = samples per second (hertz). The bits per sample is the sample resolution.
Sound file size
- Worked: $8000 \times 8 \times 5 \times 1 = 320\,000$ bits for a 5-second mono clip at $8\ \text{kHz}$, 8-bit.
- Stereo doubles it (2 channels).
A 5-second mono clip is sampled at $8000\ \text{Hz}$ with 8-bit resolution. What is its size in bits?
size $= 8000 \times 8 \times 5 \times 1 = 320\,000$ bits.
Changing the settings
- Higher sampling rate → captures higher pitches, but a larger file.
- Higher sample resolution → finer amplitude steps, less quantisation noise, but a larger file.
- Lower of either → smaller file, clear loss of quality.
- The sampling rate must be at least twice the highest frequency you want to keep.
Increasing the sampling rate will:
A higher sampling rate captures higher frequencies (better quality) but increases the file size.
To capture frequencies up to $20\,000\ \text{Hz}$, what is the minimum sampling rate, in Hz?
The sampling rate must be at least twice the highest frequency: $2 \times 20\,000 = 40\,000\ \text{Hz}$.
A higher sample resolution (more bits per sample) reduces quantisation noise.
More bits give finer amplitude steps, so each sample is closer to the true value — less quantisation noise (but a larger file).
You've got it
- sampling measures amplitude at regular intervals
- sampling rate = samples/sec; sample resolution = bits per sample
- file size $=$ rate $\times$ resolution $\times$ duration $\times$ channels
- higher rate/resolution → better quality but bigger file; rate ≥ 2 × the highest frequency