Welcome to Representing Sound!

Have you ever wondered how your computer, which only understands 0s and 1s, manages to play a beautiful symphony or record your voice? This chapter is all about bridging the gap between the natural, continuous world of sound and the discrete, binary world of digital data.

We will learn the essential processes and measurements that allow sound waves to be captured, stored, and accurately played back. Don't worry if the concepts seem technical; we will break them down step-by-step!

1. Analogue vs. Digital Sound

Before a computer can process sound, we must understand the fundamental difference between how sound exists naturally and how a computer stores it.

Analogue Quantities

The sound we hear in the real world is an analogue quantity.

  • Definition: Analogue data is continuous. It can take on any value within a specific range.
  • Analogy: Think of a smooth ramp. You can stand at an infinite number of points on that ramp. Similarly, a real sound wave has an infinite range of amplitudes (volumes) over an infinite time period.
  • Example: The electrical signal produced by a microphone before it is processed.

Digital Quantities

Computers operate using digital quantities.

  • Definition: Digital data is discrete (separate). It can only take on a finite set of specific values, usually represented in binary.
  • Analogy: Think of a staircase. You can only stand on one step at a time; you cannot stand between steps.
  • Goal: To convert the smooth, continuous analogue wave into a series of discrete numerical measurements that the computer can store and process.

Key Takeaway: Real sound is Analogue (infinite/continuous). Computers need Digital data (finite/discrete).

2. The Conversion Process: ADC and DAC

To move sound data between the real world and the computer, we rely on two critical pieces of hardware: the Analogue to Digital Converter (ADC) and the Digital to Analogue Converter (DAC).

Analogue to Digital Converter (ADC)

The ADC is used during recording (input). It converts the continuous analogue signal into binary data.

  1. Capture: An analogue sound wave is received (e.g., from a microphone).
  2. Sampling: The ADC takes measurements (samples) of the wave's amplitude (height) at fixed time intervals.
  3. Quantisation: Each measured amplitude is rounded (quantised) to the nearest available digital value, which is then stored as a binary number.
  4. Output: A stream of binary numbers (digital sound data).

Did you know? When you record a voice note on your phone, an ADC is performing millions of samples per second!

Digital to Analogue Converter (DAC)

The DAC is used during playback (output). It converts the digital binary data back into an electrical analogue signal.

  1. Input: The DAC receives the stream of binary numbers from the computer memory.
  2. Conversion: It translates each binary number back into an electrical amplitude level.
  3. Signal Reconstruction: These levels are joined together to create a stepped analogue signal.
  4. Output: This electrical signal is sent to the speakers (or headphones), which smooth the signal and vibrate to produce audible sound waves.

Quick Review:
ADC = Analogue to Digital (Recording)
DAC = Digital to Analogue (Playback)

3. Digital Representation Parameters

The quality and size of a digital sound file depend entirely on two key factors set during the ADC process: Sampling Rate and Sample Resolution.

3.1 Sample Resolution (Bit Depth)

The sample resolution (or bit depth) is the number of bits used to represent the amplitude (volume) of a single sample.

  • Effect on Quality: Higher resolution means more possible amplitude levels, leading to a sound that is a more faithful representation of the original wave's subtle volume changes. This reduces quantisation error (the rounding mistake made during conversion).
  • Calculation: If we use \(n\) bits for resolution, we can represent \(2^n\) different amplitude values.
    Example: 8-bit resolution offers \(2^8 = 256\) amplitude levels. 16-bit offers \(2^{16} = 65,536\) levels (much better quality, used for CDs).

Analogy: The Ruler
Think of resolution as the markings on a ruler. A ruler marked in centimetres (low resolution) forces you to round a measurement significantly. A ruler marked in millimetres (high resolution) allows for a much more precise measurement.

3.2 Sampling Rate (Frequency)

The sampling rate (or sampling frequency) is the number of samples taken per second from the analogue wave. It is usually measured in Hertz (Hz), where 1 Hz means 1 sample per second.

  • Definition: Rate of samples taken per second.
  • Units: Hertz (Hz) or kilohertz (kHz, thousands of samples per second).
  • Effect on Quality: A higher sampling rate allows higher frequencies (pitches) in the original sound to be accurately captured. If the rate is too low, the digital recording will miss high-frequency details.
  • Example: CD quality uses a sampling rate of 44,100 Hz (44.1 kHz).

Analogy: The Camera
Think of the sampling rate as the frame rate of a video camera. If you take only a few pictures per second (low rate), rapid movement (high-frequency sound) will look jerky or blurry. If you take many pictures per second (high rate), the movement is smooth and accurate.

4. Nyquist's Theorem

So, how fast do we actually need to sample sound to capture it accurately? This is answered by Nyquist's Theorem.

  • The Theorem: To accurately represent all frequencies present in an analogue signal, the sampling rate must be at least twice the highest frequency in the signal.
  • Formula:
    Minimum Sampling Rate $\geq$ \(2 \times \text{Highest Frequency}\)

If the sampling rate is less than double the highest frequency, the system can suffer from aliasing, where the reproduced sound contains frequencies that were not in the original signal, leading to distortion.

Application to Human Hearing

The maximum frequency most humans can hear is approximately 20,000 Hz (20 kHz).

Therefore, according to Nyquist's Theorem:

Minimum Sampling Rate $\geq$ \(2 \times 20,000 \text{ Hz} = 40,000 \text{ Hz}\) (40 kHz)

This is why the standard CD sampling rate is 44.1 kHz—it comfortably exceeds the minimum requirement for capturing all audible sound frequencies.

5. Calculating Sound File Size

You must be able to calculate the total storage requirement for a sound sample. Remember that sound is often recorded in stereo (two channels, left and right), but the syllabus focuses on the core calculation based on time, rate, and resolution.

Step-by-Step Calculation

The formula required for calculating the file size in bits is:
$$ \text{File size (bits)} = \text{rate (Hz)} \times \text{res (bits)} \times \text{secs (number of seconds)} $$

To convert this size into Bytes, you must divide by 8 (since 1 Byte = 8 bits).

Example Calculation:
Calculate the storage size (in bytes) for a 10-second monaural audio clip sampled at 40 kHz with a 16-bit resolution.

1. Convert units if necessary:
Rate = 40 kHz = 40,000 Hz
Resolution = 16 bits
Time = 10 seconds

2. Calculate size in bits:
$$ \text{Bits} = 40,000 \times 16 \times 10 $$ $$ \text{Bits} = 6,400,000 $$

3. Convert to Bytes: (Divide by 8)
$$ \text{Bytes} = 6,400,000 / 8 $$ $$ \text{Bytes} = 800,000 \text{ Bytes} $$

Don't forget: If the audio was stereo (two channels), you would double the final size. Always read the question carefully!


Chapter Summary: Key Concepts to Memorise
  • Analogue: Continuous, real-world signals.
  • Digital: Discrete, finite, computer-readable binary data.
  • ADC: Analogue to Digital Converter (Recording).
  • DAC: Digital to Analogue Converter (Playback).
  • Sampling Rate (Hz): How often amplitude is measured per second (affects frequency/pitch captured).
  • Sample Resolution (Bits): Number of bits used for each measurement (affects precision/volume detail).
  • Nyquist: Rate must be at least twice the highest frequency.