GCSE Data - Sound

Starter: A computer stores data using binary 1s and 0s. How do you think sound files are stored in this method?

1 / 27
next
Slide 1: Open question
New lesson editorComputer ScienceLower Secondary (Key Stage 3)

This lesson contains 27 slides, with interactive quizzes and text slides.

time-iconLesson duration is: 60 min
Report this lesson

Items in this lesson

Starter: A computer stores data using binary 1s and 0s. How do you think sound files are stored in this method?

Data 2 -Sound


Key Vocabulary:

Amplitude

Sample rate

Bit depth

Sample interval

Analogue

Lossy 

Lossless

Compression


Today's lesson objectives:

• Understand how analogue sound is represented in binary, including:

‒ Amplitude

‒ Sample rate

‒ Bit depth

‒ Sample interval

• Understand the limitations of binary representation of audio data when constrained by the number of available bits

• Understand lossy and lossless compression in audio file formats


Analogue to digital conversion


Analogue sound signals are continuous



Digital signals are discrete.

This means the sound wave is sampled at regular intervals.





Sound is digitised by repeatedly measuring and recording the sound wave.


Analogue to digital convertors

Sounds must be converted into a digital form in order to be stored and processed by a computer:

  • An Analogue to Digital Convertor (ADC) is used to convert inputs to digital signals

  • A Digital to Audio Convertor (DAC) is used to convert digital signals to outputs


Sound Sampling


A sound sample is a measurement of amplitude of an analogue sound wave at a given time

  • Sound is sampled using a bit depth and sample interval in fractions of a second

  • The bit depth determines how closely the wave is sampled on the y-axis

Sound sampling


The sample rate is the number of samples taken per second

  • It is measured in hertz (Hz)

  • By contrast the sample interval is the length of time between each sample


Bit Depth

The number of bits used to record each measurement is known as the bit depth or sample resolution.

  • More bits used per sample enables the height of the wave to be more accurately measured but increases file size.











                                                                                                       What is the mistake on the graphs?

Bit Depth

The number of bits used to record each measurement is known as the bit depth or sample resolution.

  • More bits used per sample enables the height of the wave to be more accurately measured but increases file size.











                                                                                                                                                                    This graph has a bit depth of 3

Sample Rate

Sample rate is usually measured in hertz (Hz)

1Hz = 1 sample per second


CDs are usually sampled at 44,100Hz (44.1kHz)


FLAC (Free Lossless Audio Codec) files can have a sampling rate of up to 192 kHz.

What is the sample rate in Hz of the following sample?

Sample Rate

The sample rate (number of samples per second) affects the level of detail in the digital representation

The greater the sample rate, the greater the accuracy


Calculating sound file sizes

File size (bits) = sample rate × bit depth × duration

6 samples per second × 4-bit × 3 seconds = 72 bits / 8 = 9 bytes





Complete Task 1 on the Worksheet.

How accurately does your chart represent the original sound wave? Where are there inaccuracies in the digital reproduction of the wave?

Which was the high quality FLAC file?

A

The first clip

B

The second clip

C

I couldn't tell

D


Digitised sound quality


Recording quality improves:

  • the more frequently we sample the sound

  • the more accurately we record the wave height

Increasing the sample rate (frequency) means recording more data points

  • Increasing the bit-rate improves the accuracy of each data point

What happens to the size of the sound file if the frequency and bit-rate are increased?

Task 2

Complete task 2 on the worksheet

Our hearing range


We can hear sounds between 20-20,000 Hz.

Younger people can hear sounds at a higher frequency.


Raise your hand when you begin to hear the tone, the voice will tell you what the frequency is.

Lossy Compression

Lossy compression - MP3


Lossy compression removes sounds that we can’t easily hear or that least affect the perceived playback quality

Lossy compression leaves out some data from the original so can negatively affect the sound quality


However, a minute of music can be stored in 1 MB of an MP3 file, but needs 10 MB of an uncompressed WAV file

This is useful for storing, downloading or streaming


Lossless compression

Lossless compression


Lossless compression formats are able to reduce the file size when compressed but do not lose any information

The following music file formats are lossless:

  • FLAC (Free Lossless Audio Codec)

  • ALAC (Apple Lossless Audio Codec)

  • WMA Lossless (Windows Media Audio)


Sample rates are measured in which unit?

What is the name for the number of bits available to store each sample?

Hinterland knowledge



What is the formula for calculating the size of an uncompressed music file?

Track1.wav uses a sample rate of 20 kHz, Track2.wav uses a sample rate of 10 kHz. Which file is the higher quality? Which is the larger file size?