KS3 Computing · A computer measures the height of a sound wave thousands of times a second and saves each measurement as a binary number. This is sampling.
Explain how sampling turns a smooth sound wave into a list of numbers.
Calculate a sound file's size: sample rate × bit depth × seconds × channels.
Use the Nyquist rule: sample at least twice as often as the highest frequency.
Explain how the Arduino's ADC turns a knob's voltage into a number from 0 to 1023.
Success criteria
I can sample a wave on squared paper and draw the stepped copy.
I can calculate the size of a short mono recording, with units.
I can say why music is sampled 44,100 times a second.
I can turn the knob and say what a reading of 512 means in volts.
Key words
Say each word, then read what it means. Every one is in the glossary too.
Sample rate
Sound samples taken per second, in hertz.
Bit depth
Bits per sound sample. Sets how precisely each is measured.
Analogue
Smooth and continuous, with any value possible.
Digital
Made of separate, countable steps.
ADC / DAC
Analogue-to-digital converter: turns a smooth signal into numbers.
The explanation
Read it here, or open the study page below to go one step at a time with things to try.
Sampling, step by step
Pick regular moments in time.
At each moment, measure how high the wave is.
Round it to the nearest level you're allowed to store.
Save the level as a binary number.
Repeat for the whole recording.
e.g.Example
With 3 bits (levels 0–7), 8 samples might be 4, 6, 7, 6, 4, 2, 1, 2 → stored as 100 110 111 110 100 010 001 010.
Sample rate: how often
Sample rate = samples per second, in hertz (Hz). More samples = closer to the real curve.
?Why?
Why do CDs use 44,100 Hz? People hear up to about 20,000 vibrations a second. You must measure each vibration at least twice (top and bottom). So you need over 40,000 samples a second.
Bit depth: how precisely
Bit depth = bits per sample. n bits give 2ⁿ levels.