1.1.3 Sound
1.1.3 Sound
1.1.3 Sound
3 Sound
Sound travels as a wave. Sound waves in nature are continuous, this means they have an almost
infinite amount of detail that you could store for even the shortest sound. This makes them very difficult to
record perfectly, as computers can only store discrete data, data that has a limited number of data
points.
The amplitude controls how loud the sound is and the frequency controls the pitch.
:
In order to store the analogue sound waves digitally on the computer, we need to convert the waveform
into a numerical representation so that the waveform can be stored in binary. This is called 'sampling' the
sound. A sound encoder has two components. The first is a band-limiting filter. This filter removes high
frequency components that the human ear can't hear. The other component of the encoder is an
analogue-to-digital converter (ADC).
An ADC will sample a sound wave at regular time intervals. For example, a sound wave like this can be
sampled at each time sample points:
1
The following diagram explains the conversion from analogue to digital signals and then back to analogue
for playback.
An analogue sound wave is picked up by a microphone and sent to an Analogue to Digital (ADC) converter
in the form of analogue electrical signals. The ADC converts the electrical signals into digital values which
can be stored on a computer.
Once in a digital format you can edit sounds with programs such as audacity.
To play digital audio you convert the sound from digital values into analogue electrical signals using the
DAC, these signals are then passed to a speaker that vibrates the speaker cone, moving the air to create
sound waves and analogue noise.
Sound Quality
The quality and file size is affected by two factors - sample rate and bit rate.
Sampling rate: The sample rate refers to the number of samples taken every second. The greater the
frequency of the samples, the better the sound quality. This is measured in Hertz.
To create digital sound as close to the real thing as possible you need to take as many samples per
second as you can. When recording MP3s you'll normally use a sampling rate between 32,000, 44,100
and 48,000Hz (samples per second). That means that for a sampling rate of 44,100, sound waves will
have been sampled 44,100 times per second! Recording the human voice requires a lower sampling rate,
around 8,000Hz. The Nyquist theorem states that the sampling must be done at a frequency at least
twice the highest frequency in the sample.
Sound is often recorded for two channels, stereo, feeding a left and right speaker whose outputs may
differ massively. Where one channel is used, this is called mono. 5.1 surround sound used in cinemas
and home media set ups use 6 channels.
File Size
To work out the size of a sound sample, the following equation can be used:
Exercise 1
1. Why might you choose to have a lower sampling rate than a higher one for storing a song on
your computer?
2. For the following sound sample work out its size:
Sample Rate = 16,000Hz
Sample Resolution = 8 bit
Length of Sound = 10 seconds
5. Using the grid below, plot the following sample points for a sample resolution of 3 bits per
sample: 000001100101100011100110111101
6. Sample the sound wave below and convert it into binary form:
So why not just use 20kHz as our sampling rate record 20k cycles per second and be done with it? There
is a small problem:
Cycle - A complete oscillation (up and down) in a sound wave
Period - The time that a wave takes to oscillate one cycle.
Frequency - The number of waves passing a point per second
we are going to try and sample this sound that shows 3 cycles
taking one sample per cycle leads to a straight line! We're going to need more samples
What we need to properly represent a sound wave is to sample it at least two times per cycle:
Therefore the minimum sampling rate that satisfies the sampling for the human ear is 40 kHz (2*20kHz).
The 44.1 kHz sampling rate used for Compact Disc was chosen for this and other technical reasons.
Nyquist's theorem - the sample rate should be at a frequency which is at least twice the value of the
highest frequency in the sampled signal
QUESTIONS
1. For a sound sample of maximum frequency 16kHz what should the sample rate be?
Answer :
32kHz
Answer :
the sample has a frequency of 4 cycles per second. Using Nyquist's theorem you would have to sample this at
least at 8Hz