Digital Recording and Playback Digital recording is discrete a sound is stored as a set of discrete values that correspond to the amplitude of the analog wave at particular times Source: http://www.cycling74.com/docs/max5/tutorials/msp-tut/mspdigitalaudio.html NOTE: A very similar diagram appears in RJ Fig. 8.4 Source: http://cnx.org/content/m15655/latest/ Sampling = selecting points in the waveform where a measurement will be taken H. Nyquist: To accurately capture a particular frequency, you must sample more than two times each period. e.g., to capture a tone of 200 Hz, you must sample at slightly more than 400 Hz. Each red bar is a sampling location in time. 1
Nyquist Highest frequency audible to humans 20,000 Hz to capture this [and all lower frequencies], sampling rate must be greater than 40,000 Hz Nyquist High-quality audio e.g., CD uses 44,100 Hz Undersampling using too low a sampling rate Undersampling using too low a sampling rate a 200 Hz Tone SR = 10 khz SR = 300 Hz SR = 2 khz an aliasing component unwanted frequencies not in the original sound the computer joins the dots incorrectly we hear this as a digital artifact 2
Undersampling using too low a sampling rate some troubling news! The solution to aliasing? e.g., if we sample at 44.1 khz, inaudible components above 22 khz will be undersampled these will cause aliasing! so, frequencies we can t hear can cause aliasing at frequencies we can hear Aliasing To prevent unwanted frequencies (digital artifacts), digital recording uses an anti-aliasing filter. This filter removes the frequency components from the sound that are higher than ½ the sampling rate (even if they are inaudible) e.g., if sampling rate is 22.05 khz we need to filter out all frequencies above approx 10 khz e.g., if sampling rate is 44.1 khz we need to filter out all frequencies above approx 20 khz 3
Aliasing Anti-aliasing filter = a low-pass filter. Removes higher frequencies. Some Terminology passband stopband Nyquist criterion: correct digitization will occur if sampling rate is at least 2 times the highest frequency of interest. Nyquist frequency = ½ the sampling rate. Actual sampling rate = slightly higher than twice the highest frequency of interest. Cut-off is 20 khz @ 44.1 khz è Quantization Quantizing how good a movie is measuring the amplitude of the waveform at a particular sampling location terrible 1 2 3 4 5 brilliant! discrete scores 5 levels of resolution 4
Quantizing how good a movie is a more precise scale red = original waveform blue = recorded waveform terrible 1 2 3 4 5 6 7 8 9 brilliant! discrete scores 9 levels of resolution Only 4 levels 8 levels Quantization levels Quantization: described in terms of bits (binary digits), which are powers of 2 1 bit = 2 1 2 bits = 2 2 3 bits = 2 3 4 bits = 2 4 2 8 = 8 bits = 256 quantization levels 2 12 = 12 bits = 4096 quantization levels 2 16 = 16 bits = 65536 quantization levels [min CD quality] 2 24 = 24 bits = 16,777,216 quantization levels 5
Quantization levels 8 bits = 256 quantization levels results in a noisy recording quantization noise 16 bits = 65536 quantization levels very high quality Quantization aka analog-to-digital conversion Digital Playback ADC Source: http://www.cycling74.com/docs/max5/tutorials/msp-tut/mspdigitalaudio.html 6
Reconstruction filter (another low-pass filter) Source:http://kvond.wordpress.com/2009/07/06/peaks-and-troughs-of-intensity-from-digital-to-analog-embodiment/ Storage Computer writes the number associated with a particular sampling and quantization into a digital audio file. bitrate (mp3 audio) bit rate = kbits/s (amount of info transferred over time) bit rate = sampling rate x quantization levels x channels Formats:.wav.aiff.mp3 7
bitrate (mp3 audio) Making a Good Recording for Research Purposes bit rate = kbits/s (amount of info transferred over time) bit rate = sampling rate x quantization levels x channels uncompressed stereo CD 44100 (Hz) x 16 (bits) x 2 (channels) = 1411.2 kbit/s compressed audio has a lower bitrate e.g., 320 kbit/s or 192 kbit/s environment: quiet, sound-treated chamber no rattling papers, noisy guests, cell phones talker: seated comfortably appropriate distance from microphone health: does not have a cold, laryngitis no chewing gum Making a Good Recording equipment: high quality microphone & amplification system high quality audio recorder* gain must be set to appropriate value What happens if the gain is too high? *computer, stand-alone, hand-held, CD 8
Clipped Recordings 440 Hz tone with severe peak clipping gain was set too high on the recording device gain of the signal is too high not enough quantization levels unwanted frequency components introduced by clipping The amplitude of the signal is louder than what can be adequately quantified. unsuitable for acoustic phonetic analysis (but might be used for artistic effect in music recording, e.g., by the Nine Inch Nails) What happens if the gain is too low? What happens if the gain is too low? very quiet portion of pure tone if we turn up the volume, we ll hear added noise [because we used only a few of the quantization levels available] 9