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.

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.
Analogue to Digital Conversion (PCM and DM)
Digital Audio — The Nuts and Bolts A digital audio overview ranging from bit rate, sample rate, and compression types to room acoustics, microphones, and.
4-Integrating Peripherals in Embedded Systems (cont.)
LSU 06/04/2007Electronics 71 Analog to Digital Converters Electronics Unit – Lecture 7 Representing a continuously varying physical quantity by a sequence.
SIMS-201 Characteristics of Audio Signals Sampling of Audio Signals Introduction to Audio Information.
IT-101 Section 001 Lecture #8 Introduction to Information Technology.
Analogue to Digital Conversion
Analogue to Digital Conversion
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.
Chapter 2 Fundamentals of Data and Signals
Chapter 2: Fundamentals of Data and Signals. 2 Objectives After reading this chapter, you should be able to: Distinguish between data and signals, and.
EE2F1 Speech & Audio Technology Sept. 26, 2002 SLIDE 1 THE UNIVERSITY OF BIRMINGHAM ELECTRONIC, ELECTRICAL & COMPUTER ENGINEERING Digital Systems & Vision.
1 Chapter 2 Fundamentals of Data and Signals Data Communications and Computer Networks: A Business User’s Approach.
SIMS-201 Audio Digitization. 2  Overview Chapter 12 Digital Audio Digitization of Audio Samples Quantization Reconstruction Quantization error.
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.
Digital Communication Techniques
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.
Formatting and Baseband Modulation
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
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.
Data Communications & Computer Networks, Second Edition1 Chapter 2 Fundamentals of Data and Signals.
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
Media Representations - Audio
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.
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.
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.
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.
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.
Encoding How is information represented?. Way of looking at techniques Data Medium Digital Analog Digital Analog NRZ Manchester Differential Manchester.
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.
1 What is Multimedia? Multimedia can have a many definitions Multimedia means that computer information can be represented through media types: – Text.
Basics of Digital Audio Module (revised)
Fundamentals of Audio Production. Chapter 3 1 Fundamentals of Audio Production Chapter Three: Digital Audio.
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
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
Computer Communication & Networks
Microprocessors Data Converters Analog to Digital Converters (ADC)
Analog to digital conversion
Multimedia Systems and Applications
Chapter 3 Sampling.
Analogue & Digital.
High Resolution Digital Audio
Digital Control Systems Waseem Gulsher
Data Representation Keywords Sound
Fundamentals of Multimedia
Chapter 2 Signal Sampling and Quantization
MECH 373 Instrumentation and Measurements
Digital Control Systems Waseem Gulsher
Representing Sound 2.6 – Data Representation.
COMS 161 Introduction to Computing
Analog to Digital Encoding
Presentation transcript:

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 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. This encoding format is called pulse code modulation, or PCM

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. [ , , , , , , , 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

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 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.

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:

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 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 information.

Sampling Rate n The sampling rate for audio CDs is 44.1 kHz.

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 a book with a ruler only marking feet will probably not give a very accurate measurement.) 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 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 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 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

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. Samples fluctuate irregularly between two quantization levels

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 allows 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. 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