PyGCSE Python Lab

Sound Sampling — Sample Rate, Bit Depth & File Size

Learn how analogue sound is digitised using sampling, how sample rate and bit depth affect quality, and how to calculate audio file sizes.

📚 Learning Steps

💡 Study Tips
  • • Read through at your own pace
  • • Try the interactive simulators hands-on
  • • Study the pseudocode — it appears in exams
  • • Quiz yourself before moving on

Step 1: How Is Sound Digitised?

📖 Theory

Sound is an analogue signal — a continuous wave of air pressure. Computers can only store digital (discrete) data. So we need to convert the continuous wave into numbers.

Sampling is the process of measuring the amplitude (height) of the sound wave at regular intervals and recording each measurement as a binary number.

The process:

1. A microphone converts sound waves into an electrical signal
2. An ADC (Analogue-to-Digital Converter) measures the signal at regular intervals
3. Each measurement is rounded to the nearest available level and stored as binary
4. The result is a series of numbers that approximate the original wave

The more frequently we sample, and the more precisely we measure, the closer the digital version is to the original analogue sound.

🎯 Key Points
  • Sound is analogue (continuous) — computers need digital (discrete)
  • Sampling = measuring the wave's amplitude at regular intervals
  • An ADC (Analogue-to-Digital Converter) performs the sampling
  • Each sample is stored as a binary number
  • Higher quality sampling = closer approximation to the original
0/5 steps completed