Starter Activity (5 mins)
Let's tune into sound!
1. Sound in the real world (like your voice or music) is an analogueA signal that is continuous and can take any value within a range. Sound waves are analogue. signal. What do you think "analogue" means in this context?
2. Computers work with digitalA signal that is discrete, meaning it can only take on specific, separate values (usually represented by binary 0s and 1s). data (binary). How might a computer capture and store a continuous sound wave as digital data?
3. What factors do you think might affect the quality of a digital sound recording (e.g., making it sound clear vs. muffled)?
Example Answers:
- Analogue means the signal is continuous and can have any value within a range, like a smooth wave.
- Computers might take lots of quick measurements (samples) of the sound wave's height at different points in time and store these measurements as numbers.
- Factors affecting quality could include: how often the sound is measured (sample rate), how precisely each measurement is stored (bit depth), the quality of the microphone, and background noise.
Lesson Outcomes
By the end of this lesson, you should be able to:
- Explain how sound is sampledRecording the amplitude (height) of a sound wave at regular intervals. and stored in digital form.
- Define sample rateThe frequency (rate) at which samples are measured per second. Sample rate is usually measured in Hertz (Hz). 1Hz = 1 sample per second. and explain its effect on sound quality and file size.
- Define bit depthAlso known as sample resolution. The number of bits used to record each measurement (sample). More bits allow for more accurate representation of the amplitude. (sample resolution) and explain its effect on sound quality and file size.
- Understand the role of duration in sound file size.
- Calculate sound file sizes (File size = Sample Rate × Duration × Bit Depth).
Introduction to Digital Sound
Sound waves in the real world are analogueA signal that is continuous and can take any value within a range. Sound waves are analogue. signals – they are continuous and vary smoothly over time. Computers, however, work with digitalA signal that is discrete, meaning it can only take on specific, separate values (usually represented by binary 0s and 1s). data (binary 0s and 1s).
To store sound digitally, the analogue sound wave must be converted. This process is called samplingRecording the amplitude (height) of a sound wave at regular intervals.. The amplitude (height or loudness) of the sound wave is measured at regular time intervals. Each measurement (or "sample") is then converted into a binary number and stored.
The more frequently we take samples (sample rateThe frequency (rate) at which samples are measured per second. Sample rate is usually measured in Hertz (Hz). 1Hz = 1 sample per second.) and the more bits we use to store each sample (bit depthAlso known as sample resolution. The number of bits used to record each measurement (sample). More bits allow for more accurate representation of the amplitude.), the closer the digital representation will be to the original analogue sound, resulting in higher quality but also a larger file size.
Task 1: Key Sound Concepts (Max 6 points)
Answer the following questions about the key concepts in digital sound.
1. Describe what sample rateThe frequency (rate) at which samples are measured per second. Sample rate is usually measured in Hertz (Hz). 1Hz = 1 sample per second. refers to in digital audio and state the unit it's measured in.
2. The audio represented below uses a bit depthAlso known as sample resolution. The number of bits used to record each measurement (sample). More bits allow for more accurate representation of the amplitude. of 4 bits. Describe what that means.
3. If we increase the bit depth of the audio to 6 bits, what is the total number of possible amplitude levels that a sample can be approximated to?
4. Describe the effect that increasing the bit depth has on the qualityIncreasing the colour depth or resolution will make this better of the audio AND the file sizeThis goes up if we make the quality better by increasing the colour depth or resolution, meaning we need more storage.
Task 2: Interactive Waveform Simulator (Not Scored)
Adjust the Sample RateThe frequency (rate) at which samples are measured per second. Sample rate is usually measured in Hertz (Hz). 1Hz = 1 sample per second. and Bit DepthAlso known as sample resolution. The number of bits used to record each measurement (sample). More bits allow for more accurate representation of the amplitude. to see how they affect the digital representation of an analogue sound wave. Observe how the sampled wave (blue steps) tries to approximate the original analogue wave (red curve).
Conceptual File Size: 0 bits
Note: The "analogue" wave is a simple sine wave for demonstration. Higher sample rates take more "snapshots" per second. Higher bit depth provides more precise levels to represent the wave's amplitude at each snapshot.
Task 3: Sound File Size Calculation (Max 3 points per calculation)
Calculate the file size for the following audio files. Remember the formula:
File Size (bits) = Sample RateThe frequency (rate) at which samples are measured per second. Sample rate is usually measured in Hertz (Hz). 1Hz = 1 sample per second. (Hz) × Duration (seconds) × Bit DepthAlso known as sample resolution. The number of bits used to record each measurement (sample). More bits allow for more accurate representation of the amplitude. (bits).
Convert your final answer to a suitable unit (e.g., Bytes, KB, MB). Show your working for one question.
Real-World Context: Digital Audio
Understanding digital sound representation is key to many technologies we use daily:
- Music Streaming (Spotify, Apple Music): These services deliver compressed audio files. The quality settings often relate to the original sample rate and bit depth before compression. Higher quality means larger files and more data usage.
- CDs: Standard CD quality audio is typically sampled at 44.1 kHz (44,100 samples per second) with a 16-bit depth.
- Digital Voice Assistants (Alexa, Siri): Your voice commands are sampled, digitized, and sent to servers for processing.
- Phone Calls (VoIP): Voice over IP services digitize your voice for transmission over the internet. Sample rate and bit depth are balanced for clarity and bandwidth efficiency.
- Video Games & Movies: High-quality sound effects and music in games and films are created and stored using digital audio principles, often at high sample rates and bit depths for immersion.
Sound Myth Busters!
Myth: "A higher sample rate ALWAYS means the sound will be noticeably better to human ears."
Reality: While higher sample rates capture more information, human hearing has limits (typically up to ~20 kHz). The Nyquist-Shannon sampling theorem states that the sample rate needs to be at least twice the highest frequency you want to capture. CD quality (44.1 kHz) already captures frequencies beyond typical human hearing. Extremely high sample rates (e.g., 192 kHz) might offer theoretical benefits for audio processing but often don't result in a perceptible difference for most listeners, while significantly increasing file size.
Myth: "Bit depth only affects how loud the sound is."
Reality: Bit depthAlso known as sample resolution. The number of bits used to record each measurement (sample). More bits allow for more accurate representation of the amplitude. determines the number of possible amplitude levels for each sample. While this relates to the dynamic range (difference between loudest and quietest sounds), it more directly impacts the precision of each sample. Higher bit depth reduces quantization noise (the error introduced when approximating an analogue value with a digital one), leading to a cleaner, more detailed sound with a lower noise floor, not just overall loudness.
Exam Practice Questions
1. Explain how an analogue sound wave is converted into a digital sound file. [3 marks]
Mark Scheme:
- The amplitude/height of the analogue sound wave is measured/taken at regular/set intervals. (1 mark) - This is samplingRecording the amplitude (height) of a sound wave at regular intervals..
- Each sample/measurement is converted into/stored as a binary number / digital value. (1 mark)
- These binary numbers/samples are stored in sequence (to represent the sound). (1 mark)
- (Allow: The digital representation is an approximation of the original analogue wave.)
2. A sound file is recorded for 10 seconds at a sample rate of 22,050 Hz using a bit depth of 8 bits. Calculate the file size in Kilobytes (KB). Show your working. (Assume 1 KB = 1000 Bytes). [3 marks]
Mark Scheme:
- File size in bits = Sample Rate × Duration × Bit Depth = 22050 × 10 × 8 (1 mark for correct formula/values).
- File size in bits = 1,764,000 bits (1 mark for correct calculation in bits).
- File size in Bytes = 1,764,000 / 8 = 220,500 Bytes.
- File size in KB = 220,500 / 1000 = 220.5 KB (1 mark for correct final answer in KB with unit).
Key Takeaways
- Sound is an analogueA signal that is continuous and can take any value within a range. Sound waves are analogue. wave; computers store it digitally.
- SamplingRecording the amplitude (height) of a sound wave at regular intervals. is measuring the sound wave's amplitude at regular intervals.
- Sample RateThe frequency (rate) at which samples are measured per second. Sample rate is usually measured in Hertz (Hz). 1Hz = 1 sample per second. (Hz): How many samples are taken per second. Higher rate = better quality, larger file.
- Bit DepthAlso known as sample resolution. The number of bits used to record each measurement (sample). More bits allow for more accurate representation of the amplitude. (bits): Number of bits used to store each sample's amplitude. Higher depth = more amplitude levels, better quality, larger file.
- File Size (bits) = Sample Rate × Duration (s) × Bit Depth.
- Higher sample rate and bit depth generally improve sound qualityIncreasing the colour depth or resolution will make this better but increase file sizeThis goes up if we make the quality better by increasing the colour depth or resolution, meaning we need more storage.
What's Next?
You've now covered the fundamentals of how sound is represented digitally!
This completes the "Data Storage" sub-topic (1.2.4) within "Memory and Storage". The next topic in the specification is:
- Compression (Lossy & Lossless) (Spec 1.2.5)
Extension Activities
1. Nyquist-Shannon Sampling Theorem
The quality of a digital audio recording is heavily influenced by the sample rate. There's a famous theorem related to this.
Research Task: What is the Nyquist-Shannon sampling theorem? How does it relate to the minimum sample rate needed to accurately capture a sound of a certain frequency (e.g., human speech or music)?
2. Audio File Formats (WAV, MP3, FLAC)
Digital audio is stored in various file formats. Some are uncompressed, some use lossless compression, and others use lossy compression.
Research Task: Compare WAV, MP3, and FLAC audio file formats. For each, state whether it's typically uncompressed, lossy, or lossless. What are the typical use cases or advantages/disadvantages of each?