Students sample a sound wave on a board, changing the samples a wave and the levels, to see that audio is stored as a list of measured, rounded amplitudes, and that more samples and levels sound closer but need more numbers (AC9TDI8K03 node 4).
Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
SlidesDownload Present from the browser, or export to PowerPoint or PDF.
WorksheetDownload Print the student copy; the Teacher edition has the answers.
Students will be able to
I can explain how a sound is stored as numbers.
I can say what changing the samples or the levels does.
I can work out how many samples a recording stores.
Timing
Predict and Try 6 min · Worked example 10 min · Vary 12 min · Practise and Make 12 min
Before class
Try the boards yourself, with sound on: the play buttons use the browser's audio (headphones help in class).
The one idea: sound is stored as samples, measurements of the wave's height at regular times, each rounded to a level. More samples and more levels are closer to the real sound and need more data.
Simplifications to say out loud: the board shows a few samples a wave of one pure tone; real recordings take 44 100 or 48 000 samples a second with 65 536 levels (16 bits), and playback smooths the steps. The "% off the wave" counts the step shape too, so it never reaches 0 here. Two samples a wave landing on the crossings is a simplified hint at the sampling theorem.
Running the lesson
Predict: students who chose "the wave is stored" hold Sam's misconception; come back to them after the Try.
Try: play the original and the copy at 8 and 16 samples.
Worked example: ask what level a sample at the very top of the wave gets.
Vary: the 2-samples task usually surprises; ask why the copy is silent.
Make: compare answers at 16 levels too (10 samples is then just over 10%).
The hard part (on purpose)
Students think the recording is the wave itself. Keep pointing at the dots: those are the only numbers the computer has; the steps are rebuilt from them.
When students get stuck
What you will see
A question to ask
The fix
A student says the computer stores the wave (Sam's mistake).
What are the dots on the board?
They are the only numbers stored; everything else is rebuilt.
A student thinks more levels means more numbers.
How many dots are there when you change the levels?
Same dots, finer rounding: levels change each number, not how many.
Answers to the checks
twice as many samples: A recording measures the wave **8** times each wave. You change it to **16** times each wave. The recording now holds… Twice as many numbers. Each measurement (sample) is one number, so twice as many samples is twice as many numbers, and the stepped copy gets closer to the real wave.
Try: take more samples: Move Samples a wave from 8 up to 16. How many numbers are stored now?
16 samples a wave × 2 waves = 32 numbers, twice as many as before. The steps are closer to the wave.
One wave, step by step: A recording takes 8 samples each wave, for 3 waves. How many numbers does it store? 24 8 × 3 = 24 numbers.
Find the mistake: Sam explains how sound is recorded. Click the line where the explanation first goes wrong. line 2 Line 2: the computer can't store a smooth curve. It stores measurements taken at regular times, each rounded to a level, so a recording is close to the sound but not exact.
More levels: What does using **more levels** change? Each sample can be rounded less, so it is closer to the real height More levels means finer rounding, so each number is closer to the real height. Each number then needs more space to store.
Fewer levels: Turn Levels down to 4. What happens to the steps? Play it.
With only 4 levels, every sample is rounded a long way, so the steps are coarse and it sounds harsher.
Many samples: Put Levels back to 256, then push Samples a wave to 32.
32 samples a wave with 256 levels hugs the wave closely: this is why good recordings take many samples and many levels.
Few samples: Now drop Samples a wave to 4. How close is the copy?
Only 4 measurements a wave: the steps are a rough copy, about 25% off the wave. Fewer samples, fewer numbers, worse sound.
Two samples: Drop Samples a wave to 2. What do the numbers say? Play it.
Both samples land where the wave crosses the middle, so every number is the same: the recording is silent. A wave needs more than two samples a wave to be caught.
Samples or levels?: Which stores more numbers: 32 samples a wave with 16 levels, or 16 samples a wave with 256 levels? 32 samples with 16 levels Each sample is one number, so 32 samples a wave is twice as many numbers. More levels make each number bigger to store, not more numbers.
CD quality: Music is sampled 44 100 times a second. How many samples are in a 10 second clip? 441000 44 100 × 10 = 441 000 samples (and twice that for stereo: two channels).
Half the rate: You halve the sample rate of a recording. What happens to the number of numbers stored? It halves Half the samples, half the numbers: a smaller file, but a rougher copy.
Big files: Why are music files so much bigger than text files? Every second needs tens of thousands of numbers A page of text is a few thousand codes; one second of music is 44 100 samples (per channel).
Review: pixels: Review: an image is 2 pixels by 2 pixels, three numbers a pixel. How many numbers? 12 4 pixels × 3 = 12 numbers.
just good enough: With 256 levels, find the fewest samples a wave that keep the copy less than 10% off the wave.
10 samples a wave is 9.8% off; 9 is 11%. Fewer samples make a smaller file, so engineers choose the fewest that sound good enough.
Solutions
One possible solution for each task. Other correct programs are fine.
Vary: one setting at a time › Fewer levels
Open task: any program that does what the step asks.
Vary: one setting at a time › Many samples
Open task: any program that does what the step asks.
Vary: one setting at a time › Few samples
Open task: any program that does what the step asks.
Vary: one setting at a time › Two samples
Open task: any program that does what the step asks.
Vary: one setting at a time › Samples or levels?
Open task: any program that does what the step asks.
just good enough
Open task: any program that does what the step asks.
Stretch and support
Stretch: Phone calls use about 8 000 samples a second; music uses 44 100. Why is a phone call still understandable?
Support: Keep the counting rule on the board: numbers = samples a wave × waves (or samples a second × seconds).
Exit ticket
A recording takes 8 000 samples a second for 5 seconds. How many samples? What happens to sound quality if you use 4 000 a second?
40 000 samples. Fewer samples: a rougher copy (and a smaller file).
What each step is for
twice as many samples: Committing to what doubling the samples does to the stored data tests the new move: a recording is a list of measurements, so more measurements means more numbers.
Try: take more samples: Moving the samples from 8 to 16 a wave settles the prediction: the count of numbers doubles and the steps hug the wave more closely.
Worked example: from wave to numbers: Following one wave through sampling, rounding and storing models the new move. Sam thinks the wave's shape is stored exactly, the misconception planted after the method.
Vary: one setting at a time: Each task changes one setting: fewer levels, many more samples, very few samples, then the edge case where two samples a wave land on the middle and store silence.
samples and sizes: Counting samples for real sample rates, halving the rate, why music files are big, and a review of counting numbers in an image.
just good enough: Finding the fewest samples that keep the copy within 10% reverses the process: students start from a quality target and choose the settings.
Where it leads
Next: Bits and binary numbers, then How many patterns? (why one byte holds 0 to 255 and why 16-bit audio has 65 536 levels).
Code links: micro:bit and Arcade play tones from numbers; the micro:bit's microphone gives a sound level 0 to 255.