Unit 11.3A · Term 3

Sound Representation

Sound in the real world is an analogue, continuous signal. To store and process it on a computer, the signal is measured at regular intervals and converted into binary values. Two key factors are sampling rate and sample resolution (bit depth).

Learning Objectives

  • 11.1.1.9 Describe the digital representation of sound in terms of sampling rate and resolution
  • 11.1.1.10 Explain why analogue sound data needs to be converted to binary digits
  • 11.1.1.11 Calculate the size of an audio data file

From Analogue Sound to Binary

Analogue sound conversion process showing waveform, sampling, quantising and binary encoding
Analogue-to-digital conversion turns a continuous signal into discrete binary sample values.

The conversion process

  • Sample: measure the amplitude of the analogue waveform at regular time intervals.
  • Quantise: map each measurement to one of the available amplitude levels.
  • Encode: represent the chosen level as a binary number.

Why convert analogue sound to binary?

Computer systems store, process and transmit data digitally. Converting the analogue waveform into binary sample values allows the sound to be stored in memory/files, processed by software, copied and transmitted using digital systems.

Sampling Rate

Comparison of lower and higher sampling rates on the same waveform
Sampling rate controls how often the waveform is measured.
Sample

One measurement of the waveform amplitude at a particular moment.

Sampling rate

The number of samples taken every second.

Hertz (Hz)

The unit used for samples per second; 1 kHz = 1000 samples per second.

Example

44.1 kHz = 44,100 Hz = 44,100 samples per second per channel
If sampling rate increases...Effect
Samples per secondIncreases
Time detail captured from the waveformCan increase
Uncompressed file sizeIncreases if all other factors stay the same
Extension: why sample fast enough?

If the sampling rate is too low, a digital recording may fail to represent high-frequency changes correctly. In more advanced study this is related to the Nyquist sampling rule and aliasing.

Sample Resolution / Bit Depth

Comparison of lower and higher sample bit depths and their available amplitude levels
Bit depth controls how many possible amplitude levels each sample can represent.
Number of possible amplitude levels = 2^(bit depth)

Examples

3-bit sample resolution = 2³ = 8 possible amplitude levels 8-bit sample resolution = 2⁸ = 256 possible amplitude levels 16-bit sample resolution = 2¹⁶ = 65,536 possible amplitude levels
If bit depth increases...Effect
Possible amplitude levelsIncreases
Size of quantisation stepsDecreases
Accuracy of amplitude representationCan improve
Uncompressed file sizeIncreases if all other factors stay the same

Sampling rate ≠ bit depth

Sampling rate describes how often measurements are taken. Bit depth / sample resolution describes how precisely each measurement's amplitude can be represented.

Mono and Stereo Channels

Audio typeChannelsEffect on raw data size
Mono1One stream of samples
Stereo2Two streams of samples → twice the raw data of mono at the same settings

Per channel

A sample rate of 44.1 kHz means 44,100 samples per second for each channel. Stereo therefore stores two sample values for every sampling instant.

Calculating Audio Data Size

Formula for uncompressed audio size using sample rate, bit depth, channels and duration
Use the formula for uncompressed PCM-style audio data.
size in bits = sample rate × bit depth × number of channels × duration (seconds)

1 44.1 kHz, 16-bit, stereo, 60 seconds

Sample rate = 44,100 samples/s Bit depth = 16 bits/sample Channels = 2 Duration = 60 s Size in bits = 44,100 × 16 × 2 × 60 = 84,672,000 bits Size in bytes = 84,672,000 ÷ 8 = 10,584,000 bytes Size in MiB = 10,584,000 ÷ 1024 ÷ 1024 ≈ 10.09 MiB

2 22.05 kHz, 8-bit, mono, 30 seconds

Size in bits = 22,050 × 8 × 1 × 30 = 5,292,000 bits Size in bytes = 661,500 bytes Size in KiB = 661,500 ÷ 1024 ≈ 646.0 KiB

Unit conversion

This page uses 1024 bytes = 1 KiB and 1024 KiB = 1 MiB. If the exam gives a different conversion, use the conversion stated in the question.

Raw audio size vs real audio file size

The formula above calculates uncompressed sample data. Real files may include headers/metadata, and compressed formats such as MP3 or AAC can be much smaller. Use the assumptions stated in the question.

Quality–Storage Trade-off

ChangePossible benefitCost
Increase sample rateMore frequent measurements / more time detailMore samples to store
Increase bit depthMore amplitude levels / smaller quantisation stepsMore bits for every sample
Use stereo instead of monoSeparate left and right channelsTwice as many sample values at the same settings

Interactive Labs

1. Sampling Rate Challenge

Convert the given kHz value into samples per second.

2. Bit Depth Challenge

Use 2^(bit depth).

3. Audio Size Calculator

Calculate the uncompressed audio size.
sample rate × bit depth × channels × duration

4. Predict the Effect

Choose the best answer.

Common Pitfalls

Confusing sampling rate and bit depth

Sampling rate = samples per second. Bit depth = bits used for each sample value.

Forgetting the number of channels

Stereo uses two channels, so the raw data size is twice that of mono at identical sample rate, bit depth and duration.

Using kHz as though it were Hz

44.1 kHz = 44,100 Hz, not 44.1 samples per second.

Forgetting bits → bytes

The formula gives bits. Divide by 8 to obtain bytes.

Comparing the formula directly with an MP3 file

The basic formula describes uncompressed sample data; compressed audio uses a different storage model.

Graded Tasks

Remember

Define sampling rate and sample resolution / bit depth.

Understand

Explain why analogue sound needs to be converted to binary before it can be stored and processed by a computer.

Apply

Convert 48 kHz into samples per second.

Apply

Calculate the number of possible amplitude levels for 8-bit and 16-bit sample resolution.

Understand

Explain the effect of increasing sampling rate while keeping all other settings unchanged.

Understand

Explain the effect of increasing sample resolution while keeping all other settings unchanged.

Apply

Calculate the uncompressed size in bytes of 10 seconds of 8 kHz, 8-bit, mono audio.

Analyze

Compare 44.1 kHz, 16-bit mono with 44.1 kHz, 16-bit stereo for the same duration. Explain the effect on stored data size.

Exam Practice

Q1: Describe the terms sampling rate and sample resolution. [2]

Reveal marking points
Sampling rate: number of samples taken per second [1]. Sample resolution / bit depth: number of bits used to represent each sample / amplitude value [1].

Q2: Explain why analogue sound is converted into binary data for use in a computer system. [2]

Reveal marking points
Computers store/process data digitally / as binary [1]. Conversion allows the sound to be stored, processed or transmitted using computer systems [1].

Q3: A recording uses a sampling rate of 20 kHz and 8-bit sample resolution. It is mono and lasts 5 seconds. Calculate the size in bytes. [3]

Reveal marking points
20 kHz = 20,000 samples/s [1]. 20,000 × 8 × 1 × 5 = 800,000 bits [1]. 800,000 ÷ 8 = 100,000 bytes [1].

Q4: A mono recording and a stereo recording use the same sample rate, bit depth and duration. Explain the difference in uncompressed data size. [2]

Reveal marking points
Stereo contains two channels / two sample streams [1]. Therefore stereo requires twice the raw sample data of mono at the same settings [1].

Self-Check Quiz

Eight quick checksClick each answer to reveal
1. What does sampling rate measure?
Click to reveal answer
2. What does 44.1 kHz mean?
Click to reveal answer
3. What does sample resolution / bit depth measure?
Click to reveal answer
4. How many amplitude levels can 8 bits represent?
Click to reveal answer
5. Why is analogue sound converted to binary?
Click to reveal answer
6. How many channels does stereo audio have?
Click to reveal answer
7. What is the raw audio-size formula in bits?
Click to reveal answer
8. Why can an MP3 file be much smaller than this raw calculation?
Click to reveal answer