360 likes | 612 Views
Digital Audio. Course: CIS 3003 Fundamental of Information Technology. Objective. Physics and math representation of sound Properties of sound Audio digitization Compression Digital audio formats. What is sound?. Physical disturbance of air molecules.
E N D
Digital Audio Course: CIS 3003 Fundamental of Information Technology
Objective • Physics and math representation of sound • Properties of sound • Audio digitization • Compression • Digital audio formats
What is sound? • Physical disturbance of air molecules. • hence no sound in a vacuum space. • And sound travels further in water. • This transfer of energy among molecules creates a mechanical wave of energy called a sound wave, which propagates away from the source of the disturbance. • Often compared to water wave.
Different Wave Representation • Transverse: molecules are displaced perpendicular to the direction wave travels. • Longitudinal: molecules are displaced parallel to the direction wave travels. • Sound waves displaces molecules in this fashion.
Pure and Complex Sound Wave Pure sound wave • Follows a sinusoidal pattern. Tuning fork device generates a pure sound wave. • Pure sound wave can be described by • Amplitude, Period, Frequency Complex sound wave
Sound Properties • Everyday sounds are complex sound wave. • Pure sound wave follows a sinusoidal pattern. Tuning fork device generates a pure sound wave. • Pure sound wave can be described by Amplitude, Period, and Frequency.
Amplitude • Amplitude is the magnitude of the signal at a given instant in time; corresponds to volume.
Period • Period (T) is the time a wave requires to complete a single cycle; measured in seconds.
Frequency • Frequency, measured in hertz (Hz), is the number of cycles a wave completes in one second. Corresponds to pitch.
Frequency • kilohertz (kHz) 103 = 1000 Hz (thousand) • megahertz (MHz) 106 = 1,000,000 Hz (million) • gigahertz (GHz) 109 = 1,000,000,000 Hz (billion) • milliseconds (ms) 10-3 = 0.001 seconds (1/1000 seconds) • microseconds (μs) 10-6 = 0.000001 seconds (1/1,000,000 seconds) • nanoseconds (ns) 10-9 = 0.000000001 seconds (1/1,000,000,000 seconds)
Phase Shift • Phase difference describes the alignment of two waves along the time axis and may be measured in degrees (0-359).
Spectrum Analyzer Frequency Spectrum
Sound Digitization Analog-to-digital and digital-to-analog converts. Three-step process: • Sampling • Quantizing • Assign binary code
Sampling • Sample the voltage every n milliseconds • Done by ADC • Tradeoff between accuracy and size of resulting digital file.
Nyquist Sampling Theorem • The minimum number of samples per second (the sampling frequency, or fs) required to perfectly reconstruct the analog signal should equal at least twice the value of the difference between the signal’s highest frequency component (fmax) and lowest frequency component (fmin) • The theorem is represented by the following equations: fs ≥ 2(fmax-fmin) fs ≥ 2B where B is signal bandwidth.
Aliasing • Cause by sampling rate lower than the rate recommended by the Nyquist Sampling Theorem. • Produce false frequency not present in the original sound data.
Apply Nyquist Theorem • Apply Nyquist Theorem to sample human conversation. • Highest frequency (or pitch) produced by human is at 4000 Hz or 4 KHz. • Phone line is sampled at 8000 Hz. • Apply Nyquist Theorem to sample music recording. • Standard sampling rate is at 44.1 KHz.
Assignment 2 • http://www.cs.ucf.edu/~aho/cis3003/hw/ • Due next Wednesday 9/21/2011 at the beginning of the class. • Chapters 4 & 5
Quantization Approximate a continuous voltage range by a smaller set of discrete values. Each of the values can be encoded in binary.
Quantization Error The difference between the actual value of the sample and the value to which the sample is rounded off.
Size of a file Assuming 4-minute song sampled at 44,100 times per second with each sample encoded in 2 bytes and the song recorded with 2 channels. 4 60 44100 2 8 2 = 338,688,000 bits 40 MB
Size of a file How many bits generated from a 4-minute cell phone conversation? Sampling rate: 8000 8 bits per sample 8000 8 60 4 = 15,360,000 bits 14MB
Size of a file How many bits generated by the ADC of a 16-bit sound card with 96-KHz sampling rate to digitize an audio signal lasts 3 seconds? Sampling rate: 96000 16 bits per sample 96000 16 3 = 4,608,000 bits 4MB
Digital-to-Analog Conversion • Need to know sample rate and how many bits used to encode each sample • DAC found on CD and media players and sound card. • Need to smooth out the step effect of the signal.
Compression • Take advantage of human hearing limitation – perceptual encoding. • Sound lower than 20 Hz and above 20 KHz • Softer sound drown out by simultaneous loud sound. • Filter out less obvious sound in the presence of numerous sounds. • Lossless: text data, financial record, etc. • Lossy: video, audio, still images, etc. • Fidelity: How close a compressed file is to the original file.
Digital Audio Formats • MP3 (Moving Picture Experts Group Audio Layer-3 • Lossy and lossless compression • .mp3 extension • Can specify rate of compression • AAC (Advanced Audio Coding) • Based on MP3 • Adopted by iTunes • .aac or .m4a (M4A – audio only variation).
Digital Audio Formats • WMA (Windows Media Audio): • Played by Microsoft Windows Media Player on Windows O/S. • .wma • WAV (Waveform Audio Format): • Uncompressed; higher fidelity • .wav • AIFF (Audio Interchange File Format): • Uncompressed format used on Apple computers. • .af or .aiff
Example of Digital Audio Storage • Problem— Confirm that 20,000 compressed songs can be stored on an iPod that has a hard-disk capacity of 80 GB. Assume an average of 4 minutes per song and that the iPod encodes the songs using 128-Kbps AAC formatting.
Summary • Sound wave is transmission of energy of molecules and this energy propagates length wise along the direction of the wave. • Pure sound wave follows sine curve and can be described by frequency, amplitude, and phase shaft. • 3 steps of converting a analogue sound wave: sampling, quantization, and encoding. • Compression • Popular audio formats.
Summary • Discuss how sound is a transmission of energy among air molecules and how this energy is transmitted thru the molecules • Discuss pure and complex sound waves. the properties of pure wave. • Discuss the process of converting analogue sound to a digital format.