Digital Audio. Acknowledgement Some part of this lecture note has been taken from multimedia course made by Asst.Prof.Dr. William Bares and from Paul.

Slides:



Advertisements
Similar presentations
MULTIMEDIA TUTORIAL PART - III SHASHI BHUSHAN SOCIS, IGNOU.
Advertisements

Speech Compression. Introduction Use of multimedia in personal computers Requirement of more disk space Also telephone system requires compression Topics.
Chapter 17 Mechanical Waves and Sound
PHYSICS OF SOUND PHYSICS OF SOUND HEARING CONSERVATION PROGRAM 1 28 Jan 2013.
Properties of Sound Neil Freebern. Sound Sound is produced when something vibrates. Vibrations disturb the air, creating variations in air pressure. Variation.
SIMS-201 Characteristics of Audio Signals Sampling of Audio Signals Introduction to Audio Information.
SWE 423: Multimedia Systems Chapter 3: Audio Technology (1)
IT-101 Section 001 Lecture #8 Introduction to Information Technology.
Sound. Sound Waves  Sound waves are longitudinal waves.  The source of a sound wave is a vibrating object.  Only certain wavelengths of longitudinal.
All sounds are produced by the vibration of matter. If there is no vibration, there is no sound.
Chapter 6 (Sections ) Sound. The speed of sound in a substance depends on: the mass of its constituent atoms, and the strength of the forces between.
Digital Audio.
CHAPTER 5 Discrete Sampling and Analysis of Time-Varying Signals Analog recording systems, which can record signals continuously in time, digital data-acquisition.
Sound. Sound is Energy in Waves Specifically, longitudinal waves Different from transverse waves.
Acoustics in Twenty Words or Less. What is Acoustics? The Science of Sound!
1 Multimedia Systems 1 Dr Paul Newbury School of Engineering and Information Technology ENGG II - 3A11 Ext: 2615.
Digital Audio Multimedia Systems (Module 1 Lesson 1)
Basic Concepts: Physics 1/25/00. Sound Sound= physical energy transmitted through the air Acoustics: Study of the physics of sound Psychoacoustics: Psychological.
Digital audio. In digital audio, the purpose of binary numbers is to express the values of samples that represent analog sound. (contrasted to MIDI binary.
LE 460 L Acoustics and Experimental Phonetics L-13
School of Informatics CG087 Time-based Multimedia Assets Sampling & SequencingDr Paul Vickers1 Sampling & Sequencing Combining MIDI and audio.
Fall 2004EE 3563 Digital Systems Design Audio Basics  Analog to Digital Conversion  Sampling Rate  Quantization  Aliasing  Digital to Analog Conversion.
Lab #8 Follow-Up: Sounds and Signals* * Figures from Kaplan, D. (2003) Introduction to Scientific Computation and Programming CLI Engineering.
 Sound is a form of energy similar to light, which travels from one place to another by alternately compressing and expanding the medium through which.
Lecture # 22 Audition, Audacity & Sound Editing Sound Representation.
DTC 354 Digital Storytelling Rebecca Goodrich. Wave made up of changes in air pressure by an object vibrating in a medium—water or air.
COMP Representing Sound in a ComputerSound Course book - pages
Acoustics/Psychoacoustics Huber Ch. 2 Sound and Hearing.
15.1 Properties of Sound  If you could see atoms, the difference between high and low pressure is not as great.  The image below is exaggerated to show.
Basics of Digital Audio Outline  Introduction  Digitization of Sound  MIDI: Musical Instrument Digital Interface.
Sound Overview The Facts of Sound The Ear and Sound Sound Vocabulary Musical Instruments and Sound.
COSC 1P02 Introduction to Computer Science 4.1 Cosc 1P02 Week 4 Lecture slides “Programs are meant to be read by humans and only incidentally for computers.
Introduction to SOUND.
Properties of Sound Physical Science Ms. Pollock
Sound Vibration and Motion.
1© Manhattan Press (H.K.) Ltd Radar speed trap.
David Meredith Aalborg University
 1) Determine the wave speed of a wave that has a period of 3 minutes and a wavelength of 0.05 m.  2) How are electromagnetic and mechanical waves different?
Fundamentals of Audio Production. Chapter 1 1 Fundamentals of Audio Production Chapter One: The Nature of Sound.
Sound
1 Introduction to Information Technology LECTURE 6 AUDIO AS INFORMATION IT 101 – Section 3 Spring, 2005.
Sound. Sound Waves Sound is a disturbance that travels through a medium as a longitudinal wave.
SOUND PRESSURE, POWER AND LOUDNESS MUSICAL ACOUSTICS Science of Sound Chapter 6.
Hearing: Physiology and Psychoacoustics 9. The Function of Hearing The basics Nature of sound Anatomy and physiology of the auditory system How we perceive.
Sound and Digital Sound v © Allan C. Milne Abertay University.
Encoding and Simple Manipulation
Digital Audio II. Volume Scaling The volume of a digitized audio source may be increased or decreased by multiplying each sample value by an appropriate.
1/27/2016Tech I Lighting Unit1 Sound: Properties and Functions Technical Theatre I.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2014.
Multimedia Sound. What is Sound? Sound, sound wave, acoustics Sound is a continuous wave that travels through a medium Sound wave: energy causes disturbance.
Ms. Barlow’s 8th Grade Physical Science Class
Digital Audio I. Acknowledgement Some part of this lecture note has been taken from multimedia course made by Asst.Prof.Dr. William Bares and from Paul.
SOUND PRESSURE, POWER AND LOUDNESS
ARCHITECTURAL ACOUSTICS
Physics Mrs. Dimler SOUND.  Every sound wave begins with a vibrating object, such as the vibrating prong of a tuning fork. Tuning fork and air molecules.
SOUND It is composed of waves of compression and rarefaction in which the human ear is sensitive It is composed of waves of compression and rarefaction.
What are waves?. I. Waves A. Definition: A disturbance that transfers energy from place to place. 1. What carries waves? A medium, a medium is the material.
Objective Sound and Psychoacoustics. Viers on Location Sound Gathering production sound Nat, b-roll, interview, dialog “Technique will trump technology”
Physical characteristics of sound Amplitude – The measure of displacement of the air pressure wave Frequency – Represents the number of periods.
 Sound is a longitudinal wave created by a vibrating object.  Sound is a mechanical wave.  PhET Simulation PhET Simulation  Demo: Standing Sound Waves.
Fourier Analysis Patrice Koehl Department of Biological Sciences National University of Singapore
The Physics of Sound.
Multimedia Systems and Applications
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Sound COS: #18 Use Models to determine how light and sound waves differ in how they are absorbed, reflected, and transmitted through different media.
MECH 373 Instrumentation and Measurements
C-15 Sound Physics 1.
Assist. Lecturer Safeen H. Rasool Collage of SCIENCE IT Dept.
Cornell Notes Sound Waves
Waves.
Presentation transcript:

Digital Audio

Acknowledgement Some part of this lecture note has been taken from multimedia course made by Asst.Prof.Dr. William Bares and from Paul L. Browning's thesis report "Audio Digital Signal Processing in Real Time.", available at Additional information may be found at

Sound Sound (to a physicist)  is a pressure wave which travels in air at 331ms-1 at 0 degrees: at 343m/s at 20 degrees C  with a frequency between 20 and 20,000 Hz (variations/second) and to a Psychologist... Sound is a perceptual effect caused by a pressure wave between 20 and 20,000Hz being detected at the ear.

Sound The vibration of matter, which in turn causes the surrounding air to vibrate, produces sound. The resulting pattern of oscillation is known as a waveform. A waveform may repeat its shape at regular intervals, known as the period.

Physical characteristics of sound The pressure wave has two physical characteristics: amplitude  the size of the pressure wave  that is, the size of the rarefactions and compressions in the pressure wave frequency  the number of compressions (or rarefactions) per second  related to the period of the sound = 1/frequency, and the wavelength of the sound = Cycle of sound/frequency

The frequency of a sound is the reciprocal of its period. Frequency represents the number of waveform periods in a second and is expressed by hertz (Hz) or cycles per second.

Characteristics of real sounds Sound waveform Frequency spectrum

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

Psychological characteristics of sound (I) From the perspective of sound being what we hear, sound has three defining characteristics: loudness  how loud (intense) the sound appears pitch  the sense of the sound having a tone timbre  the nature of the sound as befits psychological descriptions, these are inexact All sounds have a loudness, but many are unpitched timbre is often used as a catch-all term to describe those aspects of the sound not captured by loudness and pitch.

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 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 a higher frequencies than older people.

Measuring loudness Our ears have (essentially) a logarithmic response  loudness depends on power: proportional to amplitude * amplitude  doubling the power of a sound does not make it twice as loud  actually, (real, perceptual) loudness is difficult to compute Decibels  the ratio of the power of two signals is measured in decibels (dB)  this is a logarithmic scale  if signal1 has power P1, and signal2 has power P2, then  P2 is 10 log 10 (P2/P1) dB louder than P1  e.g. If P2 has 100 times the power of P1, it is 20dB louder 0 dB is the threshold for a human to hear a sound of 1000Hz 20dB whisper, 90dB loud music, 100dB risking damage, 140dB aeroplane

Quality and Fidelity (I) 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. Transduction:  Microphones and loudspeakers have a limited frequency response that is, 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 that is 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  e.g. telephony: we care really only about comprehensibility

Quality and Fidelity (II) 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. Analogue to digital conversion has two parameters:  sampling rate  sample size

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

Signal reconstruction Quantization Sample and hold reconstruction

Aliasing Aliasing occurs if a sound is sampled too slowly Better...

Sample size (I) Sample size refers to the characteristics of the sample value taken each sample time Samples have a fixed length  8-bit, (16-bit or 32-bit)  means each sample is a (2’s complement) 8-bit (16-bit or 32-bit) integer  e.g. range -128 to +127 for 8-bit; to for 16- bit

Sample size (II) Sampling may be linear or logarithmic  linear: for sample value x, actual value is (x/maximum)* K for some K  logarithmic: provides more resolution at lower levels mu-law (m-law) or A-law a form of data compression

Sample size (III) Major concern for storage of a sampled sound is the total amount of data collected Data length is proportional to sample rate * sample size  so 1 second of sound sampled at bit samples/second uses * 2 = bytes/second  and that is just 1 channel: stereo takes bytes/second about 10.5Mbytes/minute  this is CD-audio quality Data can be compressed  but decompression must take place in real time

Power and loudness: dynamic range Dynamic range  loudest measurable signal compared to quietest signal Measured using decibels  if signal1 has power P1, and signal2 has power P2, then  P2 is 10 log10(P2/P1) dB louder than P1 How this relates to sample size  consider the loudest signal possible, and the quietest signal possible  for 16 bit samples, the loudest one has times as high a value  but this value is a voltage: power is proportional to voltage * voltage  so it has * as much power  that is, about 1,000,000,000 times as much  that is 90dB dynamic range.  Note that the accuracy for quiet sounds is low.

Volume Scaling The volume of a digitized audio source may be increased or decreased by multiplying each sample value by an appropriate constant. This process is also known as applying a "gain" to the audio. A scale factor of 1.5 will increase the waveform amplitude or volume by 50%. A scale factor of 0.25 will reduce the waveform amplitude or volume to 25% of its original value. The pseudo code for the volume scaling effect is given below. For i = 1 to NumSamples Result[i] = Samples[i] * scaleFactor

Mixing Two waveforms can be "mixed" together by adding corresponding samples of each source waveform. It may sometimes be necessary to clamp the result values to lie within the dynamic audio range represented by the 8 or 16 bit sample values. For i = 1 to NumSamples// Assume both waveforms have same number of samples Result[i] = Samples1[i] + Samples2[i]

Example of mixing two audio waveforms

Echo An echo is a delayed and volume reduced copy of the original sound mixed with the original sound. Assume sound travels at a speed of 340 meters per second. To simulate the effect of sound bouncing off a wall 20 meters away, the sound travels meters over a duration of seconds (40 m / 340 m per second). If audio is processed at 11,000 samples per second, then the delay factor in number of samples is 0.117*11,000 = 1,287. By convention, the first n samples remain unchanged since no preceding samples are available. The resulting audio data will be n samples longer due to the echo.

For i = 1 to NumSamples+n if (i < n) Result[i] = Samples[i] else if (i >= n) and (i <= NumSamples) Result[i] = Samples[i] + scaleFactor*Samples[i – n] else Result[i] = scaleFactor*Samples[i-n]

Reverberation Reverberation is the combination of multiple echo effects, from different distances and with different attenuation factors. Reverb simulates the effect of multiple echoes caused by sound bouncing back and forth within an enclosed space. After each subsequent bounce, the echo produced will have a further reduction in volume and additional delay. Generally, reverberation in a small room decays much faster than reverberation in a large room, because in a small room the sound waves collide with walls much more frequently, and thus are absorbed more quickly, than in a large room.