Chapter: Representing Sound

Welcome! In this chapter, we are going to explore how computers turn the sounds we hear in the real world—like your favorite song or a voice message—into data they can understand. Since computers only speak the language of binary (1s and 0s), they need a clever way to "measure" sound waves. Understanding this is key to knowing why some audio files sound amazing while others sound a bit fuzzy!

1. Analogue vs. Digital Sound

In the real world, sound is analogue. This means it travels as a continuous wave. If you were to draw it, it would be a smooth, curvy line that never breaks.
However, computers are digital. They can’t store a smooth curve; they can only store separate, distinct numbers.

The Problem: How do we get a smooth curvy wave into a list of numbers?
The Solution: We use sampling.

Analogy: Imagine trying to draw a circle using only Lego bricks. From far away, it might look like a circle, but if you look closely, it’s actually made of many tiny square blocks. Digital sound is just like that!

Key Takeaway: Sound must be converted from analogue (continuous) to digital (discrete numbers) so a computer can store and process it.

2. What is Sampling?

To convert sound, the computer takes "snapshots" of the sound wave at regular intervals. This process is called sampling.

At every interval, the computer measures the amplitude (the height or "loudness") of the wave at that exact moment. Each measurement is then saved as a binary number.

Step-by-Step: How it works
1. The analogue sound wave is received by a microphone.
2. At set time intervals, the amplitude of the wave is measured.
3. These measurements are converted into binary values.
4. To play the sound back, the computer uses these numbers to recreate the wave.

Did you know? A standard CD takes 44,100 snapshots of sound every single second! That’s a lot of measuring!

3. Sampling Rate and Sample Resolution

To understand the quality of digital sound, we need to look at two main settings: Sampling Rate and Sample Resolution.

A. Sampling Rate

The sampling rate is how many samples (measurements) are taken every second.
• It is measured in Hertz (Hz).
1 Hertz = 1 sample per second.
The Rule: The higher the sampling rate, the more closely the digital wave matches the original analogue wave. This makes the sound higher quality but creates a larger file size.

B. Sample Resolution

The sample resolution (sometimes called bit depth) is the number of bits used to store each sample.
• If you use more bits, you can measure the amplitude more accurately.
The Rule: A higher sample resolution results in a more accurate recording that sounds closer to the original, but it also increases the file size.

Quick Review:
Higher Rate = Better quality + Larger file.
Higher Resolution = Better quality + Larger file.

Memory Aid: Think of a digital photo. Sampling Rate is like the number of pixels (how many dots), and Sample Resolution is like the number of colors available for each dot (how accurate each dot is).

4. Calculating Sound File Sizes

Don't worry if maths isn't your favorite subject—the formula for sound file size is very straightforward! To find the total size in bits, you just multiply everything together.

The Formula:
\( \text{File size (bits)} = \text{Sampling Rate} \times \text{Sample Resolution} \times \text{Seconds} \)

Example Calculation:
If a 10-second recording has a sampling rate of 100Hz and a sample resolution of 8 bits, what is the file size?
\( 100 \times 8 \times 10 = 8000 \text{ bits} \)

To convert those bits into bytes, remember that there are 8 bits in a byte. You would simply divide your answer by 8.
\( 8000 / 8 = 1000 \text{ bytes} \)

Common Mistake to Avoid: Always check if the question asks for the answer in bits or bytes! If it asks for bytes, don't forget that final step of dividing by 8.

5. Summary and Key Terms

Key Terms to Remember:
Analogue: A continuous signal (like a smooth wave).
Digital: Data represented by numbers (1s and 0s).
Sampling: Measuring the amplitude of a sound wave at regular intervals.
Sampling Rate: The number of samples taken per second (Hz).
Sample Resolution: The number of bits used to store each sample.
Hertz (Hz): The unit used for frequency/sampling rate.

Final Tip for the Exam: If you are asked how to make a sound file smaller, you can suggest lowering the sampling rate or lowering the sample resolution. Just be aware that this will make the sound quality worse!