Fundamentals of Digital Audio. The Central Problem n Sound waves consist of air pressure changes n This is what we see in an oscilloscope view: changes.

Slides:



Advertisements
Similar presentations
Analog to digital conversion
Advertisements

Analog Representations of Sound Magnified phonograph grooves, viewed from above: When viewed from the side, channel 1 goes up and down, and channel 2 goes.
Sound can make multimedia presentations dynamic and interesting.
Digital Audio — The Nuts and Bolts A digital audio overview ranging from bit rate, sample rate, and compression types to room acoustics, microphones, and.
Speech Compression. Introduction Use of multimedia in personal computers Requirement of more disk space Also telephone system requires compression Topics.
The Illinois Society of Electroneurodiagnostic Technologists (ISET) Fall Meeting: Electronics Crash Course for Technologists Saturday, November 9, 2013.
4-Integrating Peripherals in Embedded Systems (cont.)
Motivation Application driven -- VoD, Information on Demand (WWW), education, telemedicine, videoconference, videophone Storage capacity Large capacity.
LSU 06/04/2007Electronics 71 Analog to Digital Converters Electronics Unit – Lecture 7 Representing a continuously varying physical quantity by a sequence.
Information Processing & Digital Systems COE 202 Digital Logic Design Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University.
SIMS-201 Characteristics of Audio Signals Sampling of Audio Signals Introduction to Audio Information.
IT-101 Section 001 Lecture #8 Introduction to Information Technology.
CHAPTER 5 Discrete Sampling and Analysis of Time-Varying Signals Analog recording systems, which can record signals continuously in time, digital data-acquisition.
Digital audio recording Kimmo Tukiainen. My background playing music since I was five first time in a studio at fourteen recording on my own for six months.
Introduction to Data Conversion
Image and Sound Editing Raed S. Rasheed Sound What is sound? How is sound recorded? How is sound recorded digitally ? How does audio get digitized.
Digital Voice Communication Link EE 413 – TEAM 2 April 21 st, 2005.
Light to Electricity: lines begin and end in black (low signal level) called Blanking between blanking is the active video scanning is precisely controlled.
Fundamentals of Digital Audio. The Central Problem n Waves in nature, including sound waves, are continuous: Between any two points on the curve, no matter.
Digital Audio Multimedia Systems (Module 1 Lesson 1)
Representing Sound in a computer Analogue  Analogue sound is produced by being picked up by a transducer (microphone) and converted in an electrical current.
 Principles of Digital Audio. Analog Audio  3 Characteristics of analog audio signals: 1. Continuous signal – single repetitive waveform 2. Infinite.
Analogue and Digital Signals SL – Option C.1. Signals When talking about electronics we will talk about ‘signals’ –This is simply the transfer of information.
Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital.
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
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
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.
Sampling Terminology f 0 is the fundamental frequency (Hz) of the signal –Speech: f 0 = vocal cord vibration frequency (>=80Hz) –Speech signals contain.
Lab #8 Follow-Up: Sounds and Signals* * Figures from Kaplan, D. (2003) Introduction to Scientific Computation and Programming CLI Engineering.
Introduction to Interactive Media 10: Audio in Interactive Digital Media.
Multimedia Technology Digital Sound Krich Sintanakul Multimedia and Hypermedia Department of Computer Education KMITNB.
Art 321 Sound, Audio, Acoustics Dr. J. Parker. Sound What we hear as sound is caused by rapid changes in air pressure! It is thought of as a wave, but.
CSC361/661 Digital Media Spring 2002
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
1 4-Integrating Peripherals in Embedded Systems (cont.)
Computer Some basic concepts. Binary number Why binary? Look at a decimal number: 3511 Look at a binary number: 1011 counting decimal binary
Announcements Chapter 11 for today No quiz this week Instructor got behind…. We'll be back in MGH389 on Friday.
Digital Recording Theory Using Peak. Listening James Tenney, Collage #1 (“Blue Suede”),  Available in Bracken Library, on James Tenney Selected.
ECE 4710: Lecture #9 1 PCM Noise  Decoded PCM signal at Rx output is analog signal corrupted by “noise”  Many sources of noise:  Quantizing noise »Four.
Basics of Digital Audio Outline  Introduction  Digitization of Sound  MIDI: Musical Instrument Digital Interface.
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.
Analogue and Digital Signals SL – Option C.1 HL – Core 14.1.
Introduction to SOUND.
Audio / Sound INTRODUCTION TO MULTIMEDIA SYSTEMS Lect. No 3: AUDIO TECHNOLOGY.
1 Introduction to Information Technology LECTURE 6 AUDIO AS INFORMATION IT 101 – Section 3 Spring, 2005.
Digital Recording. Digital recording is different from analog in that it doesn’t operate in a continuous way; it breaks a continuously varying waveform.
Analogue & Digital. Analogue Sound Storage Devices.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2009.
1 Manipulating Audio. 2 Why Digital Audio  Analogue electronics are always prone to noise time amplitude.
Multimedia Sound. What is Sound? Sound, sound wave, acoustics Sound is a continuous wave that travels through a medium Sound wave: energy causes disturbance.
Basics of Digital Audio Module (revised)
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.
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
Digital Audio Hygiene Alistair Hirst OMNI Audio Theory and Practice.
Lifecycle from Sound to Digital to Sound. Characteristics of Sound Amplitude Wavelength (w) Frequency ( ) Timbre Hearing: [20Hz – 20KHz] Speech: [200Hz.
Fourier Analysis Patrice Koehl Department of Biological Sciences National University of Singapore
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Data Representation.
Multimedia: making it Work
Data analysis and modeling: the tools of the trade
Multimedia Systems and Applications
Chapter 3 Sampling.
Analogue & Digital.
Fundamentals Data.
Fundamentals of Multimedia
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Recap In previous lessons we have looked at how numbers can be stored as binary. We have also seen how images are stored as binary. This lesson we are.
Presentation transcript:

Fundamentals of Digital Audio

The Central Problem n Sound waves consist of air pressure changes n This is what we see in an oscilloscope view: changes in air pressure over time

The Central Problem n Waves in nature, including sound waves, are continuous: Between any two points on the curve, no matter how close together they are, there are an infinite number of points

The Central Problem n Analog audio (vinyl, tape, analog synths, etc.) involves the creation or imitation of a continuous wave. n Computers cannot represent continuity (or infinity). n Computers can only deal with discrete values. n Digital technology is based on converting continuous values to discrete values.

Digital Conversion n The instantaneous amplitude of a continuous wave is measured (sampled) regularly. The measurement values, samples, may be stored in a digital system.

Digital Conversion n The instantaneous amplitude of a continuous wave is measured (sampled) regularly. The measurement values, samples, may be stored in a digital system

Digital Conversion n The amplitude of a continuous wave is measured (sampled) regularly. The measurement values, samples, may be stored in a digital system. [ , , , , , , , 1.0, , , , , , , ]

Digital Audio n Digital representation of audio is analogous to cinema representation of motion. n We know that “moving pictures” are not really moving; cinema is simply a series of pictures of motion, sampled and projected fast enough that the effect is that of apparent motion. n With digital audio, if a sound is sampled often enough, the effect is apparent continuity when the samples are played back.

Digital Audio n Con: – It is, at best, only an approximation of the wave n Pros: – Significantly lower background noise levels – Sounds are more reliably stored and duplicated – Sounds are easier to manipulate: Rather than worry about how to change the shape of a wave, engineers need only perform appropriate numerical operations. e.g., changing the volume level of a digital audio file is simply a matter of multiplication: each sample value is multiplied by a value that raises or lowers it by a certain percentage.

Digital Audio n The theory behind digital representation has existed since the 1920s. n It wasn’t until the 1950s that technology caught up to the theory, and it was possible to implement digital audio.

Digital Audio n Bell Labs produced the first digital audio synthesis in the 1950s. n For computer synthesis, a series of samples was calculated and stored in a wavetable. n The wavetable described, in connect-the-dots fashion, the shape of a wave (i.e., its timbre). n Reading through the wavetable at different rates (skipping every n samples, the sampling increment) allowed different pitches to be created. n Audio was produced by feeding the samples that were to be audified through a digital to analog converter (DAC).

Digital Audio n Contemporary computer sound cards often contain a set of wavetable sounds. n The function is the same: a library of samples describing different waveforms. n They are triggered by MIDI commands. (These will be covered fully in a few weeks.) For example, a given note number will translate to the table being read at a certain sampling increment to produce the desired pitch.

Digital Audio n Digital recording became possible in the 1970s. n Voltage input from a microphone is fed to an analog to digital converter (ADC), which stores the signal as a series of samples. n The samples can then be sent through a DAC for playback.

Digital Audio n Thus, the ADC produces a “dehydrated” version of the audio. n The DAC then “rehydrates” the audio for playback. (Gareth Loy, Musimathics v. 2)

Characteristics of Digital Audio n With digital audio, we are concerned with two measurements: – Sampling rate – Quantization n With these measurements, we can describe how well a digitized audio file represents the analog original.

Sampling Rate n This number tells us how often an audio signal is sampled, the number of samples per second. n The more often an audio signal is sampled, the better it is represented in discrete form:

Sampling Rate n This number tells us how often an audio signal is sampled, the number of samples per second. n The more often an audio signal is sampled, the better it is represented in discrete form:

Sampling Rate n This number tells us how often an audio signal is sampled, the number of samples per second. n The more often an audio signal is sampled, the better it is represented in discrete form: Of course, this staircase-shaped wave needs to be smoothed. This process will be covered during the discussion on filtering.

Sampling Rate n So we want to sample an audio wave every so often. The question is: how “often” is “often enough”? n Harry Nyquist of Bell Labs addressed this question in a 1925 paper concerning telegraph signals.

Sampling Rate n Given that a wave will be smoothed by a subsequent filtering process, it is sufficient to sample both its peak and its trough:

Sampling Rate To represent digitally a signal containing frequency components up to X Hz, it is necessary to use a sampling rate of at least 2X samples per second. n Thus, we have the sampling theorem (also called the Nyquist theorem): n Conversely, the maximum frequency contained in a signal sampled at a rate of SR is SR/2 Hz. n The frequency SR/2 is also termed the Nyquist frequency.

Sampling Rate n In theory, since the maximum audible frequency is 20 kHz, a sampling rate of 40 kHz would be sufficient to re-create a signal containing all audible frequencies.

Sampling Rate n For most frequencies, we will oversample (the audio frequency is below the Nyquist frequency):

Sampling Rate n For most frequencies, we will oversample (the audio frequency is below the Nyquist frequency):

Sampling Rate n If we sample at precisely the Nyquist frequency, our critically sampled signal runs the risk of missing peaks and troughs: or n This problem is also addressed by filtering.

Sampling Rate n More serious is the problem of undersampling a frequency greater than the Nyquist frequency: Audio signal at 30 kHz, sampled at 40 kHz RESULT:

Sampling Rate n More serious is the problem of undersampling a frequency greater than the Nyquist frequency: Audio signal at 30 kHz, sampled at 40 kHz RESULT: The frequency is misrepresented at 10 kHz, at reverse phase Misrepresented frequencies are termed aliases.

Sampling Rate n In general, if a frequency, F, sampled at a sampling rate of SR, exceeds the Nyquist frequency, that frequency will alias to a frequency of: - (SR - F) The minus sign indicates that the frequency is in opposite phase

Sampling Rate n It is useful to illustrate sampled frequencies on a polar diagram, with 0 Hz at 3:00 and the Nyquist frequency at 9:00: 0 HzNyquist f -f The upper half of the circle represents frequencies from 0 Hz to the Nyquist frequency The lower half of the circle represents negative frequencies from 0 Hz to the Nyquist frequency (there is no distinction in a digital audio system between ±NF) Any audio frequency above the Nyquist frequency will alias to a frequency shown on the bottom half of the circle, a negative frequency between 0 Hz and the Nyquist frequency. Frequencies above the Nyquist frequency do not exist in a digital audio system

Sampling Rate n In the recording process, filters are used to remove all frequencies above the Nyquist frequency before the audio signal is sampled. n This step is critical since aliases cannot be removed later. n Provided these frequencies are not in the sampled signal, the signal may be sampled and later reconverted to audio with no loss of frequency information.

Sampling Rate n The sampling rate for audio CDs is 44.1 kHz. n The origin of this rate lies in video formats. n When digital audio recording began, audio tape was not capable of handling the density of digital signals. n The first digital masters were stored on video as a psuedo video signal, in which binary values of 1 and 0 were stored as video levels of black and white.

Sampling Rate Video is drawn left to right, starting from the top of the screen and moving down. First the odd numbered lines are drawn, then the even numbered lines. Each video frame has two fields: the odd field and the even field. The fields are adjacent to each other on the video tape. O O O O O E E E E E Frame n, odd Frame n, even Frame n+1, odd Frame n+1, even Frame n+2, odd

Sampling Rate n There are two video formats: – 525 lines, 30 frames per second (USA) Minus 35 blank lines, leaving 490 lines per frame 60 fields per second, 245 lines per field – 625 lines, 25 frames per second (European) Minus 37 blank lines, leaving 588 lines per frame 50 fields per second, 294 lines per field n Three samples could be stored on each line, allowing: 60 x 245 x 3 = 44,100 samples per second or 50 x 294 x 3 = 44,100 samples per second n 44.1 kHz remains the standard sampling rate for CD audio.

Quantization n This has a few names: – Sample size – Bit depth – Word size n The term “quantization” takes its origin from quantum physics: – Electrons orbit an atom’s nucleus in one of a number of well-defined layers; – An electron may be knocked from one layer to another, but it can never stay between one of the layers.

Quantization n In the discussion of sampling rate, we only considered how often the amplitude of the wave was measured. n We did not discuss how accurate these measurements were. n The effectiveness of any measurement depends on the precision of our ruler. (Measuring the thickness of something with many small indentations with a ruler only marking feet will probably not give a very accurate measurement; we have to estimate many measurements.) n Just as there are limits to how often we can sample, there are limits to the resolution of our ruler.

Quantization n Like all numbers stored in computers, the amplitude values are stored as binary numbers. n The value that gets stored is the closest available binary number - akin to the nearest marking on a ruler. n The accuracy of our measurement depends on how many bits we have to represent these values. n Clearly, the more bits we have, the finer the resolution of our ruler. 2 bits Each change of bit represents a change in voltage level

Quantization n Like all numbers stored in computers, the amplitude values are stored as binary numbers. n The value that gets stored is the closest available binary number - akin to the nearest marking on a ruler. n The accuracy of our measurement depends on how many bits we have to represent these values. n Clearly, the more bits we have, the finer the resolution of our ruler. 3 bits Each change of bit represents a change in voltage level

Quantization n Like all numbers stored in computers, the amplitude values are stored as binary numbers. n The value that gets stored is the closest available binary number - akin to the nearest marking on a ruler. n The accuracy of our measurement depends on how many bits we have to represent these values. n Clearly, the more bits we have, the finer the resolution of our ruler. 4 bits Each change of bit represents a change in voltage level

Quantization n CD audio uses 16-bit quantization.

Quantization n While aliasing is eliminated if our signal contains no frequencies above the Nyquist frequency, quantization error can never be completely eliminated. n Every sample is within a margin of error that is half the quantization level (the voltage change represented by the least significant bit).

Quantization n For a sine wave signal represented with n bits, the signal to error ratio is: S/E (dB) = 6.02n n The problem is that low-level signals do not use all available bits, and therefore the error level is greater.

Quantization n While quantization error may be masked at high audio levels, it can become audible at low levels: Worst case: a sine wave fluctuating within one quantization increment is stored as a square wave Thus, unlike the constant hissing noise of analog recordings, quantization error is correlated with the signal, and is thus a type of distortion, rather than noise.

Quantization n The problem of quantization distortion is addressed by dither. n Dither is low-level noise added to the audio signal before it is sampled. Low level audio signal with dither added

Quantization n Dither adds random errors to the signal, therefore the quantization results in added noise, rather than distortion. n The noise is a constant factor, not correlated with the signal like quantization distortion. n The result is a noisy signal, rather than a signal broken up by distortion.

Quantization n The auditory system averages the signal at all times. We do not hear individual samples. n With dither, this averaging alows the musical signal to co-exist with the noise, rather than be temporarily eliminated due to distortion.

Quantization n Dither allows resolution below the least significant quantization bit. n Without dither, digital recordings would be far less satisfactory than analog recordings - a plucked guitar string, for example, fades into something close to a sine tone. Without dither, a guitar sound would gradually turn into the sound of a square wave. n With dither, there is significantly less noise in digital recordings than in analog recordings.

Quantization and Sampling Rate n The sampling rate determines the signal’s frequency content. n The number of quantization bits determines the amount of quantization error.

Size of Audio Files 44,100 samples per second bytes per sample (16 bits) channels (for stereo audio) seconds per minute x 2 x 60 ≈ 10 MB/minute