Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Computer Science Compiled – Workbook 2023 – Part 1 | A Level 9618 (Lower Six) | © M.

Muttur

NOTES: 1.2.2 - MULTIMEDIA: SOUND


LEARNING OBJECTIVES
a) Show understanding of how sound is represented and encoded
b) Show understanding of the impact of changing the sampling rate and resolution

1.2.2 (A) – REPRESENTING AND ENCODING SOUND


Computers are often needed to store and play back recorded sound. Real sound is analogue in nature. The
human ear and brain understand analogue sound but computers only handle digital data (binary numbers).

Sound is actually the slight and subtle movement of air (vibration) causing your ear drum to move along. Your
brain senses and interprets this eardrum movement as sound.

If a sound is to be handled by a computer, the analogue sound from any source has to be converted into a set
of binary numbers (digital data). You need to digitise the sound with some input device. This is called ‘sampling’
the sound. A microphone may be used as an input device for sensing the incoming sound.

Analogue data is used normally for a physical property (e.g. temperature, sound level, pressure, light intensity,
etc.) and can have any value from a continuous range of values.

Digital data is data that has been stored as a binary value and can have one of a

Sound is measured in ‘cycles per second’. 1 cycle per second is 1 Hertz (Hz). This is the frequency of the sound.
Your brain senses this as the pitch of the sound. The frequency is the speed of vibration. If the air is moving
slowly, you can sense this as a low pitched bass sound. If the air is moving quickly, you sense this as a high
pitched treble sound. You can hear between 20 Hz and 20 KHz.

The loudness of the sound is the amplitude of the sound. Sound is a wave; the loudness is therefore the height
of the wave.

The task then, is to convert the sound in the range 20 Hz to 20 KHz and to deal with a range of amplitudes.

Muzzammil Muttur |  5 493 1972 | learnatedutech@gmail.com | @mmuttur 1


Computer Science Compiled – Workbook 2023 – Part 1 | A Level 9618 (Lower Six) | © M. Muttur

1.1.3 (B) SAMPLING RATE AND RESOLUTION


Sampling is a method of converting an analogue sound signal into a digital file containing binary numbers. The
diagram below shows a typical sound wave.

Sampling is to take a regular measurement of the sound wave at a specific point in time.

Each of the samples above are measuring the amplitude of the signal at that instant. This results in a set of
numbers like this:
Sample Number Measurement
1 0.6
2 0.5
3 -0.3
4 -0.8
5 -0.1

Each sample is then converted into the equivalent binary number. The whole collection of data is then stored
in a digital file. There may be thousands of sample making up the complete sound track. So, the longer the
sound track, the larger the file becomes.
The sampling frequency (also called sampling rate) is the number of samples per second. E.g. a sampling rate
of 44100 Hz means that 44 100 samples are taken per second.

The sampling frequency affects the quality of the recording.

What happens if the samples are taken too slowly compared to the sound signal?

Muzzammil Muttur |  5 493 1972 | learnatedutech@gmail.com | @mmuttur 2


Computer Science Compiled – Workbook 2023 – Part 1 | A Level 9618 (Lower Six) | © M. Muttur

Consider the example below:

The table of values recorded are shown below:

Sample Number Measurement


1 0.7
2 0.7
3 0.7

Every value is the same. All the frequency information of the sound has been missed. This shows that there is
a minimum rate at which samples need to be taken in order to faithfully reproduce the original signal. The
minimum sampling rate is at least twice the highest frequency in the signal. This is called the Nyquist sampling
frequency (named after the scientist who developed the idea of sampling analogue data into approximate
digital data).

A CD that has sound going up to 20 KHz, the minimum sampling rate is 40 KHz. This is why the music industry
uses 44.1 KHz.

Increasing the sampling rate, increases the accuracy.

You should use sampling rate more than 40 kHz because of anti-aliasing filters. You should have some reserve in
frequency to prevent signal distortion due to filter's response slope. The actual value of 44.1 kHz was suggested
by Sony Corp. when audio recording standard was under discussion in 1979. They used this rate widely for that
moment.

Sampling Resolution (also called sampling depth or bit depth)


We have to store the measurement taken by each sample. How accurate is that measurement. If we use a 2
bit binary number then we can only represent 4 possible values. Sampling resolution is the number of bits used
to encode the data for one sample.

Muzzammil Muttur |  5 493 1972 | learnatedutech@gmail.com | @mmuttur 3


Computer Science Compiled – Workbook 2023 – Part 1 | A Level 9618 (Lower Six) | © M. Muttur

In the above diagram, a sample can only have four values as represented by the 2 bit number. This is not
accurate at all. For low quality applications, it is normal to use 8 bit resolution. With careful adjustment, 8 bits
will give 256 discrete levels. The maximum value is 1111 1111 and the minimum one is 0000 0000.

The table below shows the different sampling rates:

Sample File Size Quality


44 KHz – 16 bit (21 seconds) 3.50 Mb CD
22 KHz – 8 bit (20 seconds) 0.42 Mb Basic
11 KHz – 8 bit (11 seconds) 0.12 Mb Telephone

A balance is to be struck between sampling rate, sampling depth, sound quality and file size.

Clipping
This is a form of distortion that occurs when an amplifier is overdriven and attempts to deliver an output voltage
or current beyond its maximum capability.

Typical Features of Sound Editing Software


Basic and most common features of sound editing software:
 Amplify...
o Increases or decreases the volume of the audio you have selected. When you open the dialog,
Audacity automatically calculates the maximum amount you could amplify the selected audio
without causing clipping (distortion caused by trying to make the audio too loud).
 Change Pitch...
o Change the pitch of a track without changing its tempo.
 Change Speed...
o Change the speed of a track, also changing its pitch.

Muzzammil Muttur |  5 493 1972 | learnatedutech@gmail.com | @mmuttur 4


Computer Science Compiled – Workbook 2023 – Part 1 | A Level 9618 (Lower Six) | © M. Muttur

 Echo...
o Repeats the selected audio again and again, normally softer each time. The delay time between
each repeat is fixed, with no pause in between each repeat. For a more configurable echo effect
with a variable delay time and pitch-changed echoes, see Delay...
 Fade In
o Applies a fade-in to the selected audio, so that the amplitude changes gradually from silence at
the start of the selection to the original amplitude at the end of the selection. The rapidity of the
fade-in depends entirely on the length of the selection it is applied to.
 Fade Out
o Applies a fade-out to the selected audio, so that the amplitude changes gradually from the
original amplitude at the start of the selection down to silence at the end of the selection. The
rapidity of the fade-out depends entirely on the length of the selection it is applied to.
 Noise Reduction...
o Reduces constant background noise such as fans, tape noise, or hums. It will not work for
removing talking or music in the background.
 Repeat...
o Repeats the selection the specified number of times.
 Reverse
o Reverses the selected audio, so that it will sound as if it is playing from the end to the start.
 Truncate Silence...
o Automatically try to find and eliminate audible silences.

Muzzammil Muttur |  5 493 1972 | learnatedutech@gmail.com | @mmuttur 5


Computer Science Compiled – Workbook 2023 – Part 1 | A Level 9618 (Lower Six) | © M. Muttur

Muzzammil Muttur |  5 493 1972 | learnatedutech@gmail.com | @mmuttur 6

You might also like