Sampling Sound

The KS3 National Curriculum for Computing requires that students know how sound is stored inside the computer. In addition, GCSE Computer Science also requires that you understand the impact of sampling rate and sample size on the recorded sound.

When a sound is recorded for storage on a digital device, the sound wave is sampled at regular intervals and the height of the wave (called the amplitude) is stored as a number. The number of times per second that the wave is measured is called the sample rate, sampling rate or sampling frequency and is measured in Hertz (Hz). The number of bits used to stored the sample is called the bit depth, or sometimes the resolution. A bit depth of n bits can represent 2ⁿ different values - e.g. CDs use 16-bit samples with 65,536 (i.e. 2¹⁶) possible values.

The width of the display below represents one second of sound. You can adjust the controls at the bottom to see the impact on the samples taken and how closely the track the original sound wave. Note the strange things that can happen if the sampling frequency is lower than the audio frequency.

Terminology

The wording used to describe measurements relating to the representation of sound does vary quite a lot. The OCR specification uses the terms sample rate, duration and bit depth, but AQA says sampling rate and refers to bit depth as sample resolution (a term also used by download sites such as Qobuz). Edexcel says sample rate, bit depth and sample interval (which I've never heard anywhere else and don't like because Hertz is the unit of frequency and "interval" sounds like a period of time), whereas the only measurement mentioned in the Eduqas specification is sampling rate. Elsewhere I've also seen the term sample size used to describe the bit rate or resolution.