Home | Audio Magazine | Stereo Review magazine | Good Sound | Troubleshooting |
How many frames per minute do you think we should expose?” John asked Jill. “Haven’t the slightest idea,” Jill responded. “Let’s see what happens.” John and Jill were animation students making their first short film. They needed to shoot a brief segment that conveyed the passage of time—like in the old movie serials where the hands of a clock race around the dial a few times. To get this effect, they had removed the hour and minute hands from a clock, leaving just the second hand. “Let’s be conservative,” John suggested. “You know how our teacher always tells us to make every frame count.” “Why don’t we try shooting one frame every 45 seconds? That should give us the effect we need without using too many frames” Jill offered. With their camera on a tripod pointed at the “animated” clock, John opened the shutter for one frame as the second hand hit the 12 o’clock position. Forty-five seconds later, as the second hand was pointing toward 9 o’clock, John exposed another frame John continued this procedure, exposing one frame every 45 seconds, until 48 frames were exposed. Since their movie camera ran at 24 frames per second, this would give them 2 seconds of the hand spinning around the drawn clock face. “That should do it,” Jill said. “I’ll meet you here tomorrow after the film has been developed so we can see the results. We should leave the camera and clock set up so we can try again if this doesn’t work.” The next day, John and Jill put the short piece of film in the projector and displayed their work. As the blank leader film cut to the two seconds that represented the previous afternoon’s work, John and Jill were shocked by what they saw. Instead of the clock’s hand moving forward around the dial to show the passage of time, the hand moved backward! Not only did the hand move backward, but it jumped in 15- second increments! “But we exposed a frame every 45 seconds!” Jill exclaimed. “Why should the clock hand move in 15-second intervals? And why backward?” The two dejected, confused students were about to try another shot but had no idea what to do differently. Just then, Dr. Butterworth poked his head into the film lab. Dr. Butterworth was a physics professor and, consequently, thought he had the answer to any practical problem that might arise. He also happened to be an audiophile and taught a class on digital audio for the University’s music department. “What’s the problem, boys?” the professor asked. John and Jill told the professor exactly what they’d done and showed him the disappointing piece of film. “Ahh, this is a very simple problem:’ Dr. Butterworth said, looking off into the distance reflectively. “In fact, it was solved in 1928 by a guy called Harry Nyquist. His theorem became a cornerstone of digital audio.” “Digital audio!” exclaimed Brad. “What does our film have to do with digital audio? We don’t need to know what this Nyquist dude said nearly 70 years ago. Just tell us how to get our shot.” Jill was starting to get interested in what the professor had to say. “Let him explain it to us,” he said. “Well, you’ve run into a classic problem in sampling called ‘aliasing,’ “the professor began. “Sampling?” John said indignantly. “We weren’t sampling anything. We just exposed a frame of film at periodic intervals as the clock hand moved around the dial?’ “Exactly,” Dr. Butterworth said. “Sampling is nothing more than converting a continuously variable event into a series of discrete events, Just as you sampled the movement of the hand around the clock face with your movie camera, a digital-audio sampler ‘exposes a frame’ of an analog audio signal’s continuously varying voltage at periodic intervals. These discrete events—the samples—represent the continuous analog audio signal when put one after another with the same time reference as when the sampling took place.” “Okay. I can see that our movie was a kind of sampling:’ John said, “but why did the clock hand move backward?” “You ran into the problem solved by that Nyquist fellow I mentioned earlier,” Dr. Butterworth patiently explained. “If the continuously variable event you want to sample moves quickly, the rate at which you take samples must be similarly fast. Nyquist established the relationship between the speed or frequency of the analog event and the sampling rate. It’s called the Nyquist Theorem.” “But we’re getting off the subject” John protested. “What did we do wrong with our film?” “Instead of sampling the clock hand every 45 seconds, as you did, let’s suppose you exposed a frame every second. Now, when you played back this faster-sampled movie, there would be no problem. The second hand would move forward in 1-second jumps and you would have an accurate representation of the hand’s movement?” “But that would take up way too much film,” John argued. “Let him finish:’ Jill said. “I can start to see what the professor’s getting at.” But John interjected impatiently; “Okay, I can understand that we have to increase the number of frames per minute. But exactly how often do we have to expose a frame as the second hand moves around the clock face?” “This is where Nyquist comes in,” Dr. Butterworth resumed. “He said that the sampling rate must be at least twice as high as the frequency of the event we wish to accurately sample. In the case of your clock, the frequency is one event per minute—the second hand makes one complete cycle from 12 o’clock to 12 o’clock in exactly one minute. Divide one minute by two and you have 30 seconds—the slowest possible sampling interval that will accurately sample the clock hand. So that you don’t attempt what’s called ‘critical sampling’ and have some margin for error, you should expose one frame every, say, 25 seconds. Your film will then show the clock hand moving in the correct direction.” “But how does this relate to digital audio?” the inquisitive Jill asked Dr. Butterworth. “In digital audio", the professor expounded, “the sampling rate must be at least twice as high as the highest audio frequency we wish to sample. To capture a 20kHz sinewave, a sampling frequency of at least 40kHz is necessary. Just as we needed to expose at least two film frames per cycle of the clock hand, we need two samples per cycle of the analog audio waveform to create an accurate representation of that waveform. High audio frequencies need fast sampling rates—they can be thought of as fast-moving events. The voltage swings through its cycles many more times per second than low frequencies.” “I’m beginning to understand now:’ John said, “but I still don’t know why the clock hand moved backward in our film?’ “That was the aliasing I mentioned earlier. If you violate the Nyquist Theorem and try to sample an event at less than twice that event’s frequency, a new, spurious event—an alias—is created. It’s like a criminal who takes on an alias to disguise his identity: the event sampled at less than twice its frequency appears as a totally d frequency. “Remember how the second hand in your film appeared to move in jumps of 15 seconds even though you took samples every 45 seconds? The 15-second event you saw was an alias, a false signal, that resulted from having too slow a sampling rate. In digital audio, aliasing is also called “fold— over” because the undersampled frequency folds over toward the audio band as a false signal?’ The puzzled expressions on John’s and Jill’s faces told the professor he needed an illustration. He happened to have a copy of the second edition of Ken Pohlmann’s Principles of Digital Audio with him, and turned to page 52. “For example, if you sample a 33kHz sinewave with a 44kHz sampler;’ Butterworth said, referring to the diagram, “the sampler will accurately take samples every 44 thousandths of a second. But the points on the waveform from which the samples are taken also represent a signal with a frequency of 11kHz. There’s absolutely no difference in the sampled data between a correctly sampled 11kHz signal and the undersampled 33kHz signal. “If you subtract the frequency of the undersampled signal from the sampling rate, you get the frequency of the alias. In our example, the sampling frequency of 44kHz minus the signal frequency of33kHz produces an alias at 11kHz. If our 44kHz sampler sampled a 43kHz signal, the alias frequency would be 1kHz. Similarly, if the sampled frequency is higher than the sampling rate, aliases are again created. A 55kHz signal sampled at 44kHz would produce an alias at 11kHz. “Once an alias app in the audio band, there is absolutely nothing that will detect and remove it. This is why we must adhere to the Nyquist theorem and sample at more than twice the highest frequency we wish to. “Ah-HA!” Jill shouted with a sudden flash of insight. “I know why our clock hand moved in 15-secondjumps! The event we wanted to sample had a frequency of one per minute—the time it took for one revolution of the second hand—and the sampling interval was 45 seconds—or 1.25 samples per minute. If we subtract the event’s frequency from the sampling rate—1.25 samples per minute minus 1 minute —we get 0.25 minutes, or 15 seconds, exactly the rate at which our clock hand appeared to move!” Jill, quite pleased with himself, continued enthusiastically: “If we had sampled every 59 seconds, the second hand would have appeared to move backward in one-second increments—the difference between the sampling rate and the event’s rate. And if we sampled every 58 seconds, the hand would appear to move backward in two—second increments. The one- and two-second events are the aliases—completely new frequencies created because the event’s cycle was faster than half the sampling rate?’ “That’s right;’ Dr. Butterworth said, “but in digital audio the sampling frequency remains constant and the sampled events change in frequency. As the under-sampled signal increases in frequency, the alias signal ‘folds over; descending back toward the audio band. If we sample a 44kHz signal with a 44k1t sampling rate, we get DC—all the samples are identical. That’s just like exposing one frame of film per minute as the hand is at 12 o’clock. When you play it back, the hand doesn’t move. The sampling rate is exactly the same as the event’s periodic rate. “Let’s think of another film. We’ll make a cardboard disc, draw a straight line from the center to the edge, and attach it to an electric motor that slowly accelerates to a high speed. We’ll let our movie camera run at its normal frame rate and turn on the motor. When we play back the film, we see the cardboard disc accelerating in the correct direction. As it starts to spin faster, however, it appears in the film to slow down, stop, then start turning slowly backward. It picks up speed in its apparent backward spin, then slows down, stops, and starts turning forward again. It keeps repeating this cycle until the motor has reached its maximum speed. “The appearance of the disc slowing down before stopping illustrates how frequencies sampled at less than half the sampling rate ‘fold over; returning as alias frequencies descending back toward the audio band. The point where the disc appears to stop occurs when the shutter opens at exactly the same place on the disc’s rotation, giving the appearance of no motion—the frame rate momentarily matches the disc’s periodic rate. The apparently stationary disc is analogous to a digital audio sampler putting out DC when the sampling rate is the same as the sampled frequency?’ “So maybe that Nyquist dude does have something to say about how often we should expose our film,” John admitted grudgingly. “That’s why;’ said the professor, hitting full stride, “all digital audio systems must have low—pass filters at the input. In fact, they’re called ‘anti—aliasing’ filters. The sampler can never be permitted to see any signal with a frequency above half its sampling rate. If it does, alias frequencies appear, sounding like birds chirping. Digital audio has enough problems without having to put up with a chorus of singing birds during the music?’ John now offered his own observation: “Instead of increasing the 45-second exposure rate, we could have used the minute hand instead of the second hand. By using the same sampling rate on a slower event, we could have accurately preserved the movement of the clock hand?’ “Exactly;’ replied Dr. Butterworth. “Low-pass—filtering an analog audio signal before the sampler is analogous to removing the second hand from the camera’s view and replacing it with the minute hand. Both prevent a violation of Nyquist’s theorem?’ “But if a 20kHz sinewave is sampled only a little over two times per waveform with the compact disc’s 44.1kHz sampling rate;’ John asked, “what happens to the information in the waveform between the samples? Aren’t any ‘squiggles’ in the waveform completely lost?” “I know this one,” Jill said confidently. “There is no information between samples to be lost. At 20kHz, only a pure sinewave can be recorded and played back because the anti— aliasing filter removed any frequencies above 20kHz. There can’t be any ‘squiggles’ in the waveform between samples. And two points on a sinewave are enough to accurately reconstruct that sinewave?’ “Then that means digital audio is perfect,” John surmised. “This must be the best of all possible worlds?’ “Not quite,” said the professor with a wry smile, “but we’ll save that story for another day?’ == == ALSO SEE: == == == |
Prev. | Next Top of Page All Related Articles Home |