Multimedia System Anddesign: (Audio)
Multimedia System Anddesign: (Audio)
Multimedia System Anddesign: (Audio)
(Audio)
Lecture 5
By:
Mohammad Noman
Audio vs Sound
2
What is SOUND?
• Sound comprises the spoken word, voices, music and
even noise.
• It is a complex relationship involving:
– a vibrating object (sound source)
– a preceptor (brain).
3
The Power of Sound
4
Waveforms
Sound waves are known as waveforms
5
Sound
7
Frequency
• Frequency is a measure of how many vibrations occur
in one second. This is measured in Hertz (abbreviation
Hz) and directly corresponds to the pitch ofa sound.
– The more frequent vibration occurs the higher the pitchof
the sound.
Quiet Loud
10
The characteristics of sound
waves
pitch distance
along wave
Cycle
11
Analogue to Digital Audio
Analogue audio
• The name for an electronic signal that carries its
information of sound as continuous fluctuating voltage
value.
• Analog refers to audio recorded using methods that
replicate the original sound waves.
Digitizing
• The process of converting an analog signal to a digital one.
• A sound is recorded by making a measurement of the
amplitude of the sound at regular intervals which are
defined by the "sample rate".
• The act of taking the measurement is often called
"sampling" and each measurement is called a "sample
point".
12
Capture and playback
of digital audio
Air pressure
variations Digital to
Analogue
Converter
Converts
back into
voltage DAC
Captured via
microphone
Signal is
converted into
binary
Analogue (discrete form)
to Digital ADC 0101001101 Air pressure
Converter 0110101111 variations
13
The Power of Sound
• Audio in Macintosh and Windows
– Both Macintosh and Windows PCplatform, have
the default systemsounds
– MACINTOSH Chu Toy, Glass, indigo, Laugh,
Simple Beep
– WINDOWS PC ding.wav, chimes.wav,
logoff.wav, start.wav
waveform
15
Digital Audio
• The three sampling frequencies most often used in
multimedia are 44.1 kHz, 22.05 kHz and 11.025 kHz.
– The higher sampling rate, more measurements are taken
better quality.
– The lower sampling rate, lesser the measurements are
taken low quality.
16
• Quality factors for digital audio file:
1. Sampling Rate
2. Sample Size (resolution)
• The number of bits used to record the
value of a sample in a digitized signal.
17
Sampling Rate
Frequency of sampling
Measure in Hertz
The higher sampling rate, higher quality sound but
size of storage is big.
Standard Sampling rate:
- 44.1 KHz for CDAudio
- 22.05 KHz
- 11.025 KHz for spoken
- 5.1025 KHz for audioeffect
18
Size Sample
The resolution of a sample is the number of
bits it uses to store a given amplitude value,
e.g.
8 bits (256 different values)
16 bits (65536 different values)
A higher resolution will give higher quality but will
require more memory (or diskstorage)
19
Digital Audio
• Other than that, it also depends on:
– The quality of original audio source.
– The quality of capture device & supportinghardware.
– The characteristics used for capture.
– The capability of the playbackenvironment.
20
Digital Audio
• More advanced Digital audio editing software:
– One of the most powerful and professional PC-based
packages is a tool called Sound Forge
http://www.sonicfoundry.com/
Gold Wave
PROSONIQ SonicWORX
Samplitude Studio 21
Midi Audio
• Musical Instrument Digital Interface
– Before there was a wide use of mp3 and high
bandwidth network, MIDI format audio is popular
when an audio is required to be put on a website.
– Provides a standardized and efficient means of
conveying musical performance information as
electronic data.
– Is a easiest and quickest way to compose our own
score.
• (provided we have knowledge of musical instrument
and composing)
– It is in the form of music score and not samples or
recording.
22
• MIDI files are very compact and very good for
low-bandwidth delivery.
23
Midi AudioFacts
• Since they are small, MIDI files embedded in web
pages load and play.
• Length of a MIDI file can be changed without
affecting the pitch of the music or degrading audio
quality.
• Working with MIDI requires knowledge of music
theory.
24
Recording MIDI Files
Recording MIDI Files
• MIDI files can be generated:
– By recording the MIDI data from a MIDI
instrument (electronic keyboard) as it is played.
– By using a MIDI sequencer software application.
25
Audio FileFormats
• MIDI
– *.MID, *.KAR, *.MIDI, *.SMF
• AUDIO DIGITAL
– WINDOWS *.WAV
– MACINTOSH *.AIFF
– UNIX *.AU
– REALAUDIO *.RA
– MPEG3 *.MP3
26
MIDI versus DigitalAudio
• Advantages of MIDI over digital audio:
– MIDI files smaller that digital audiofiles.
– Because small file, MIDI files embedded in web
pages load and play more quickly.
– If MIDI sound source are high quality –sound
better.
– Can change the length of MIDI files without
changing the pitch of the music ordegrading the
audio quality.
27
MIDI versus DigitalAudio
• Disadvantages of MIDI over digital audio:
– Because MIDI data does not represent the sound
but musical instruments, playback will be accurate
only if the MIDI playback (instrument) is identical
to the device used in the production.
29
Advantages & Disadvantages ofUsing
Audio
• Advantages
– Ensure important information is noticed.
– Add interest.
• Disadvantages
– Easily overused.
31
MP3 Format
MP3 is a standard format for music files sent
over the Internet.
MP3s:
– Use one of three MPEG standards for audio
compression
– Can compress an audio file to about one-twelfth
of the space it occupies on a CD with no
significant loss of sound quality
32
WAV Format
WAV is a standard for sound files on Windows
and Macintosh PCs.
WAVs:
– Do not compress audio as much as MP3s
– Are generally used for sound effects and other
small files
33
Sound Quality & FileSizes
• Stereophonic (stereo) sound refers to any method of
sound reproduction in which an attempt is made to
create an illusion of directionality and audible
perspective.
– This is usually achieved by using two or more
independent audio channels through a
configuration of two or more loudspeakers in such
a way as to create the impression of sound heard
from various directions, asin natural hearing.
– Thus the term "stereophonic" applies to so-called
"quadraphonic" and "surround-sound" systems as
well as the more common 2-channel, 2-speaker
systems.
34
Sound Quality & FileSizes
• It is often contrasted with monophonic, or
"mono" sound, where audio is in the form of
one channel
– often centered in the sound field (analogous to a
visual field).
• Stereo sound is now common in
entertainment systems such as broadcast
radio and TV, recorded music and the cinema.
35
36
37
Digital Audio Filesize
The formulas for determining the size (in bytes) of a
digital recording.
38
Digital Audio Filesize
• Resolution is measured in bits per sample.
Since there are 8 bits in a byte, you haveto
divide the bit resolution by8.)
• Q: What will be file size for a 10-second mono
recording at 22.05 kHz, 8-bit resolution?
22050 * 10 * 8 / 8 * 1
= 220,500 bytes
39
• What will be file size of 10-second stereo
recording at 44.1 kHz,16-bit resolution ?
44100 * 10 * 16 / 8 * 2
= 1,764,000 bytes.
40
Compressed File Formats
• There are both compressed and
uncompressed audio file formats
• Compression can be either
– Lossless = The quality of uncompressed audio
equals the quality of original audiofile
– Lossy = The quality of uncompressed audio is
lower than the original (e.g. mp3,wma)
• For compression/uncompression matching
algorighm pairs (codecs) are used
41
Codecs
• A device or program that compresses data to
enable faster transmission and decompresses
received data.
• An audio codec is a device or computer program
capable of coding or decoding a digital data
stream of audio.
• There must be one algorithm for compressing
and one for de-compressing (e.g. before
playback)
• Many codecs have to be installed as plugins for
player/editing applications
• There are many dedicated sites for downloading
codecs
42
Wave/WAV
• The uncompressed audio format developed by
Microsoft
• Wav files can be either mono or stereo files
and of different sample rates andresolutions
• Many platforms support wav files
43
UNIX/NeXT audio (.au)
• ”Original” format of networkedaudio
• Many early versions of browsers and
programming languages (e.g. Java) support
au-files
• Au was originally developed by Sun
44
AIFF
• Audio Interchange File Format
• Originally the sound format of Amiga &Apple
computers
• AIFF file consists of so-called chunks in which
the qualities of audio + the actual audio data
are stored
45
MPEG (mp3)
• Nowadays very popular compressed audio
format
• Mp3 is one of the subcategories ofMPEG
standard
• Mpeg 1 Layer 3 (mp3) was originally targeted
for transmitting speech over networks
• Several settings can be adjusted when
packaging audio into mp3 format
46
RealAudio
• .ra/.rm files
• The first audio format to usestreaming
technology
• The sound file can be listened while it isbeen
streamed into the harddrive (The complete
file doesn’t need to beloaded)
• Many internet radio stations use ReadAudioas
the broadcasting format
47
Other Audio Formats
• Besides the aforementioned there are may
audio formats for different uses:
– WMA
– Ogg
– Monkey’s Audio (.ape)
– FLAC
• In addition the audio editors produce files
which include project information + actual
audio data
48
Summary
• There are two main types of digitalaudio
– Sampled audio
• Captured by sampling an analogue waveform at
a set rate
– MIDI data
• Instructions on how to perform some musical
composition
• Sampled audio requires more storage space than
MIDI information
49