Digital Audio Basics “Any signal can be completely reconstructed from samples.” - Harry Nyquist.

Slides:



Advertisements
Similar presentations
Multimedia: Digitised Sound Data Section 3. Sound in Multimedia Types: Voice Overs Special Effects Musical Backdrops Sound can make multimedia presentations.
Advertisements

EET260 Introduction to digital communication
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.
Adam Diel.  In 1981 IBM PC 150 introduced the first PC Speaker.  Each game had to write support for it (sound cards were impractical during this time)
Digital Signal Processing
Digital Audio Teppo Räisänen LIIKE/OAMK. General Information Auditive information is transmitted by vibrations of air molecules The speed of sound waves.
Sound can make multimedia presentations dynamic and interesting.
4.1Different Audio Attributes 4.2Common Audio File Formats 4.3Balancing between File Size and Audio Quality 4.4Making Audio Elements Fit Our Needs.
GCSE Computing#BristolMet Session Objectives#10 MUST define the term sample rate COULD explain how sound can be sampled and stored in digital form SHOULD.
Dale & Lewis Chapter 3 Data Representation Analog and digital information The real world is continuous and finite, data on computers are finite  need.
Information Sources And Signals
I Power Higher Computing Multimedia technology Audio.
Speech Compression. Introduction Use of multimedia in personal computers Requirement of more disk space Also telephone system requires compression Topics.
4-Integrating Peripherals in Embedded Systems (cont.)
From the air to the iPod. Minute disturbances in the air, caused by a vibrating object Air molecules bunch together, then spread out Changes in density.
Digital Representation of Audio Information Kevin D. Donohue Electrical Engineering University of Kentucky.
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.
Audio Basic Concepts. Audio in Multimedia Digital Audio: Sound that has been captured or created electronically by a computer In a multimedia production,
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.
1 PC Audio 2 Sound Card  An expansion board that enables a computer to receive, manipulate and output sounds.
EET 450 Chapter 18 – Audio. Analog Audio Sound is analog Consists of air pressure that has a variety of characteristics  Frequencies  Amplitude (loudness)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 4 Digital Transmission.
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.
331: STUDY DATA COMMUNICATIONS AND NETWORKS.  1. Discuss computer networks (5 hrs)  2. Discuss data communications (15 hrs)
Digital Audio Multimedia Systems (Module 1 Lesson 1)
 Principles of Digital Audio. Analog Audio  3 Characteristics of analog audio signals: 1. Continuous signal – single repetitive waveform 2. Infinite.
Digital Data Patrice Koehl Computer Science UC Davis.
Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital.
 Continuous sequence of vibrations of air  (Why no sound in space? Contrary to Star Wars etc.)  Abstraction of an audio wave:  Ear translates vibrations.
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.
Digital Audio What do we mean by “digital”? How do we produce, process, and playback? Why is physics important? What are the limitations and possibilities?
Introduction to Interactive Media 10: Audio in Interactive Digital Media.
Making all the right connections Signal Flow 101.
By Frankie, K. F. Yip Chapter 6 Speech. By Frankie, K. F. YipLecture 6 - Sound2 Sound Waves.
Computing with Digital Media: A Study of Humans and Technology Mark Guzdial, School of Interactive Computing.
COMP Representing Sound in a ComputerSound Course book - pages
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
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.
Media Representations - Audio
CHAPTER SEVEN SOUND. CHAPTER HIGHLIGHTS Nature of sound – Sine waves, amplitude, frequency Traditional sound reproduction Digital sound – Sampled – Synthesized.
1 Introduction to Information Technology LECTURE 6 AUDIO AS INFORMATION IT 101 – Section 3 Spring, 2005.
1 Chapter 2 Fundamentals of Data and Signals Data Communications and Computer Networks: A Business User’s Approach.
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.
Sound and Digital Sound v © Allan C. Milne Abertay University.
MPEG-1Standard By Alejandro Mendoza. Introduction The major goal of video compression is to represent a video source with as few bits as possible while.
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.
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.
By :- Ishank Ranjan Akash Gupta. Audio & Audio File Formats Audio is an electrical or other representation of sound. An audio file format is a file format.
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.
Chapter 6 Digital Audio Technology
Multimedia: Digitised Sound Data
Introduction to electronic communication systems
Analogue & Digital.
High Resolution Digital Audio
Digital Audio Processing
Chapter 5:- Sound Eyad Alshareef Eyad Alshareef.
Fundamentals of Data & Signals (Part II)
Assist. Lecturer Safeen H. Rasool Collage of SCIENCE IT Dept.
Govt. Polytechnic Dhangar(Fatehabad)
Embedded Sound Processing : Implementing the Echo Effect
Presentation transcript:

Digital Audio Basics “Any signal can be completely reconstructed from samples.” - Harry Nyquist

Know your prefixes! Giga (G) – billion; Mega (M) – million; kilo (k) – thousand Giga (G) – billion; Mega (M) – million; kilo (k) – thousand Bit (b) – a binary digit Bit (b) – a binary digit Byte (B) – 8 bits Byte (B) – 8 bits Word – can be several bytes (wordlength), usually measured in bits Word – can be several bytes (wordlength), usually measured in bits Mbps – Mega bits per second Mbps – Mega bits per second kHz – kilo Hertz kHz – kilo Hertz GB – Giga Bytes GB – Giga Bytes

Converting Voltage to numbers Microphone converts sound pressure into voltage; the voltage is constantly changing over time (just like the sound pressure – think analogous) Microphone converts sound pressure into voltage; the voltage is constantly changing over time (just like the sound pressure – think analogous) An Analog to Digital Converter (ADC) measures the voltage at set intervals in time (snapshots) and records each measured voltage as a number (numbers = digits) An Analog to Digital Converter (ADC) measures the voltage at set intervals in time (snapshots) and records each measured voltage as a number (numbers = digits) This process is called sampling. The number of snapshots the ADC takes every second is called the sampling rate This process is called sampling. The number of snapshots the ADC takes every second is called the sampling rate The computer stores these numbers in such a way that they can be recalled in the order in which they happened The computer stores these numbers in such a way that they can be recalled in the order in which they happened On playback, these samples are converted back to voltages by the Digital to Analog Converter (DAC) On playback, these samples are converted back to voltages by the Digital to Analog Converter (DAC) The DAC sends out a pulse the amplitude of which is determined by the value of the sample (Pulse Code Modulation or PCM) The DAC sends out a pulse the amplitude of which is determined by the value of the sample (Pulse Code Modulation or PCM) All of these pulses added together recreate the original waveform (motion picture analogy). All of these pulses added together recreate the original waveform (motion picture analogy). This process can take a certain amount of time, which can cause an audible delay in the reproduced audio. This delay, caused by processing, is called latency This process can take a certain amount of time, which can cause an audible delay in the reproduced audio. This delay, caused by processing, is called latency

PreampADC Power Amp Digital Recorder DAC (microphone) (speaker) TYPICAL SIGNAL FLOW IN A DIGITAL AUDIO CHAIN Often the computer acts as the ADC, Digital Recorder, and DAC A computer soundcard can be internal or external. Many external soundcards use Firewire or USB. All computer soundcards have ADC’s and DAC’s built into them. Some even have built-in preamps. Voltage Numbers (digits) Voltage

Who was Nyquist and why you should care Any signal can be completely reconstructed from samples. In order to accurately reproduce the original signal, you must sample the signal at more than twice its highest frequency Any signal can be completely reconstructed from samples. In order to accurately reproduce the original signal, you must sample the signal at more than twice its highest frequency Harry Nyquist Harry Nyquist Humans hear frequencies between 20 Hz and 20 kHz. In order to accurately reproduce all frequencies in this bandwidth, you must take samples faster than 40 kHz Humans hear frequencies between 20 Hz and 20 kHz. In order to accurately reproduce all frequencies in this bandwidth, you must take samples faster than 40 kHz The sampling rate for CD-quality audio is 44.1 kHz The sampling rate for CD-quality audio is 44.1 kHz You must filter out any frequencies above the Nyquist limit (fs/2) You must filter out any frequencies above the Nyquist limit (fs/2) If you do not remove frequencies above the limit, aliasing will occur If you do not remove frequencies above the limit, aliasing will occur Aliasing – an artifact where frequencies which are higher than the Nyquist limit are folded back into the hearable spectrum (e.g. Nyquist limit = 20 kHz; 30 kHz becomes 10 kHz) Aliasing – an artifact where frequencies which are higher than the Nyquist limit are folded back into the hearable spectrum (e.g. Nyquist limit = 20 kHz; 30 kHz becomes 10 kHz) Generally, the higher the sampling rate, the more frequencies you are able to reproduce (greater bandwidth) Generally, the higher the sampling rate, the more frequencies you are able to reproduce (greater bandwidth) Sampling rate corresponds with accuracy in reproducing the frequency component of audio Sampling rate corresponds with accuracy in reproducing the frequency component of audio

Importance of bit depth Computers use data that is stored in binary numbers. Computers use data that is stored in binary numbers. All of the sampled measurements of voltage must be converted to binary numbers All of the sampled measurements of voltage must be converted to binary numbers Computers have a limited number of fixed values that can be used to represent the measured voltage. Computers have a limited number of fixed values that can be used to represent the measured voltage. The math: an 8-bit converter has 2 8 or 256 possible values, a 16-bit converter has 2 16 or 65,536 possible values, and a 24-bit converter has 2 24 or 16,777,216 possible values The math: an 8-bit converter has 2 8 or 256 possible values, a 16-bit converter has 2 16 or 65,536 possible values, and a 24-bit converter has 2 24 or 16,777,216 possible values Measurements that fall between these values are rounded off, affecting the accuracy of the reproduced signals Measurements that fall between these values are rounded off, affecting the accuracy of the reproduced signals This can be translated into increased dynamic range, better signal- to-error ratio, more headroom and/or better resolution. This can be translated into increased dynamic range, better signal- to-error ratio, more headroom and/or better resolution. Generally, the higher the bit depth, the more accurate the reproduction of the signal. Generally, the higher the bit depth, the more accurate the reproduction of the signal. Bit Depth corresponds to accuracy in reproducing the amplitude component of audio. Bit Depth corresponds to accuracy in reproducing the amplitude component of audio.

Role of the word clock Imagine a world where every clock would measure time differently (a minute is 45 seconds here and 65 seconds there) Imagine a world where every clock would measure time differently (a minute is 45 seconds here and 65 seconds there) All digital devices have internal clocks. (ex. Your computer’s processor speed is also known as its clock speed) All digital devices have internal clocks. (ex. Your computer’s processor speed is also known as its clock speed) When digital devices transfer data, their clocks must be synchronized. In digital audio, this is accomplished using a word clock. When digital devices transfer data, their clocks must be synchronized. In digital audio, this is accomplished using a word clock. The sending device sends a word clock signal which overrides the internal clock of the receiving device, ensuring that the two devices are “on the same page”. The sending device sends a word clock signal which overrides the internal clock of the receiving device, ensuring that the two devices are “on the same page”. If the clocks are not synchronized, there will be “clock errors” – audible clicks and pops in the audio. If the clocks are not synchronized, there will be “clock errors” – audible clicks and pops in the audio. In many studios, there is one master clock which controls the clocks in all of the digital devices in the studio, ensuring that they are all operating at the same sampling rate and that their clocks are all “ticking” at the same time In many studios, there is one master clock which controls the clocks in all of the digital devices in the studio, ensuring that they are all operating at the same sampling rate and that their clocks are all “ticking” at the same time Clock signal can be transmitted with the audio or can be sent separately (generally via a coaxial cable with a BNC-type connector) Clock signal can be transmitted with the audio or can be sent separately (generally via a coaxial cable with a BNC-type connector)

Different formats = Alphabet Soup There are many different types of digital audio signals. There are three that are very common. There are many different types of digital audio signals. There are three that are very common. SPDIF – Sony/Phillips Digital interface. Mostly uses RCA connectors and carries two channels of digital audio over each connection. Unbalanced – short cable runs only SPDIF – Sony/Phillips Digital interface. Mostly uses RCA connectors and carries two channels of digital audio over each connection. Unbalanced – short cable runs only AES/EBU – Audio Engineering Society/European Broadcast Union: Mostly uses XLR connectors and carries two channels over each connection. Balanced – can accommodate long cable runs without loss AES/EBU – Audio Engineering Society/European Broadcast Union: Mostly uses XLR connectors and carries two channels over each connection. Balanced – can accommodate long cable runs without loss ADAT – Alesis Digital Audio Tape: A proprietary format from Alesis. Carries 8 channels of digital audio over a single fibre-optic connection at sampling rates up to 48 kHz. Can carry 4 channels at sampling rates of 88 kHz and 96 kHz ADAT – Alesis Digital Audio Tape: A proprietary format from Alesis. Carries 8 channels of digital audio over a single fibre-optic connection at sampling rates up to 48 kHz. Can carry 4 channels at sampling rates of 88 kHz and 96 kHz These three types of connections carry clock signal embedded in the data stream These three types of connections carry clock signal embedded in the data stream

DSP – mixing is math DSP – Digital Signal Processing DSP – Digital Signal Processing Every change to your digital audio signal – even something as mundane as changing the volume – is a mathematical operation on the stored digital audio samples. Every change to your digital audio signal – even something as mundane as changing the volume – is a mathematical operation on the stored digital audio samples. Mixing two signals together is a simple matter of addition. Changing volume is a multiplication problem. Mixing two signals together is a simple matter of addition. Changing volume is a multiplication problem. All kinds of complicated processing is done using math to change the original sampled data All kinds of complicated processing is done using math to change the original sampled data Some DSP is done in “real-time” while other processing is file-based meaning that it actually changes the data in the digital audio file. Some DSP is done in “real-time” while other processing is file-based meaning that it actually changes the data in the digital audio file.

Digital Zero – yet another dB scale! Most analog meters are measured in Volume Units (dBVU). Most analog meters are measured in Volume Units (dBVU). 0 dBVU usually corresponds to the voltage of a line level signal (+4 dBu) 0 dBVU usually corresponds to the voltage of a line level signal (+4 dBu) Digital meters use dBFS. A zero on this meter means the converter has run out of numbers to represent the waveform. Digital meters use dBFS. A zero on this meter means the converter has run out of numbers to represent the waveform. If you try to go above this level, you will get digital distortion. If you try to go above this level, you will get digital distortion. Unlike analog distortion, there is never anything pleasant about digital distortion. Unlike analog distortion, there is never anything pleasant about digital distortion. A converter’s sensitivity can be adjusted to correspond to different levels. Common levels are 0 dBVU = -16 dBFS or 0 dBVU = -18 dBFS. A converter’s sensitivity can be adjusted to correspond to different levels. Common levels are 0 dBVU = -16 dBFS or 0 dBVU = -18 dBFS. In the first case, the converter would not be able to digitally represent a signal that is greater than +16 dBVU – way off the scale of most analog meters. In the first case, the converter would not be able to digitally represent a signal that is greater than +16 dBVU – way off the scale of most analog meters. On an Analog meter, a reading of 0 dB usually means that you still can push a bit more level before you seriously distort the signal. On an Analog meter, a reading of 0 dB usually means that you still can push a bit more level before you seriously distort the signal. On a Digital meter, 0 dB means you have no values left to represent the signal On a Digital meter, 0 dB means you have no values left to represent the signal PROPER GAIN STAGING IS EVEN MORE IMPORTANT IN DIGITAL RECORDING PROPER GAIN STAGING IS EVEN MORE IMPORTANT IN DIGITAL RECORDING

Digital Audio File Formats There are many different audio file formats. They fall into two general categories: compressed and uncompressed. There are many different audio file formats. They fall into two general categories: compressed and uncompressed. Uncompressed formats include Wave (.wav,.bwf), Audio Interchange File Format (AIFF) (.aif), and Sound Designer II (SDII). Uncompressed formats include Wave (.wav,.bwf), Audio Interchange File Format (AIFF) (.aif), and Sound Designer II (SDII). These file formats are PCM audio files (Pulse Code Modulation) and they contain ALL of the samples that make up the digital audio file exactly as they were recorded. These file formats are PCM audio files (Pulse Code Modulation) and they contain ALL of the samples that make up the digital audio file exactly as they were recorded. Compressed formats include MPEG-1 layer III (.mp3), MPEG-2 AAC, RealAudio (.ra), Windows Media Audio File (.wma), and OggVorbis. Compressed formats include MPEG-1 layer III (.mp3), MPEG-2 AAC, RealAudio (.ra), Windows Media Audio File (.wma), and OggVorbis. Compressed audio files go through a process known as lossy data compression - the data that make up the file are completely altered and much of the information is discarded Compressed audio files go through a process known as lossy data compression - the data that make up the file are completely altered and much of the information is discarded THIS IS NOT TO BE CONFUSED WITH USING AN AUDIO COMPRESSOR IN A STUDIO!!!! THIS IS NOT TO BE CONFUSED WITH USING AN AUDIO COMPRESSOR IN A STUDIO!!!!

How data compression works Data Compression is a process where a program analyzes a file to see how much of the data can be done away with while still retaining the ability to reconstruct the original data (e.g. a Winzip file) Data Compression is a process where a program analyzes a file to see how much of the data can be done away with while still retaining the ability to reconstruct the original data (e.g. a Winzip file) When compressing an audio file, there is a target bit rate in mind. An algorithm is called upon to see how much audio data must be thrown away to reach this bit rate When compressing an audio file, there is a target bit rate in mind. An algorithm is called upon to see how much audio data must be thrown away to reach this bit rate In a perceptual coder (e.g. an MP3 encoder), the algorithm is designed to estimate how much of the audio you will actually perceive, based on knowledge of the frequency response of human hearing. Enough energy at one frequency may impair your ability to hear energy at another frequency. Anything that the algorithm thinks that you won’t miss is gotten rid of. In a perceptual coder (e.g. an MP3 encoder), the algorithm is designed to estimate how much of the audio you will actually perceive, based on knowledge of the frequency response of human hearing. Enough energy at one frequency may impair your ability to hear energy at another frequency. Anything that the algorithm thinks that you won’t miss is gotten rid of. The Audio is divided into different frequency bins. Certain frequency bands are often done away with entirely. The audio is often distorted by the process, since there is a tradeoff between accuracy in the frequency and time domains. The Audio is divided into different frequency bins. Certain frequency bands are often done away with entirely. The audio is often distorted by the process, since there is a tradeoff between accuracy in the frequency and time domains.

Summary Analog voltages are converted to digital values through sampling; Your sampling rate must be 2x the highest frequency in your signal Analog voltages are converted to digital values through sampling; Your sampling rate must be 2x the highest frequency in your signal Bit depth is the number of bits used to encode a single sample; More bits are usually better Bit depth is the number of bits used to encode a single sample; More bits are usually better Latency is delay caused by processing Latency is delay caused by processing PCM audio files (WAV, AIF) preserve every single sample. PCM audio files (WAV, AIF) preserve every single sample. Lossy compression formats (MP3) throw away much of the audio information that was originally recorded Lossy compression formats (MP3) throw away much of the audio information that was originally recorded When recording from a DIGITAL source (recorders, external converters), make sure your clock is set correctly! When recording from a DIGITAL source (recorders, external converters), make sure your clock is set correctly! Beware of the red light: DIGITAL DISTORTION IS NOT A GOOD THING! Beware of the red light: DIGITAL DISTORTION IS NOT A GOOD THING!