You are on page 1of 40

Audio

and
Multimedia

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 233
Basics of Digital Audio
• Audio is crucial for multimedia presentations.
• In a sense, it is the simplest form of multimedia data.
• Some important differences between audio and video
information cannot be ignored:
• could be useful to drop few video frames out of a video
stream in order to facilitate viewing speed.
• cannot do the same with sound information or all sense
of audio dimension will be lost.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 234
What is Sound?
• Sound is a wave phenomenon like light, but it is microscopic
and involves molecules of air being compressed and
expanded under the action of some physical device.
• A speaker in an audio system vibrates back and forth and
produces a longitudinal pressure that we perceive as
sound.
• Without air there is no sound.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 235
What is Sound?
• Sound (to a physicist)
 is a pressure wave which travels in air
with speed of 331m/s (at 0 degrees Co)
and about 343m/s (at 20 degrees Co)
 with a frequency between 20 and 20,000 Hz (variations/second)
• To a Psychologist...
 Sound is a perceptual effect caused by a pressure wave
of between 20 and 20,000Hz being detected at the ear.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 236
Components of Sound System
• Source — Generates Sound (Air Pressure changes)
 Electrical — Loud Speaker
 Acoustic (Sound) — Direct Pressure Variations
• Destination — Receives Sound
 Electrical — Microphone produces electric signal
 Ears — Responds to pressure hear sound

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 237
Devices for sound generation and transduction
• For input to a computer, the pressure wave is
– converted to an analogue electrical signal (transduced)
– converted to a digital signal (digitised)
• For output from a computer, the digitised signal is
– converted to an analogue signal
– converted to a pressure wave

Speaker

DAC
ADC
Microphone Computer

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 238
Sound Wave
• When you see a visual waveform that represents audio, it
reflects these waves of air pressure.
• The zero (A) line in the waveform is the pressure of air at
rest. When the line swings up to a peak (C), it represents
higher pressure; when the line swings down to a trough (B), it
represents lower pressure.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 239
Waveform measurements
• Frequency
Measured in hertz (Hz), describes the number of cycles per second.
(For example, a 1000-Hz waveform has 1000 cycles per second.) The
higher the frequency, the higher the musical pitch.
• Phase
Measured in 360 degrees, indicates the position of a waveform in a
cycle. Zero degrees is the start point, followed by 90º at high
pressure, 180º at the halfway point, 270º at low pressure, and 360º
at the end point.

• Wavelength
Measured in units such as inches or centimeters, is the distance
between two points with the same degree of phase. As frequency
increases, wavelength decreases.
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 240
Waveform measurements
• Amplitude (C)
Reflects the change in pressure from the peak of the waveform to the
trough. High-amplitude waveforms are loud; low-amplitude
waveforms are quiet.

• Cycle (A)
Describes a single, repeated sequence of pressure changes, from zero
pressure, to high pressure, to low pressure, and back to zero.

A. Wavelength
B. Degree of phase
C. Amplitude
D. One second

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 241
Sound waves interaction
• When two or more sound waves meet, they add to and
subtract from each other.
• If their peaks and troughs are perfectly in phase, they
reinforce each other, resulting in a waveform that has higher
amplitude than either individual waveform.

In-phase waves reinforce each other

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 242
Sound waves interaction
• If the peaks and troughs of two waveforms are
perfectly out of phase, they cancel each other out,
resulting in no waveform at all.

Out-of-phase waves cancel each other out

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 243
Sound waves interaction
• In most cases, however, waves are out of phase in
varying amounts, resulting in a combined waveform
that is more complex than individual waveforms.
• A complex waveform that represents music, voice,
noise, and other sounds, for example, combines the
waveforms from each sound.

Two simple waves combine to create a complex wave

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 244
Stereo Sound Signal

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 245
Musical Sound Signal (Zoom in)

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 246
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 247
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 248
Combination of Musical Sound Signals

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 249
Frequency spectrum

Sound’s description in terms of the relative amplitude of its frequency component


Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 250
Binaural Sound
• Sound recorded using a synthetic head

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 251
Binaural recording
• A method of recording sound that uses two microphones,
arranged with the intent to create a 3-D stereo
sound sensation for the listener of actually being in the
room with the performers or instruments.
• This creates the illusion that the sound source is placed
and moving in a real 3 dimensional space.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 252
Binaural recording
• The effect is often created using a technique known as
"Dummy head recording", wherein a mannequin head is
outfitted with a microphone in each ear.
• Binaural recording is intended for replay using
headphones and will not translate properly over stereo
speakers.
• The technique uses to microphones placed about 18cm
apart facing away from each other. This distance and
placements simulates the positioning of the human's ear
canals.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 253
Binaural vs stereo
• The term "binaural" has frequently been confused as a
synonym for the word "stereo―.
• Conventional stereo recordings do not factor in natural ear
spacing or "head shadow" of the head and ears, since
these things happen naturally as a person listens.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 254
Properties of Sound
• Reflection: bouncing
• Refraction : changing of angle when entering a medium
with different density.
• Diffraction: being around an obstacle.
• Distance
– we can often also tell (roughly) the distance of a sound
source
– this comes partly from the loudness of the sound, and
partly from other characteristics of the sound - e.g. number
and form of reflections
 This makes the design of ―Surround sound‖ possible.
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 255
Psychological characteristics of sound
• From the perspective of sound being what we hear, sound
has three defining characteristics:
 loudness: how intense the sound is perceived
 Pitch ‫طبقت‬: the sense of the sound having a tone

 Timbre ‫ نبرة‬: the nature of the sound (the same tone


could be heard different with different instrument/voices)

• As befits psychological descriptions, these are inexact.


• All sounds have a loudness, but many have no pitch
• Timbre is often used as a catch-all term to describe those
aspects of the sound not captured by loudness and pitch.
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 256
Pitch and Loudness
• Pitch perception is complex
– Complex tones (many frequency components) often
have a lower pitch than a pure tone of the same mean
frequency
– A low pitched tone may consist entirely of energy at
high frequencies.
• Apparent loudness of a sound depends on the frequency as
well as the amplitude of the sound
– human ear responds differently to different frequencies
– young people can often hear higher frequencies than
older people.
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 257
Measuring Sound

• Our ears have (essentially) a logarithmic response

LINEAR LOGARITHMIC

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 258
Measuring Sound Pressure Level and dB SPL

• One parameter of the acoustic (sound) wave which is


generally used to assess sound exposure to humans is the
sound pressure level expressed in μPa or Pa.
• Human ear’ audible sound pressure levels range from 20
μPa (hearing threshold) till 20 Pa (pain threshold),
• resulting in the scale 1:10,000,000.
• Since using such a large scale is not practical, a logarithmic
scale in decibels (dB) was introduced which is also in
agreement with physiological and psychological hearing
sensations.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 259
decibels
• dB of sound pressure level (dB SPL) is defined as:
20 log10 p1/p0
where p1 is actually measured sound pressure level of a
given sound, and p0 is a reference value of 20μPa, which
corresponds to the lowest hearing threshold of the young,
healthy ear.
In the logarithmic scale the range of human ear’s audible
sounds is from 0 dB SPL (hearing threshold) to
120-140 dB SPL (pain threshold) (see table 1 below).

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 260
Decibels
• ratio of the power of two signals
• is measured in decibels (dB)
• if signal 1 has power P1, and signal 2 has power P2,
 P2 is 20 log10(P2/P1) dB louder than P1
 e.g. If P2 has 100 times the power of P1,
 it is 20dB louder

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 261
Loudness Limits
• 0 dBA is the softest level that a person can hear.
• Normal speaking voices are around 65 dBA.
• A rock concert can be about 120 dBA.
• Sounds that are 85 dBA or above can permanently damage
your ears.
• The more sound pressure a sound has, the less time it
takes to cause damage.
• For example, a sound at 85 dBA may take as long at 8
hours to cause permanent damage,
• while a sound at 100 dBA can start damaging hair cells after
only 30 minutes of listening.
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 262
Loudness damage Limits
Permissible 0 dB is the threshold for a human
Continuous dB
Exposure Time to hear a sound of 1000Hz
85 dB 8 hours 20dB whisper
88 dB 4 hours 90dB loud music
91 dB 2 hours 100dB risking damage
94 dB 1 hour 140dB aeroplane engine at close
97 dB 30 minutes range
100 dB 15 minutes
103 dB 7.5 minutes
106 dB 3.75 min (< 4min)
109 dB 1.875 min (< 2min)
112 dB .9375 min (~1 min)
115 dB .46875 min (~30 sec)

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 263
Quality ‫ جودة‬and Fidelity ‫وضوح‬
Whenever sound is transduced, digitised, or reconverted to
analogue, the original signal is altered in some way. When
high quality reproduction is required, we need to keep this
alteration to a minimum.

Speaker

DAC
ADC
Microphone Computer

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 264
Transduction
• Microphones and loudspeakers have a limited frequency
response
• they are more sensitive to sounds with certain
frequencies
• we would like a flat frequency response from 20 to
20KHz
• They also have a limited dynamic range
• they cannot deal with sounds from the quietest up to the
loudest
• the range in energy of everyday sounds is huge
• For some applications, we may sacrifice quality
telephony: we care really only about comprehensibility ‫مفهوم‬
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 265
Digitizing sound
• Sound is digitised using an analogue to digital converter
(ADC)
• Sound is converted back to analogue using a digital to
analogue converter (DAC)
• Both forms of conversion can introduce alterations in the
sound
• but the ADC is the more problematic.

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 266
Analogue to digital conversion
Analogue to digital conversion has two parameters:
– sampling rate
– sample size

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 267
Sampling Rate
• Sampling rate describes how frequently the analogue signal
is converted
– Normally measured in samples/second
• Conversion is done regularly, at a fixed number of
samples/second
– sampling rate must be at least twice the highest
frequency of interest (Nyquist sampling theorem)
otherwise aliasing ‫ تمويه‬can occur

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 268
Sample size
Sample size refers to the amplitude of the sample value
taken each sample time.

Samples have a fixed length


• 8-bit, (16-bit or 32-bit) which means each sample is a 2’s
complement (-tve to +tve integer)

e.g. range -128 to +127 for 8-bit;


-32768 to +32767 for 16-bit

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 269
Sample size
• Major concern for storage of a sampled sound is the total
amount of data collected. Data length is proportional to
sample rate * sample size
 1 second of sound sampled at 44,100 samples/second
with 16 bit (2 bytes ), uses
44,100 * 2 bytes = 88,200 bytes/second
 that is just 1 channel: stereo takes 176,400 bytes/second
 about 10.5Mbytes/minute (176,400 * 60)
 this is CD-audio quality
Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 270
Aliasing
• Aliasing occurs if a sound is sampled too slowly

Low
sampling rate

Better
sampling rate

Dr. Rudwan Ali A Abdullah, Multimedia, Autumn 2012, IT College, Tripoli University 271
End of lecture

You might also like