Binary Representation of Sound
Learning Objectives:
Suggested time: 50 mins
Starter:
Start 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 (See below). After playing the two samples, ask the students what they notice about the two tracks.
(Source: PWNICT: (http://www.pwnict.co.uk/computingGCSE/computingResources.html)
Theory:
Next, explain that, in the previous lessons, the students looked at how numbers and pictures etc. are stored in a computer using binary and that in this lesson they will explore how a computer stores sound.
Explain that sound travels as a wave and show students the following example:
- 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:
Start 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 (See below). After playing the two samples, ask the students what they notice about the two tracks.
(Source: PWNICT: (http://www.pwnict.co.uk/computingGCSE/computingResources.html)
Theory:
Next, explain that, in the previous lessons, the students looked at how numbers and pictures etc. are stored in a computer using binary and that in this lesson they will explore how a computer stores sound.
Explain that sound travels as a wave and show students the following example:
Next, explain that amplitude controls how loud the sound is and the frequency controls the pitch. Display the following example on the board:
Explain that sound waves are analogue and that, in order to store the waves digitally on the computer, we need to convert the waveform into a numerical representation so that the waveform can be stored in binary. To do this, we use an Analogue-to-Digital Convertor (ADC).
Describe how the ADC works by taking samples of the sound wave at regular intervals and display the following diagram:
Describe how the ADC works by taking samples of the sound wave at regular intervals and display the following diagram:
Next, explain how the quality and size of the file is affected by two factors - sample rate and bit rate.
Explain 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.
Also explain 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.
Explain 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.
Also explain 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.
Finally, play the two samples from the beginning of the lesson and ask the students if they can identify which one was converted using the lower sampling rate.
Main:
Give students the following spreadsheet. Instruct students to fill in the following samples and map out the sound wave:
Main:
Give students the following spreadsheet. Instruct students to fill in the following samples and map out the sound wave:
sound_sampling_task.xlsx |
Samples:
Alternative:
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.
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.
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.
Tags: Binary Representation, Binary Representation of Sound, Sound, MP3, WMV, WAV, encoding, Amplitude, Frequency, Pitch, Sample rate, Tags: GCSE, KS4, Theory, Computing Theory, CS Theory, Binary, Binary Representation, binary 2, binary conversion, how to do binary conversion, counting binary, binary number to decimal, binary 101, 8 binary, binary digits, binary digit, meaning of binary