🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Document Details

SweetProtagonist

Uploaded by SweetProtagonist

Ghana Communication Technology University

Tags

digital audio sound waves sampling theory audio technology

Full Transcript

Lecture 4 Fundamentals of Digital Audio Copyright © 2016 Pearson Education, Inc. All Rights Reserved Learning Objectives In this lecture, you will learn; The properties of sound waves. The basic steps of digitization; sampling and quantization The effects of samplin...

Lecture 4 Fundamentals of Digital Audio Copyright © 2016 Pearson Education, Inc. All Rights Reserved Learning Objectives In this lecture, you will learn; The properties of sound waves. The basic steps of digitization; sampling and quantization The effects of sampling rate and bit depth on digital audio. The common file types for digital audio. The general strategies for reducing digital audio file sizes. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Sound A wave that is generated by vibrating objects in a medium such as air Examples of vibrating objects: – Vocal cords of a person – Guitar strings – Tuning fork Copyright © 2016 Pearson Education, Inc. All Rights Reserved Sound as Mechanical Wave (6 of 6) The sound wave can be represented graphically with the changes in air pressure or electrical signals plotted over time-a waveform. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Frequency of Sound Wave Refers to the number of complete back-and-forth cycles of vibrational motion of the medium particles per unit of time Unit for frequency: Hz (Hertz) 1 Hz = 1 cycle/second Frequency = 2 Hz (i.e., 2 cycles/second) Copyright © 2016 Pearson Education, Inc. All Rights Reserved Pitch of Sound Sound frequency Higher frequency: higher pitch Human ear can hear sound ranging from 20 Hz to 20,000 Hz (20 KHz) Copyright © 2016 Pearson Education, Inc. All Rights Reserved Sound Intensity versus Loudness Sound intensity: – an objective measurement – can be measured with auditory devices – in decibels (dB) Loudness: – a subjective perception – measured by human listeners – human ears have different sensitivity to different sound frequency – in general, higher sound intensity means louder sound Copyright © 2016 Pearson Education, Inc. All Rights Reserved Decibels  I1  Number of decibels = 10  log  I   ref   V1  = 20  log  V   ref  I1 and Iref = Sound intensity values in comparison V1 and Vref = Corresponding electrical voltages Copyright © 2016 Pearson Education, Inc. All Rights Reserved Decibels when doubling the sound intensity and electrical voltages 𝐼1 𝑉1 Number of decibels = 10 × log Number of decibels = 20 × log 𝐼𝑟𝑒𝑓 𝑉𝑟𝑒𝑓 = 10 × log 2 = 20 × log 2 ≅ 10 × 0.3 ≅ 20 × 0.3 =3 =6 3 decibels: doubling the sound intensity 6 decibels: doubling the electrical voltages corresponding to the sound Copyright © 2016 Pearson Education, Inc. All Rights Reserved Adding Sound Waves A single sine wave waveform A single tone A second single sine wave waveform A second single tone A more complex waveform A more complex sound Copyright © 2016 Pearson Education, Inc. All Rights Reserved Waveform Example (1 of 3) A waveform of the spoken word “one” Zoom in at a closer look Copyright © 2016 Pearson Education, Inc. All Rights Reserved Digitizing Sound Suppose we want to digitize this sound wave: Sample at a specific rate into discrete of amplitude values sampling rate = 10 Hz. Reconstructing the waveform using sample points Copyright © 2016 Pearson Education, Inc. All Rights Reserved Digitizing Sound Suppose we want to digitize this sound wave: Sample at a specific rate into discrete of amplitude values sampling rate = 20 Hz. Reconstructing the waveform using sample points Copyright © 2016 Pearson Education, Inc. All Rights Reserved Effects of Sampling Rate (1 of 2) original waveform sampling rate = 10 Hz sampling rate = 20 Hz Copyright © 2016 Pearson Education, Inc. All Rights Reserved Effects of Sampling Rate (2 of 2) Higher sampling rate: The reconstructed wave looks closer to the original wave More sample points, and thus larger file size Sampling rate examples – 11,025 Hz AM Radio Quality/Speech – 22,050 Hz Near FM Radio Quality (high-end multimedia) – 44,100 Hz CD Quality – 48,000 Hz DAT (digital audio tape) Quality – 96,000 Hz DVD-Audio Quality – 192,000 Hz DVD-Audio Quality Copyright © 2016 Pearson Education, Inc. All Rights Reserved Step 2: Quantization (1 of 5) Each of the discrete samples of amplitude values obtained from the sampling step are mapped and rounded to the nearest value on a scale of discrete levels. The number of levels in the scale is expressed in bit depth-the power of 2. An 8-bit audio allows 2 = 256 possible levels in the scale. 8 CD-quality audio is 16-bit (i.e., 2 16 = 65536 possible levels Copyright © 2016 Pearson Education, Inc. All Rights Reserved Step 2: Quantization (3 of 5) 3 Suppose we are quantizing the samples using 3 bits (i.e. 2 = 8 levels). Copyright © 2016 Pearson Education, Inc. All Rights Reserved Effects of Quantization Data with different original amplitudes may be quantized onto the same level  loss of subtle differences of samples With lower bit depth, samples with larger differences may also be quantized onto the same level. Bit depth of a digital audio is also referred to as resolution. For digital audio, higher resolution means higher bit depth. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Dynamic Range (1 of 4) The range of the scale, from the lowest to highest possible quantization values In the previous example: Copyright © 2016 Pearson Education, Inc. All Rights Reserved Dynamic Range (4 of 4) Copyright © 2016 Pearson Education, Inc. All Rights Reserved Choices of Sampling Rate and Bit Depth Higher sampling rate and bit depth: deliver better fidelity of a digitized file result in a larger file size (undesirable) Example: 1-minute CD quality Audio – Sampling rate = 44100 Hz (i.e., 44,100 samples per second) – Bit depth = 16 (i.e., 16 bits per sample) – Stereo (i.e., 2 channels: left and right channels) Copyright © 2016 Pearson Education, Inc. All Rights Reserved File Size of 1-min CD-quality Audio (1 of 2) 1 minute = 60 seconds Total number of samples = 60 seconds  44,100 samples/second = 2,646,000 samples Total number of bits required for these many samples = 2,646,000 samples  16 bits/samples = 42,336,000 bits This is for one channel. Total bits for two channels = 42,336,000 bits/channel  2channels = 84,672,000 bits Copyright © 2016 Pearson Education, Inc. All Rights Reserved File Size of 1-min CD-quality Audio (2 of 2) Suppose you are using 1.5Mbps (mega 84,672,000 bits bits per second) broadband to download = 84,672,000 bits / (8 bits/byte) this 1-minute audio. = 10,584,000 bytes The time is no less than = 10,584,000 bytes / (1024 bytes/KB) 84,672,000 bits / (1.5 Mbps)  10,336 KB = 84,672,000 bits / (1,500,000 bits/seconds) = 10,336 KB/ (1024 KB/MB)  56 seconds  10 MB File Size of 1-hour CD-quality Audio  MB/minute  minutes/hour = 600 MB/hour Copyright © 2016 Pearson Education, Inc. All Rights Reserved General Strategies to Reduce Digital Media File Size Reduce sampling rate Reduce bit depth Apply compression For digital audio, these can also be options: – reducing the number of channels – shorten the length of the audio Copyright © 2016 Pearson Education, Inc. All Rights Reserved Reduce Sampling Rate Sacrifices the fidelity of the digitized audio Need to weigh the quality against the file size Need to consider: – human perception of the audio (e.g., How perceptibe is the audio with lower sampling rate?) – how the audio is used ▪ music: may need higher sampling rate ▪ short sound clips or voice may work well with lower sampling rate Copyright © 2016 Pearson Education, Inc. All Rights Reserved Estimate Thresholds of Sampling Rate Based on Human Hearing Let’s consider these two factors: 1. Human hearing range – Human hearing range: 20 Hz to 20,000 Hz – Most sensitive to 2,000 Hz to 5,000 Hz 2. A rule called Nyquist’s theorem – We must sample at least 2 points in each sound wave cycle to be able to reconstruct the sound wave satisfactorily. – Sampling rate of the audio  twice of the audio frequency (called a Nyquist rate) Copyright © 2016 Pearson Education, Inc. All Rights Reserved Choosing Sampling Rate (1 of 2) Given the human hearing range (20 Hz to 20,000 Hz) and Nyquist Theorem, why do you think the sampling rate (44,100 Hz) for the CD-quality audio is reasonable? If we consider human ear’s most sensitive range of frequency (2,000 Hz to 5,000 Hz), then what is the lowest sampling rate may be used that still satisfies the Nyquist Theorem? Copyright © 2016 Pearson Education, Inc. All Rights Reserved Effect of Sampling Rate and Bit Depth on File Size File size = duration  sampling rate  bit depth  number of channels File size is reduced in the same proportion as the reduction of the sampling rate Example: Reducing the sampling rate from 44,100 Hz to 22,050 Hz will reduce the file size by half. File size is reduced in the same proportion as the reduction of the bit depth Example: Reducing the bit depth from 16-bit to 8-bit will reduce the file size by half. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Most Common Choices of Bit Depth 8-bit – usually sufficient for speech – in general, too low for music 16-bit – minimal bit depth for music 24-bit 32-bit Copyright © 2016 Pearson Education, Inc. All Rights Reserved Audio File Compression Lossless Lossy – gets rid of some data, but human perception is taken into consideration so that the data removed causes the least noticeable distortion – e.g. MP3 (good compression rate while preserving the perceivably high quality of the audio) Copyright © 2016 Pearson Education, Inc. All Rights Reserved Effect of Number of Channels on File Size File size = duration  sampling rate  bit depth  number of channels File size is reduced in the same proportion as the reduction of the number of channels Example: Reducing the number of channels from 2 (stereo) to 1 (mono) will reduce the file size by half. Copyright © 2016 Pearson Education, Inc. All Rights Reserved Common Audio File Types (1 of 4).wav.mp3.m4a.ogg/.oga.mov.aiff.au.snd.ra/.rm.wma Copyright © 2016 Pearson Education, Inc. All Rights Reserved Choosing an Audio File Type Determined by the intended use File size limitation Intended audience Whether as a source file Copyright © 2016 Pearson Education, Inc. All Rights Reserved

Use Quizgecko on...
Browser
Browser