Signal Digitization Analog vs Digital Signals An Analog Signal A Digital Signal What type of signal do we encounter in nature? What type of signal is required by computers? What are the issues involved in converting from analog to digital?
Signal Digitization Analog Holds a Lot of Information The Analog Signal: A Closer Look Can a computer represent an infinite number of values? Amplitude The amplitude can take on an infinite number of possible values Time To get an exact copy of the signal, an infinite number of samples must be taken.
Signal Digitization A way to overcome the “time” problem Amplitude Time Sampling – breaking a signal up into discrete pieces by measuring the signal at regular time intervals. The higher the sampling rate the better the quality of recording!
Signal Digitization A way to overcome the “value” problem Amplitude Time Quantizing – grouping the infinite set of possible values into a finite number of bins and then assigning a binary number to each bin
Signal Digitization Voila! The analog signal is now digital! …
Storing Audio Signals Wave Files a digital audio representation uses a sampling and quantization to store sound 0 4 bytes 'RIFF' 4 4 bytes 8 4 bytes 'WAVE' 12 4 bytes 'fmt ' 16 4 bytes 0x // Length of the fmt data (16 bytes) 20 2 bytes 0x0001 // Format tag: 1 = PCM 22 2 bytes // Channels: 1 = mono, 2 = stereo 24 4 bytes // Samples per second: e.g., bytes // sample rate * block align 32 2 bytes // channels * bits/sample / bytes // 8 or bytes 'data' 40 4 bytes 44 bytes
Storing Audio Signals Musical Instrument Digital Interface (MIDI) Files a description of musical events, NOT a digitization of an audio signal representation of a sound includes values for the note's pitch, length, and volume very compact relative to digital audio Delta Time(decimal) Event Code (hex) Other Bytes (decimal) Comment 0 FF bytes: 4/4 time, 24 MIDI clocks/click, 8 32nd notes/24 MIDI clocks 0 FF bytes: 500,000 usec per quarter-note 0 C0 5 Ch. 1, Program Change Ch. 1 Note On E4, piano Ch. 1 Note Off E4, standard 0 FF 2F 00 Track End
Overcoming Limited Bandwidth Compression and Streaming Compression – reducing the amount of space needed to represent video or audio. Streaming – instead of downloading the whole video or audio, get enough to start playback and then continue download in the background. Which download technique will/won’t work when listening to web radio?
CD Trivia How many samples per second are taken for a CD? 44,100 (sampling rate of 44.1 khz) How many bits per sample? 16 (Other factors: error correction, 2 sample streams for stereo)