You are on page 1of 46

Topic 005

Sound

|
Overview
• Introduction.
• Multimedia system sound.
• Digital audio.
– Fourier Transform
– Sampling theorem
– Nyquist Theorem
• Making digital audio files.
• Audio file formats.
• Adding sound to multimedia project.
Based on material from:
Vaughan, T. (2011). Multimedia: Making it Work (8th Edition). New York: McGraw-Hill

2 |
Learning Outcomes

• Demonstrate the use of sound and audio in


multimedia projects.
• Demonstrate the important considerations in
recording and editing digital audio.
• Demonstrate characteristics of a signal.

3 |
Introduction (cont.)
 Vibrations in the air create waves of pressure that are
perceived as sound.
 Sound comprises the spoken word, voices, music and even
noise.
 Availed by nature and acquired converted into electronic
signal (varying voltage) by a transducer

Something Ear drums will


vibrates translate
in the air these changes in wave
forms as sound

|
4
Introduction (cont.)
 Sound waves vary in sound pressure level (amplitude)
and in pitch (frequency).

 Sound pressure levels (loudness or volume) are measured in


decibels (dB).

 Sound pitches (frequencies) are measured in Hertz (Hz).

 Optimally, people can hear from 20 Hz to 20,000 Hz


(20 kHz):
 Sounds below 20 Hz are infrasonic.
 Sounds above 20 kHz are ultrasonic.

|
Introduction (cont.)
 Phase - initial angle of a sinusoidal function at it's
original

 These properties result into parameters like:

 Bandwidth – the difference between the highest and


lowest frequencies

 Power – which is magnitude/amplitude squared


measured in decibels.

|
Introduction (cont.)

|
Introduction (cont.)
 Sound adds life to any multimedia application and plays important role in effective
marketing presentations:
• Advantages
 Ensure important information is noticed.
 Add interest.
 Can communicate more directly than other media.
• Disadvantage
 Easily overused.
• Challenge
 Requires special equipment for quality production.
• Limitation
 Not as memorable as visual media.

|
Introduction (cont.)
 Sound waves is described in terms of two characters:
• Amplitude (or loudness).
• Frequency (or pitch).

Time for one cycle

Amplitude wavelength

Cycle

|
Introduction (cont.)
 Amplitude is the maximum displacement of a wave from an
equilibrium position.

 The amplitude relates to how loud a sound is. The


louder a sound, the more energy and higher amplitude it has.

Quiet Loud

Low amplitude High Amplitude

|
Introduction (cont.)
 Frequency is a measure of how many cycles occur in one
second. This is measured in Hertz (Hz) and directly
corresponds to the pitch of a sound.

 The more frequent vibration occurs, the higher the pitch of


the sound.

Low pitch High pitch

|
Time domain and Frequency Domain
• A sound signal is a one-dimensional signal with levels varying in
time.
• The sound signal can be viewed from two positions (called
domains)
– Time domain
– Frequency domain
• The time domain views the wave with respect to the
independent time variable continuous time.
• The frequency domain decomposes the wave signal into its
individual frequency components
|
Fourier Transform
• Joseph Fourier, proved that any such waves is composed of
several pure sine and cosine wave (sinusoids)
• Mathematically, a single wave can be represented as
A*sin(wt+phi)
– Where A is the amplitude, w is the angular frequency in time, and phi is
the phase
– Soundwave = Asin(w0t+phi)+Asin(w1t+phi)...
• We can separate a wave signal into it's constituent Frequencies
(cosine+sine) waves. This phenomenon is called Fourier
Transform

|
Time domain vs Frequency domain

• https://www.youtube.com/watch?v=spUNpyF58BY
|
Digital Audio
 Digital audio is created when you represent the
characteristics of a sound wave using numbers – a
process referred to as digitization (the process of
converting an analog signal to digital).

 You can digitize sound from a microphone, a


synthesizer, natural source, existing recordings, live
radio and television broadcasts, and popular CD and
DVDs.

|
Digital Audio (cont.)
 Capture & Playback of Digital Audio
Digital to
Air pressure Analogue
variations Converter
Converts
back into
DAC
voltage
Captured via
microphone
Signal is
converted into
binary
Analogue (discrete form)
to Digital ADC 0101001101 Air pressure
Converter 0110101111 variations

|
Sampling
• Is the reduction of a continuous signal to a discrete signal.
• A sample is a value or set of values at a point in time and/or
space.
– A sampler is a subsystem or operation that extracts samples from a
continuous signal.
• Sampling interval – is the average time it takes to read the next
sample
• The sampling frequency or sampling rate, fs, is the average
number of samples obtained per unit time (1 second), thus fs =
1/T.
|
Sampling (Cont.)
 Quality factors for digital audio file :

Sample Rate / Frequency

• The number of sample points


taken per second to record
analogue audio
• Measured in hertz (hz)
• Common sampling rates: 8
khz, 11.025 khz, 22.05 khz,
44.1 khz

|
Sampling (Cont.)

|
Sampling (Cont.)
• Sound Sampling artifact: Aliasing
– It also refers to the distortion or artifact that results when the signal
reconstructed from samples is different from the original continuous
signal.
– Aliasing is an effect that causes different signals to become
indistinguishable (or aliases of one another) when sampled
– When aliasing occurs in a signal sampled in time domain it's called
temporal aliasing and in space domain it's called spatial alias.
– This is solved by applying Nyquist Theorem

|
Sampling (Cont.) : Aliasing

• https://www.youtube.com/watch?
v=yWqrx08UeUs
• https://www.youtube.com/watch?
|
Nyquist theorem
• Undersampling – Sampling that under-represents the original
signal/information
• Oversampling – Sampling that over represents the original signal
• For signal fidelity (minimize signal loss) – Prof Nyquist of MIT
observed that sampling should be done at least twice the highest
frequency component
• Fs (sampling frequency) = 2*F(highest frequency components);

|
Quantization of sound signals
• How do we represent each sample value?
• Quantization - Is the process of mapping a large set of
input values to a (countable) smaller set – such as
rounding values to some unit of precision.
• Can be Linear (scalar) or Non-Linear
– If the scale used for the vertical axis is linear, we say its linear
quantization;
– If its logarithmic then we call it non-linear.

|
Quantization & Encoding

 (1-10) https://www.youtube.com/watch?v=pj5qelg4gqE

|
Quantization errors

• The round-off error introduced by quantization is


referred to as quantization error.
• Quantization distortion is thus the difference
between the original signal and the quantized
signal
• Quantization also forms the core of essentially all
lossy compression algorithms.

|
Sound Systems
 Stereo – lifelike and realistic (two ears).
 Mono – fine but sound bit flat and uninteresting, dry and unexciting.
 Stereo require twice storage space as mono files (same length).

 Formulas for determining size (bytes) for digital recording:


• Size of a monophonic digital recording = sampling rate x duration of recording in
seconds x (bit resolution/8) x 1
• Size of stereo recording = sampling rate x duration of recording in seconds x (bit
resolution/8) x 2

|
Sound Systems
• Monophonic - Mono or monophonic describes a system where all
the audio signals are mixed together and routed through a single
audio channel. Mono systems can have multiple loudspeakers,
and even multiple widely separated loudspeakers.
• Stereophonic - True stereophonic sound systems have two
independent audio signal channels, and the signals that are
reproduced have a specific level and phase relationship to each
other so that when played back through a suitable reproduction
system, there will be an apparent image of the original sound
source

|
Sound Systems MIDI
• MIDI stands for “Musical Instrument Digital Interface” which is
developed for electronic musical instruments.
• MIDI is a technical standard that describes a protocol, digital
interface and connectors and allows a wide variety of electronic
musical instruments, computers and other related devices to
connect and communicate with one another.
• MIDI carries event messages that specify notation, pitch and
velocity, control signals for parameters such as volume, vibrato,
audio panning, cues, and clock signals that set and synchronize
tempo between multiple devices.
|
Sound Systems MIDI
• But MIDI data is not digitized sound; it is a shorthand
representation of music stored in numeric form.
• Digital audio is a recording,
– Depends on the capabilities of your sound system.
• MIDI is a score
– Depends on the quality of your computerized musical instruments and
the capabilities of your sound system.
• A MIDI file is a list of time-stamped commands that are
recordings of musical actions (the pressing down of a piano key or a
sustain pedal, for example, or the movement of a control wheel or slider).

|
Sound Systems MIDI

|
Making Digital Audio Files (cont.)
Recording Audio Files on the pc
Uses either:
1) Microphone
 Connect microphone to the microphone port and
record using sound recorder.

|
Making Digital Audio Files (cont.)
2) CD-ROM Drive
 Move music files from CD to hard drive or;
 Play the cd and then record using the sound recorder.
3) Line-in
 Pressing play on the audio source, which is connected
to the computer’s audio line-in socket. Record using
the sound recorder.

Line in
port on
Audio cable the pc

|
Making Digital Audio Files (cont.)
 Sound Recorders - both Macintosh &
Windows PC platform have the default
sound.
 This basic application could:
• Record our own sounds.
• Edit & mix *.wav files.
• Simple Splicing and assembly.
• Increase volume & speed of *.wav
files.
• Reverse the sound.
• Add Echo effects.
• Some XP Version also provide wav
to mp3 conversion.

|
Making Digital Audio Files (cont.)
Editing digital recordings
 Once a recording has been completed, it almost always needs
to be edited.

 Basic sound editing operations


 Trimming
 Splicing and assembly
 Volume adjustments

|
Making Digital Audio Files (cont.)
1) Trimming
 Removing dead air or blank space
from the recording.
 Unnecessary extra time.
 A few seconds trimming – effect file
size.
 Drag mouse cursor over graphic
representation and choosing menu
command (cut, clear, erase, silence).

|
Making Digital Audio Files (cont.)
2) Splicing and Assembly
 Using same tool as for trimming.
 Longer recording – cutting and
pasting together many shorter
ones.

|
Making Digital Audio Files (cont.)
3) Volume adjustment
 Assemble 10 different recording
into a single track.
 Provide consistent volume
 Raise or lower the overall
volume.
 Not increase too much.
 Use sound editor –
normalize to particular level
(80-90% of maximum).

|
Making Digital Audio Files (cont.)
4) Additional operations
 Format conversion (MP3, WAV..)
 Resampling or down sampling (size)
 Fade-ins and fade-outs – in and out
 Equalization
 Time stretching
 Reversing sounds

|
Making Digital Audio Files (cont.)
• Software • Others audio editing
• More advanced Digital audio software:
recording, editing & – Adobe Audition Pro
mastering software: – FL Studio
– Logic Pro X (Mac) – Ableton
– SOUND FORGE Pro (Windows) – Audacity

|
Making Digital Audio Files (cont.)
• Hardware
– Good computer (iMac, MacBook pro,)
– 2 studio monitors (special speakers for studio)
– Midi controller (musical instrument digital interface)
– Audio interface (sound card)
– Microphone cables, headphones, …)
– Sound proofing wall system
– Workstation desk
– Others (mic stand, AC…)
|
Lab exercise

• Use the Audacity manual together with the


software to explore more sound effect.
– http://www.audacityteam.org/download/
– http://manual.audacityteam.org/

|
Making Digital Audio Files (cont.)

|
Audio File Formats
• An audio format is a file format for storing digital audio data in a
computer.
• The bit layout of the audio data (excluding meta-data) is called
the audio coding format
• This can be uncompressed, or compressed to reduce the file
size, often using lossy compression
• The data can be a raw bitstream in an audio coding format, but
it is usually embedded in a container format or an audio data
format with defined storage layer.

|
Audio File Formats
• On the Macintosh, digitized sounds may be stored as data files,
resources, or applications such as AIFF or AIFC.
• In Windows, digitized sounds are usually stored as WAV files.
• The method used for consumer-grade music CDs is Linear Pulse
Code Modulation (LPCM), often shortened to PCM.
• The most common sound formats you might use are wav, aif,
aac, flv, mp3, mp4, mov, swf, wma, ogg, or for ringtones, m4r,
aac, midi, mmf, 3g2, 3gp, 3gp2, and 3gpp. Be sure your audio
software can read and write the formats you need!

|
Summary
 Vibrations in air create waves of pressure that are perceived as sound.

 It is important to know when to use digital audio /.

 A sound file’s format is a recognized methodology for organizing data bits


of digitized sound into a data file.

 The power of sound can make the difference between an ordinary


multimedia presentation and a professionally spectacular one.

|
Ole Sangale Road, Madaraka Estate. PO Box 59857-00200, Nairobi, Kenya
Tel +254 (0)20 606155, 606268, 606380 Fax +254 (0)20 607498
Mobile +254 (0)722 25 428, (0)733 618 135 Email info@strathmore.edu
www.strathmore.edu |

You might also like