You are on page 1of 37

Audio & Sound

ETT 05213/COT 05205


Khamis Hussein
hsquares687@gmail.com
0713 578 288
Contents

➢ Basic sound Concepts


➢ Digital Audio
➢ Audio File Formats
➢ Software used for Audio
➢ MIDI: Musical Instrument Digital Interface
Basic Sound Concepts

What is sound?
• Sound is a continuous wave form produced by the vibration of
matter and transmitted as waves.
• Sound perception by human beings involves three systems:
➢ The source which emits sound;
➢ The medium through which the sound propagates
➢ The detector which receives and interprets the sound.
• Sound has ordinary wave properties and behaviors
➢ Reflection
➢ Refraction
➢ Diffraction
Basic Sound Concepts

What is sound?
• Sounds we heard everyday are very complex.
• Every sound is comprised of waves of many different
frequencies and shapes.
• But the simplest sound we can hear is a sine wave

Sound waves can be characterized by the following


attributes:
❖ Period Frequency
❖ Amplitude Bandwidth
❖ Pitch Loudness
❖ Dynamic
Basic Sound Concepts
Period
Is the interval at which a periodic signal repeats regularly.

However sound can be Periodic or nonperiodic

❖ Examples of periodic sound sources are:

➢ musical instruments, vowel sound ,whistling wind


and birds songs

❖ Nonperiodic sound sources are:

➢ Coughs, sneezes and rushing water


Basic Sound Concepts

Pitch & Frequency


• Pitch is a perception of sound by human
beings.
➢ It measures how ‘high’ is the sound as it is
perceived by a listener.
• Frequency measures a physical property of a
wave. It is the reciprocal value of period f=1/P
➢ The unit is Hertz (Hz) or kilohertz (kHz)

Multimedia systems make use of sound only


within the frequency range of human hearing
Basic Sound Concepts

Pitch & Frequency


• Musical instruments are tuned to produce a set
of fixed pitches
• Frequency range is divided into:
➢ Infra-sound 0 to - HZ
➢ Human hearing frequency 20Hz - 20kHz
➢ Ultrasound 20kHz -1GHz
➢ Hypersound
1GHz - 10THz
Basic Sound Concepts
Loudness & Amplitude
The other important perceptual quality is loudness or volume.

Amplitude is the measure of sound levels. For a digital sound, amplitude is


the sample value.
❖ The reason that sounds have different loudness is that they carry
different amount of power. The unit of power is watt.

❖ The intensity of sound is the amount of power transmitted through an area of


1𝑚2 oriented perpendicular to the propagation direction of the sound.

❖ If the intensity of a sound is 1𝑤𝑎𝑡𝑡/𝑚2, we may start feel the sound.

❖ The ear may be damaged.


Basic Sound Concepts
Loudness & Amplitude
The other important perceptual quality is loudness or volume.

Amplitude is the measure of sound levels. For a digital sound, amplitude is


the sample value.
❖ The reason that sounds have different loudness is that they carry
different amount of power. The unit of power is watt.

❖ The intensity of sound is the amount of power transmitted through an area of


1𝑚2 oriented perpendicular to the propagation direction of the sound.

❖ If the intensity of a sound is 1𝑤𝑎𝑡𝑡/𝑚2, we may start feel the sound.

❖ The ear may be damaged.


Basic Sound Concepts
❖ 2𝑤𝑎𝑡𝑡/𝑚2 , we may just be able to hear Typical sound levels generated

it. This is know as the threshold of by various sources

hearing. • 60 dB Jet engine

❖ The relative intensity of two different • 130 dB Large orchestra at


fortissimo
sounds is measured using the unit Bel
• 100 dB Car on highway
or more commonly deciBel (dB). It is
• 70 dB Voice conversation
defined by relative intensity in dB
• 50 dB Quiet residential areas
=10 log I2/I1 • 30 dB Very soft whisper

❖ Very often, we will compare a sound • 20 dB Sound studio


Note:
with the threshold of hearing
120 dB – Threshold of feeling
0 dB Threshold of hearing 9
Basic Sound Concepts
Dynamic & Bandwidth
❖ Dynamic range means the • FM radio 50Hz – 15kHz
change in sound levels. • AM radio 80Hz – 5kHz
➢ For example, a large orchestra • CD player 20Hz – 20kHz

can reach 130dB at its climax • Sound Blaster 16 sound card 30Hz –
20kHz
and drop to as low as 30dB at
• Inexpensive microphone 80Hz – 12kHz
its softest, giving a range of
• Telephone 300Hz – 3kHz
100dB.
• Children’s ears 20Hz – 20kHz
❖ Bandwidth is the range of • Older ears 50Hz – 10kHz
frequencies a device can • Male voice 120Hz – 7kHz
produce or a human can hear • Female voice 200Hz – 9kHz
Digital Audio
❖ Sound waves are continuous while computers are good at handling
discrete numbers.

❖ In order to store a sound wave in a computer, samples of the wave


are taken.

❖ Each sample is represented by a number, the ‘code’.

❖ This process is known as digitization.

❖ The process involves Sampling and Quantization


❖ This method of digitizing sound is know as Pulse Code
Modulation(PCM).
Digital Audio
❖ According to Nyquist sampling theorem, in order to capture all audible
frequency components of a sound, i.e., up to 20kHz, we need to set the
sampling to at least twice of this.

❖ This is why one of the most popular sampling rate for high quality
sound is 44100Hz or (44.1kHz).

❖ Another aspect we need to consider is the Resolution, i.e., the number


of bits used to represent a sample.

❖ Often, 16 bits are used for each sample in high quality sound.
This gives the SNR of 96dB
Digital Audio
Sound can be digitized from a

➢ Microphone,

➢ A Synthesizer,

➢ Existing tape recordings,


➢ Live radio and television
broadcasts,

➢ And popular CDs.


Audio Filtering
❖ Prior to sampling and AD conversion, unwanted

frequencies are removed by filtering the audio signal

❖ Kept frequencies depend on the application:

➢ Speech, contain 50Hz to 10kHz;

➢ Audio music signal, contain 20Hz to 20kHz

❖ Other frequencies are blocked by band-pass filter, also

called band-limiting filter.


Audio Quality vs. Data
❖ TRheautnecompressed data rate increases as more bits are
used for quantization

❖ Audio quality
➢ data rate and bandwidth

➢ Analog devices, bandwidth expressed in

frequency units ,Hertz

➢ Digital devices, bits per second, bps


Audio Quality vs. File Size
Formula for determining the size(in bytes) of the digital audio recording.
Monophonic
Size(bytes)= Sampling rate * duration of recording in seconds * (bit resolution)
/8*1
Stereo
Size(bytes)= Sampling rate * duration of recording in seconds * (bit resolution)
/ 8) * 2

Example:
For CD-quality music at 44.1 kHz, one minute of music requires about
10 MB of storage, 45 minutes of music 450 MB.
Prove!!!!
Audio Quality vs. File Size
➢ The sampling rate is how often the samples are taken.
➢ The sample size is the amount of information stored.
This is called as bit resolution.
➢ The number of channels is 2 for stereo and 1 for monophonic.
➢ The time span of the recording is measured in seconds.
➢ The sampling frequency most often used in recording CD-
quality 44.1kHz.

➢ Sampling sizes are either 8 bits or 16 bits.


➢ The larger the sampling size the better the data describes the
recorded sound.
Audio Quality vs. File Size
➢ The size of a digital recording depends on the
❖ sampling rate S File size bytes
R Sampling Rate samples per second
❖ resolution and
b Resolution bits
❖ number of channels. C Channels 1 - mono, 2 - stereo
D Recording Duration seconds
S = R x (b/8) x D

Note:
1Kbytes = 1024bytes
E. Elias 1Mbytes = 1024Kbytes
11/14/2013
SOME COMMON SAMPLING RATES AND RESOLUTIONS

Quality Sample Bits per Mono / Data Rate Frequen


Rate (Khz) Sample Stereo (uncompressed) cy Band
(kB/sec) (KHz)

Telephone 8 8 Mono 8 0.200-3.4

AM Radio 11.025 8 Mono 11.0 0.1-5.5

FM Radio 22.05 16 Stereo 88.2 0.02-11

CD 44.1 16 Stereo 176.4 0.005-20

DAT 48 16 Stereo 192.0 0.005-20

DVD Audio 192 (max) 24(max) 6 1,200 (max) 0-96 (max)


channels
AUDIO FILE FORMATS
A file format determines the application that is to be used
for opening a file. The most commonly used digital sound
format in Windows systems is .wav files.

Sound is stored in .wav as digital samples known PCM .


Each .wav file has a header containing information of the
file.
➢ type of format, e.g., PCM or other modulations
➢ size of the data
➢ number of channels
➢ samples per second
➢ bytes per sample
There is usually no compression in .wav files.
AUDIO FILE FORMATS
Some common audio files formats
Other format may use different 1. *.AIF, *.SDII in Macintosh

compression technique to reduce Systems

2. *.SND for Macintosh Systems


file size.
3. *.WAV for Windows Systems
❖ .vox use Adaptive Delta Pulse 4. MIDI files – used by north
Macintosh and Windows
Code Modulation(ADPCM)
5. *.WMA –windows media player

❖ mp3 MPEG-1 layer 3 audio. 6. *.MP3 – MP3 audio


7. *.RA – Real Player
❖ RealAudio file is a proprietary
8. *.VOC – VOC Sound
format. 9. AIFF sound format for Macintosh sound
files10.
10. *.OGG – Ogg Vorbis
MP3
❖ Moving Picture Experts Group, Audio Layer III

❖ A compressed digital music format

➢ Compression ratio (10:1)


❖ Freely available for anyone to develop a
decoder and player
AUDIO HARDWARE
Recording and Digitising sound:
❖ An analog-to-digital converter(ADC)
▪ Converts the analog sound signal into digital samples.
❖ A digital signal processor(DSP) processes the sample,
▪ e.g. filtering, modulation, compression, and so on.
Play back sound:
❖ A digital signal processor(DSP) processes the sample,
▪ e.g. decompression, demodulation, and so on.
❖ An digital-to-analog converter(DAC) converts the digital
samples into sound signal
AUDIO HARDWARE
❖ All these hardware devices are integrated into a few chips on
a sound card.
❖ Different sound card have different capability of
processing digital sounds.

❖ When buying a sound card, you should look at:

➢ maximum sampling rate


➢ stereo or mono
➢ duplex or simplex
Software used for Audio

❖ Windows device driver—controls the hardware device.


❖ Many popular sound cards are Plus and Play.
❖ Windows has drivers for them and can recognize them
automatically.
❖ For cards that Windows does not have drivers, you need
to get the driver from the manufacturer and install it with
the card.
❖ If you do not hear sound, you should check the settings,
such as interrupt, DMA channels, and so on
Software used for Audio
✓ There are several tools available for recording audio.
✓ Following is the list of different software that can be used
for recording and editing audio .

❖ Soundrecorder from Microsoft


❖ Apple’s QuickTime Player pro
❖ Sonic Foundry’s SoundForge for Windows
❖ Soundedit16
❖ CUBASE 5
❖ Nuendo
❖ Adobe Audition
MIDI: Musical Instrument Digital Interface

MIDI Overview
❖ Sound waves, whether occurred natural or man-made, are
often very complex, i.e., they consist of many frequencies. Digital
sound is relatively straight forward to record complex sound.
However, it is quite difficult to generate (or synthesize) complex
sound

❖ The better way to generate high quality music is using MIDI

❖ MIDI (Musical Instruments Digital Interface)


➢ A protocol enables musical devices to communicate
with each other
MIDI: Musical Instrument Digital Interface

MIDI Overview
❖ It is a communication standard developed in the early 1980s
for electronic instruments and computers.
❖ It specifies the hardware connection between equipments and format in which
the data are transfered between them.

❖ Common MIDI devices include electronic music synthesisers, modules, and


MIDI devices in common sound cards.

❖ General MIDI is a standard specified by MIDI Manufacturers


Association.
MIDI: Musical Instrument Digital Interface

MIDI Hardware

❖ An electronic musical instrument or a computer which has MIDI


interface should has one or more MIDI ports.

❖ The MIDI ports on musical instruments are usually labelled with:

✓ IN—for receiving MIDI data;


✓ OUT—for outputting MIDI data that are generated by the
instrument;

✓ THRU—for passing MIDI data to the next instrument.

MIDI devices can be daisy-chained together


MIDI: Musical Instrument Digital
Interface

MIDI Hardware
MIDI DATA

• Unlike digital sound, MIDI data does not encode


individual samples. MIDI data encode musical
events and commands to control instruments.
• MIDI data are grouped into MIDI messages.
• Each MIDI message represents a musical event,
e.g., pressing a key,
• setting a switch or adjusting foot pedals.
• A sequence of MIDI messages is grouped into a
track.
• An instrument or a computer satisfies both the
hardware interface and the data format is known
as a MIDI device
MIDI CHANNELS AND MODES
❖ MIDI devices communicate with each other through channels.

❖ The MIDI standard specifies each MIDI connection has 16 channels.


❖ Each instrument can be mapped to a single channel (omni Off), or it
can use all 16 channels (Omni On).

❖ Some instruments are capable of playing more than one note at the
same time, e.g., organs and piano. This is known as polyphony.

❖ Other instruments, such as flute, is monophony since they can only


play one note at a time.

❖ Each MIDI device must be set to one of the modes for receiving MIDI
data: Omni On/Poly
Omni On/Mono
Omni Off/Poly
Omni Off/Mono
Instrument Patch
❖ Each MIDI device is usually
capable of producing sound
resembling several real
instruments and/or noise
effects (e.g., telephone,
aircraft). Each instrument or
noise effect is known as a
patch, or preset.

❖ The general MIDI standard


specifies 128 patches(ranges
from 0 to
• 127).
MIDI Software
❖ MIDI player for playing MIDI music. This includes:
➢ Windows media player can play MIDI files
➢ Player come with sound card—Creative Midi player
➢ Freeware and shareware players and plug-ins —Midigate, Yamaha Midplug
❖ MIDI sequencer for recording, editing and playing MIDI
➢ Cakewalk Express, Home Studio, Professional
➢ Cubase
➢ Encore
➢ Voyetra MIDI Orchestrator Plus
❖ Configuration—Like audio devices, MIDI devices require a driver.
❖ Select and configure MIDI devices from the control panel.
MIDI Vs Digital Audio

Digital Audio MIDI


❖ Digital representation of physical ❖ Abstract representation of musical
❖ sound waves ❖ sounds and sound effects
❖ File size is large if without compression ❖ MIDI files are much more compact
❖ Quality is in proportion to file size ❖ File size is independent to the quality
❖ More software available ❖ Much better sound if the sound source is
high quality
❖ Play back quality less dependent on the
sound sources ❖ Need some music theory
❖ Can record and play back any sound including ❖ Cannot generate speech
speech.
Thanks for your
time

You might also like