Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Digital Audio Basics “Any signal can be completely reconstructed from samples.” - Harry Nyquist."— Presentation transcript:

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

2 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

3 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

4 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

5 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

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

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

8 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

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

10 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

11 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!!!!

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

13 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!


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

Similar presentations


Ads by Google