Fundamentals of Digital Audio *

Similar documents
describe sound as the transmission of energy via longitudinal pressure waves;

An introduction to physics of Sound

Chapter 2. Meeting 2, Measures and Visualizations of Sounds and Signals

MUS 302 ENGINEERING SECTION

CS101 Lecture 18: Audio Encoding. What You ll Learn Today

Sound 05/02/2006. Lecture 10 1

Vibrations and Waves. Properties of Vibrations

Chapter 16. Waves and Sound

Computer Audio. An Overview. (Material freely adapted from sources far too numerous to mention )

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

MULTIMEDIA SYSTEMS

What is Sound? Simple Harmonic Motion -- a Pendulum

A mechanical wave is a disturbance which propagates through a medium with little or no net displacement of the particles of the medium.

Warm-Up. Think of three examples of waves. What do waves have in common? What, if anything, do waves carry from one place to another?

Chapter 12. Preview. Objectives The Production of Sound Waves Frequency of Sound Waves The Doppler Effect. Section 1 Sound Waves

Psychological psychoacoustics is needed to perceive sound to extract features and meaning from them -human experience

CMPT 318: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Sound is the human ear s perceived effect of pressure changes in the ambient air. Sound can be modeled as a function of time.

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

SOUND & MUSIC. Sound & Music 1

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

Digital Audio. Lecture-6

TEAK Sound and Music

Fundamentals of Music Technology

Psychology of Language

Chapter 7. Waves and Sound

Chapter 4. Digital Audio Representation CS 3570

Sound waves. septembre 2014 Audio signals and systems 1

Lecture Notes Intro: Sound Waves:

Preview. Sound Section 1. Section 1 Sound Waves. Section 2 Sound Intensity and Resonance. Section 3 Harmonics

Modulation. Digital Data Transmission. COMP476 Networked Computer Systems. Analog and Digital Signals. Analog and Digital Examples.

8A. ANALYSIS OF COMPLEX SOUNDS. Amplitude, loudness, and decibels

ECE 556 BASICS OF DIGITAL SPEECH PROCESSING. Assıst.Prof.Dr. Selma ÖZAYDIN Spring Term-2017 Lecture 2

3A: PROPERTIES OF WAVES

Bike Generator Project

Copyright 2010 Pearson Education, Inc.

Waves & Interference

Music 171: Sinusoids. Tamara Smyth, Department of Music, University of California, San Diego (UCSD) January 10, 2019

Structure of Speech. Physical acoustics Time-domain representation Frequency domain representation Sound shaping

Stay Tuned: Sound Waveform Models

CHAPTER 12 SOUND. Sound: Sound is a form of energy which produces a sensation of hearing in our ears.

CONTENTS. Preface...vii. Acknowledgments...ix. Chapter 1: Behavior of Sound...1. Chapter 2: The Ear and Hearing...11

Sound/Audio. Slides courtesy of Tay Vaughan Making Multimedia Work

ALTERNATING CURRENT (AC)

! Where are we on course map? ! What we did in lab last week. " How it relates to this week. ! Sampling/Quantization Review

Capturing and Editing Digital Images *

Copyright 2009 Pearson Education, Inc.

Chapter 05: Wave Motions and Sound

Spectrum Analysis: The FFT Display

Linguistics 401 LECTURE #2. BASIC ACOUSTIC CONCEPTS (A review)

Data Communication. Chapter 3 Data Transmission

UNIT 7C Data Representation: Images and Sound

CHAPTER ONE SOUND BASICS. Nitec in Digital Audio & Video Production Institute of Technical Education, College West

M04_BURG5802_01_SE_C04.QXD 7/3/08 5:32 PM Page 188

Physics I Notes: Chapter 13 Sound

P. Moog Synthesizer I

Properties of Sound. Goals and Introduction

Rarefaction Compression

Digitizing Color. Place Value in a Decimal Number. Place Value in a Binary Number. Chapter 11: Light, Sound, Magic: Representing Multimedia Digitally

Date Period Name. Write the term that corresponds to the description. Use each term once. beat

CS307 Data Communication

Variations in Waveforms and Energy Spectra between Musical Instruments

Review of Lecture 2. Data and Signals - Theoretical Concepts. Review of Lecture 2. Review of Lecture 2. Review of Lecture 2. Review of Lecture 2

ENGINEERing challenge workshop for science museums in the field of sound & acoustics

From Ladefoged EAP, p. 11

PHYSICS 102N Spring Week 6 Oscillations, Waves, Sound and Music

Musical Acoustics, C. Bertulani. Musical Acoustics. Lecture 13 Timbre / Tone quality I

Sound recording & playback

ISSUED BY KENDRIYA VIDYALAYA - DOWNLOADED FROM CHAPTER 12 Sound

Interference & Superposition. Creating Complex Wave Forms

5/17/2009. Digitizing Color. Place Value in a Binary Number. Place Value in a Decimal Number. Place Value in a Binary Number

Properties and Applications

Chapter 17 Waves in Two and Three Dimensions

Sound & Waves Review. Physics - Mr. Jones

m208w2014 Six Basic Properties of Sound

Seeing Music, Hearing Waves

Physics B Waves and Sound Name: AP Review. Show your work:

Principles of Musical Acoustics

Trigonometric functions and sound

Sound All sound begins with a vibrating object Ex. Vibrating tuning fork Vibrating prong sets molecules near it in motion

Week 1. Signals & Systems for Speech & Hearing. Sound is a SIGNAL 3. You may find this course demanding! How to get through it:

UNIT 7B Data Representa1on: Images and Sound. Pixels. An image is stored in a computer as a sequence of pixels, picture elements.

SOME PHYSICAL LAYER ISSUES. Lecture Notes 2A

Appendix A Decibels. Definition of db

Chapter 8. Representing Multimedia Digitally

AP Physics B (Princeton 15 & Giancoli 11 & 12) Waves and Sound

PHYSICS. Sound & Music

Pulse Code Modulation

Lecture PowerPoints. Chapter 12 Physics: Principles with Applications, 6 th edition Giancoli

PC1141 Physics I. Speed of Sound. Traveling waves of speed v, frequency f and wavelength λ are described by

Physical Layer: Outline

Chapter 2: Fundamentals of Data and Signals

NAME: SECOND YEAR: A. EXERCISES LESSON 11: Waves. Light and sound. Exercise sheet 1

Chapter PREPTEST: SHM & WAVE PROPERTIES

Chapter 3 Data Transmission COSC 3213 Summer 2003

Introduction to Telecommunications and Computer Engineering Unit 3: Communications Systems & Signals

Seeing Sound Waves. sound waves in many different forms, and you get to have fun making a loud mess.

Contents. Welcome To K-Meter. System Requirements. Compatibility. Installation and Authorization. K-Meter User Interface.

Final Exam Study Guide: Introduction to Computer Music Course Staff April 24, 2015

SUMMARY. ) f s Shock wave Sonic boom UNIT. Waves transmit energy. Sound is a longitudinal mechanical wave. KEY CONCEPTS CHAPTER SUMMARY

Transcription:

Digital Media The material in this handout is excerpted from Digital Media Curriculum Primer a work written by Dr. Yue-Ling Wong (ylwong@wfu.edu), Department of Computer Science and Department of Art, Wake Forest University and supported by the National Science Foundation under Grant No. DUE-0127280. http://digitalmedia.wfu.edu/project/digital-media-curriculum-development/ This handout was prepared for students in MMP320 Multimedia Networks at Borough of Manhattan Community College, City University of New York as part of a curriculum redesign project supported by National Science Foundation Grant No. DUE NSF-0511209, Co PI s Christopher Stein (cstein@bmcc.cuny.edu) and Jody Culkin (jculkin@bmcc.cuny.edu) http://teachingmultimedia.net

Fundamentals of Digital Audio * Sound Waves Sound is a wave that is generated by vibrating objects in a medium such as air. Plucking a guitar string in the air causes the string to move back and forth. This creates a disturbance of the surrounding air molecules. When the string moves in one direction, it causes the air molecules to compress into a smaller space, raising the air pressure slightly in that region. The air molecules under higher pressure in that region then push the other air molecules surrounding them, and so forth. When the vibrating string moves in the reverse direction, it creates a gap between the string and the molecules. This lowers the air pressure in that region, causing the surrounding air molecules to move in that area. The displacement of air molecules propagates, radiating away from the string and causing periodic changes of air pressure forming a sound wave. When this compression wave reaches your eardrums, it causes the eardrums to move back and forth. This sends a signal to your brain, which recognizes the changing air pressure as a sound. Sound as a Mechanical Wave Because the propagation of a sound wave in a medium relies on the mechanism of particle interactions, a sound wave is characterized as a mechanical wave. The implication of this property is that a sound wave does not propagate in vacuum. If you place a microphone in the path of the sound wave, the periodic air pressure change will be detected by the recorder and converted into varying electrical signals. The changes of pressure in the propagating sound wave reaching the recorder are thus captured as changes of electrical signals over time. The sound wave can be represented graphically with the changes in air pressure or electrical signals plotted over time a waveform (see figure below). The vertical axis of the waveform represents the relative air pressure or electrical signals caused by the sound wave. The horizontal axis represents time. A waveform is a graphical representation of the pressure-time fluctuations of a sound wave. The sound wave propagates in space. The waveform matches the pressure changes in time at a fixed location. The crests correspond to the high pressure (compression of air molecules) and troughs correspond to the low pressure (rarefaction). The horizontal axis is time. Remember that the horizontal axis of a waveform is time, not distance.

1. Be careful not to interpret sound as a wave that has crests and troughs like in a transverse wave. 2. Be careful not to interpret the waveform as a representation of the sound wave in space. Instead, the waveform graph represents the pressure changes over time. The information quantitative data we get from a waveform besides visualizing the pressure oscillation of the wave are the perceivable properties of sound, the pitch and loudness. Frequency and Pitch A sound wave is produced by a vibrating object in a medium, air, for example. No matter what the vibrating object is, the object is vibrating or moving back and forth at a certain frequency. This causes the surrounding air molecules to vibrate at this same frequency, sending out the sound pressure wave. The frequency of a wave refers to the number of complete back-and forth cycles of vibrational motion of the medium particles per unit of time. The common unit for frequency is Hertz (abbreviated as Hz) where the unit of time is one second. 1 Hz = 1 cycle / second (a) (b) Simple waveforms representing two different frequencies (a) Lower frequency. (b) Higher frequency. The period of a wave is the time for a complete back-and-forth cycle of vibrational motion of the medium particles. Sound frequency is related to as the pitch of the sound. Higher frequencies refer to higher pitches. Generally speaking, the human ear can hear sound ranging from 20 Hz to 20,000 Hz. Two notes that are an octave apart correspond to sound waves whose frequencies are in a ratio of 2:1. Sound Intensity and Loudness Sound intensity is related to the perceived loudness of a sound, although the two are not exactly the same. Sound intensity is often measured in decibels (db). A decibel is based ratio of a louder sound to a softer one. By definition, Equation 1: Number of decibels = 10 x log (I 1 /I ref )

I 1 and I ref are the two sound intensity values in comparison. Equation 2: Number of decibels = 20 x log (V 1 /V ref ) V 1 and V ref are the magnitudes of two electrical voltages or currents in comparison. Notice that neither a decibel nor a bel is not an absolute unit. It is an expression of a ratio of two values. More precisely, it is a logarithm of the ratio of two values. The general implication of this is that doubling the sound intensity means an increase of about 3 decibels. Or, a louder sound that causes twice the magnitude of the electric voltages or currents as a softer sound is about 6 decibels higher than the softer one. Say that you have a sound whose pressure wave produces electrical signal V 1, and this pressure is double the pressure of some reference sound (V ref ). This means: V 1 = 2 x V ref Plugging this relationship in the equation above (Equation 2), we get: Number of decibels = 20 x log (2 x V ref / V ref ) = 20 x log (2) = 20 x 0.3 = 6 Similarly, plugging numbers into the equation for the sound intensity (Equation 1) gives you 3 decibels. Some application programs may have the option to use percentage for amplification, so you never have to deal with decibels. However, in many audio editing programs, the audio amplitude is measured in decibels, and 3 and 6 decibels are given as preset values in amplification filters. Understanding what decibels are and their relationship to audio signals helps you make a predictable adjustment in audio editing. Decibels and Bels The unit called a bel was defined by scientists at Bell Labs to compare two power values. Number of bels = log (P 1 /P 0 ) where P 1 and P 0 are the two power values in comparison. For sound, these can be sound intensity. A decibel (db) is one tenth of a bel, i.e. one bel equals ten decibels. Number of decibels = 10 x log (P 1 /P 0 ) Power equals voltage times current. This relationship leads to the following (which we present without going into the mathematical derivation): Number of decibels = 20 x log (V 1 /V 0 ) where V 1 and V 0 are the two voltage or amplitude values in comparison.

The threshold of hearing is the minimum sound pressure level at which humans can hear a sound at a given frequency. It varies with frequency. Generally, 0 db refers to the threshold of hearing at 1000 Hz. Note that 0 db does not mean zero sound intensity or absence of sound wave. The threshold of pain is about 120 decibels, representing a sound intensity of 1,000,000,000,000 (or 1012) times greater than 0 decibels. Loudness vs. Sound Intensity The loudness of a sound is a subjective perception, but sound intensity is an objective measurement. Thus, loudness and sound intensity are not exactly the same properties. To measure loudness, a 1000-Hz tone is used as a reference tone. The volume of the reference tone is adjusted until it is perceived by listeners to be equally as loud as the sound being measured. Sound intensity, on the other hand, can be measured objectively by auditory devices independent of a listener. Age of listener and frequency of sound affect how sound is perceived. Adding Sound Waves A simple sine wave waveform represents a simple single tone single frequency. When two or more sound waves meet, their amplitudes add up, resulting in a more complex waveform (see below). The sound we perceive everyday is seldom a single tone. The waveforms representing speech, music, and noise are complicated waveforms that result from adding multiple waveforms of different frequencies. Decomposing Sound A complex wave can be decomposed into its simple component parts the different sine waves that make up the complex wave. One of the mathematical methods to accomplish this decomposition is called the Fourier transform. You might want to decompose a sound to filter out parts that you don t want. When you want to remove unwanted sounds that can be characterized by a range of frequencies, such as low-pitched noise, you can apply filters using the Fourier

transform. These filters are available in many digital audio processing programs and are used as the basis to break down a sound and pull out unwanted frequencies. Digitizing Sound Sound is analog- capturing it involves sampling and quantizing. Step 1 Sampling In the sampling step, the sound wave is sampled at a specific rate into discrete samples of amplitude values. The higher the sampling rate, the higher the accuracy in capturing the data. However, a higher sampling rate will generate a larger amount of data, thus requiring more storage space and processing time. The sampling rate for CDquality audio is 44100 Hz, or 44100 samples per second. (a) a theoretical continuous sound wave signal. (b) 10 samples of the pressure are taken per second a sampling rate of 10 Hz. (c) A simple reconstruction of the wave by keeping the pressure value a constant between sample points. 10 Hz is an unrealistically low sampling rate, we are using it just for demonstration purposes.

(a) A sampling rate of 20 Hz (b) A simple reconstruction of the sound wave. The common reconstruction of an analog wave from the discrete sample points is not done by keeping the sample values constant between sample points. Instead, it is usually done by interpolation of the sample points using mathematical algorithms to regenerate a smooth curve. Sampling Rate vs. Audio Frequency Be careful not to confuse the sampling rate with the audio frequency. Both the sampling rate and the audio frequency are measured in the unit Hertz (Hz), but they are not the same thing. The audio frequency relates to the pitch of the sound. The higher the frequency, the higher the pitch of the sound. The sampling rate refers to the number of samples taken per second for a sound wave. Step 2 Quantizing In the quantizing step, each of the discrete samples of amplitude values, obtained from the sampling step, will be mapped and rounded to the nearest value on a scale of discrete levels. Therefore, the more levels available in the scale, the higher the accuracy in reproducing the sound referred to as higher resolution. However, higher resolution will require more storage space. The number of levels in the scale is expressed in bit depth the power of 2. For example, an 8-bit audio allows 2 8 = 256 possible levels in the scale. To give you a feel of the bit depth for digital sound, the bit depth for CD-quality audio is 16-bit, i.e. 2 16 = 65536 possible levels in quantizing the samples of amplitude values. Dynamic Range In the quantization step, a scale of discrete levels of amplitude values is used to map the sample points. The range of the scale, from the lowest to highest possible quantization values in the scale, defines the dynamic range for digitizing the audio. In defining the scale, the lowest value of the scale is placed at the lowest level of amplitude, and the highest value of the scale is placed at the highest level of amplitude. All of the other levels, (number of levels dependent on bit depth) are placed at equal intervals between. This scale is extended to include the highest and lowest amplitude

values of the sound wave. That is, none of the sample points is outside of this range. A scale defined this way contains a full amplitude range of the sound wave. If the dynamic range is smaller than the full amplitude range of the sound wave, some data will be lost. The digitized sound wave will be "chopped" off at the limit of the range, causing clipping of the sound wave. Clipping is an undesirable effect because of loss of data. However, with a reduced dynamic range, the accuracy can be improved for the data within the range. This is an advantage, especially if the majority of the sample points are within a smaller middle region of the range. By sacrificing the smaller number of highest and lowest amplitude values, the accuracy of the majority of the amplitude values of the sample points of the sound wave can be improved. If you extend the dynamic range to more than the amplitude range of the sound wave- the accuracy will be lost. File Size, File Compression and File Types of Digital Audio Higher sampling rate and bit depth always deliver better fidelity of the digitized file. It also leads to larger file size. Large file size requires more storage space, longer processing time, and, more importantly, longer transfer time. Especially if the digital media files are created for use on the internet, the network transfer time of a file is often a more important consideration than the storage space, which is becoming less expensive. The larger the file size, the longer it will take to download to another person's computer. Duration of the file is also a consideration of size when the media is audio. Here are the calculations for one minute of audio on a CD: 1 minute x 60 seconds/minute = 60 seconds 60 seconds x 44,100 samples/second = 2,646,000 samples 2,646,000 samples x 16 bits/sample = 42,336,000 bits Because stereo audio has two channels, the total bit size = 42,336,000 bits x 2 = 84,672,000 bits To convert the bit size into bytes, 84,672,000 bits / (8 bits/byte) = 10,584,000 bytes or 10 MB How long would it take to download this on a 56K modem? 84,672,000 bits / (56,000 bits/second) = 1512 seconds = 25.2 minutes Methods of Reducing File Size of Digital Audio Reduce the sampling rate Reduce the bit depth Apply compression Reduce the number of channels (stereo or mono) In addition, pay attention to the duration- don t make your file unnecessarily long- edit out any pauses etc. if you have a voiceover.

Reducing the number of channels: stereo to mono. Depends upon your output. Reducing the sampling rate: Reducing the sampling rate and bit depth sacrifices the fidelity of the digitized audio which means it will not sound like the original. However, when working with digital media files, you often have to weigh the quality against the file size. You need to take into consideration both human perception of the medium and how you're going to use the audio. Things to consider: The human ear can hear sound ranging from approximately 20 Hz to 20,000 Hz, with the range varying with individuals and their ages. Not all people can hear the two ends of the average range. The human ear is most sensitive in the range of about 2,000-5,000 Hz, Also, according to a rule called Nyquist's theorem, we must sample at least two points in each sound wave cycle to be able to reconstruct the sound wave satisfactorily. In other words, the sampling rate of the audio must be at least twice of the audio frequency called a Nyquist rate. Therefore, a higher pitch sound requires a higher sampling rate than the lower pitch sound. In reality, the sound we hear, such as music and speech, is made up of multiple frequency components. Then the sampling rate can be chosen as twice the highest frequency component in the sound in order to reproduce the audio satisfactorily up to its highest frequency component. 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 Based on the human hearing range and the Nyquist theorem, the sampling rate for the CD quality audio, 44.1 khz, is reasonable. Since the human ear is most sensitive in the range of about 2 to 5 KHz, then 11,025 Hz and 22,050 Hz seem to be reasonable sampling rates, although 11,025 Hz causes more noticeable degradation to the music than speech, because music has higher frequency components than speech. Lowering the sampling rate of a one minute audio file from 44.1 KHz to 22.05 KHz will reduce the file size from about 10 MB to about 5 MB (or reduce it by half). Reducing the bit depth: The most common bit depth settings you may encounter in a digital audio editing program are 8-bit and 16-bit. According to the file size equation above, lowering the bit depth from 16 to 8 reduces the file size in half. 8-bit resolution is usually sufficient for speech. However, for music, 8-bit is too low to accurately reproduce the sound satisfactorily. Reducing the bit depth from 16 to 8 halves the file size.

Applying file compression: No matter which file size reduction strategies you want to apply to your audio file, you should always evaluate the acceptability of the audio quality of the reduced file based on the nature of your audio project, and weigh the quality against the file size limitation. The intended use of your final audio dictates the consideration of the acceptable trade-offs. As in imaging, compression can be lossless or lossy. Lossy compression gets rid of some data, but human perception is taken into consideration so that the data removed causes the least noticeable distortion. The popular audio file format, MP3, uses lossy compression. It gives a good compression rate while preserving the quality of the audio. Keep in mind that a file compressed with a lossy compression method should not be used as a source file for further editing. Even working within a limitation of file size, you should record or digitize at a higher sampling rate and bit depth than you expect to need in your final product and then compress the file later, instead of digitizing at a lower sampling rate and bit depth in the first place. One reason is that compression algorithms are often designed to selectively remove data that will cause minimal impact on the audio quality perceivable by the human ear. Another reason is that by keeping a higher sampling rate and bit depth, you will have a choice of optimizing the file size by a combination of file optimization strategies discussed above. Always keep in mind: File size limits: what is the playback method? Intended audience: what equipment are they likely to have? Is this a source file that you will use for further editing? Below is a list of many digital audio file formats

MIDI There is another method of storing music information in MIDI format. MIDI (Musical Instrument Digital Interface) defines the common interface for electronic digital music instruments to communicate with computers, or other instruments or devices containing microprocessors. It specifies the configurations of cables and cable plugs and the format of the data. MIDI is a communications protocol, not a physical object. Many electronic keyboards have built-in synthesizers. A MIDI keyboard looks like a small piano, but upon receiving a signal such as a key being hit, its electronic device synthesizes sound using its own internal microprocessor (i.e., computer). Computers can be directly attached to a MIDI keyboard to capture the musical notes being played. There are also software programs that let you enter the notes directly via the computer's mouse and keyboard. The composed music can also be played through a MIDI keyboard that has a synthesizer.

You should note that the MIDI signals are not digitized audio sample points, but note information played with a virtual instrument. Such information includes, for example, the instrument being played, the note being played, the duration of the note, and how loud to play the note. MIDI has compact file size and is easily edited. However, it requires a synthesizer to play. QuickTime has its own selection of high-quality MIDI instruments and thus can play MIDI without an external MIDI synthesizer. But it sounds different from a fullfledged synthesizer. * The material in this handout is excerpted from Chapter 4 of the Primer: Fundamentals of Digital Audio, a work supported by the National Science Foundation under Grant No. DUE-0127280 written by Dr. Yue-Ling Wong (ylwong@wfu.edu), Department of Computer Science and Department of Art, Wake Forest University. http://digitalmedia.wfu.edu/project/digital-media-curriculum-development/