
Learning Objectives:
- Explain how sound can be sampled and stored in digital form
- Explain how sampling intervals and other considerations affect the size of a sound file and the quality of its playback
Suggested time: 50 mins
Starter:
I started the lesson by playing two samples of the same track (Tenacious D - Tribute “The Best Song In The World”), each compressed at different sample rates, which I downloaded from PWNICT: (http://www.pwnict.co.uk/computingGCSE/computingResources.html) - Click on 2.1.4 representation of data --> Lesson 5 Sound in Binary. You can find a direct link to the two samples below. After playing the two samples, I asked the students what they noticed about the two tracks.
Next I explained that, in the previous lessons, we looked at how numbers and pictures etc. are stored in a computer using binary and that in this lesson we will explore how a computer stores sound.
I explained that sound travels as a wave and showed students the following example.
I described how the ADC works by taking samples of the sound wave at regular intervals and displayed the following diagram:
I explained that the sample rate refers to the number of samples taken every second and that the greater the frequency of the samples, the better the sound quality.
I also explained that the bit rate refers to the number of bits used to store each sample and that the more bits that are sampled, the better the accuracy of the file but also the greater the file size.
Students were given the following spreadsheet and instructed to fill in the following samples and map out the sound wave:

sound_sampling_task.xlsx |
Alternatively, students could use Audacity (Free) to explore how sound is stored on a computer. Students could be given an .MP3 file which they open in Audacity and zoom in to see the value of each sample. Students could then export the sound file using different sample rates and investigate the effect the sample rate has on sound quality.
Students were instructed to update their class revision wiki.
Useful Resources:
PWNICT - Excellent PowerPoint presentation from PWNICT – Computing Resources explaining how sound is stored on a computer - Click on 2.1.4 representation of data --> Lesson 5 Sound in Binary
Classzone – Frequency / Amplitude simulator
Binary representation of sound worksheet – Courtesy of Emma Partridge (via CAS). Download the worksheet here: http://community.computingatschool.org.uk/resources/1035
Extract from the CHRISTMAS LECTURES 2008: Chris Bishop - The Ghost in the Machine showing how sound is stored on a computer - Skip to 13:40.

binary_representation_of_sound.pdf |
Suggested time: 50 mins
Main:
Students were instructed to setup their Raspberry Pis and to launch IDLE 3.
Students were then asked to continue to work through Mark Clarkson’s Introduction to Python booklet: (http://community.computingatschool.org.uk/resources/14)
Alternative:
Alternatively, if you do not have access to a set of Raspberry Pis, students can still complete the Python challenges:
To install Python for FREE, go to the python.org website and download a standard installation of the latest version of Python. This will provide you with everything you need.