Introduction to Computer Music: Volume One

7. Digital-to-Analog conversion

Samples can be stored in a wide variety of fashions—as pits in a Compact Disc picked up by a laser (click here for details), on Digital Audio Tapes (DATs), on computer hard disks, in the flash memory of an MP3 player, or they can be generated in real time by either a computer or digital instrument such as a sampler. No matter what the storage or creation method, digital samples must be converted back into analog voltage values to be amplified and reproduced as sound from a loudspeaker. The circuit required for such a feat is the Digital-to-Analog converter or DAC as pictured below:

[Flash example of working DAC coming soon]

For the sake of simplicity, we have pictured a 4-bit DAC, while your CD player would have a 16-bit DAC to correspond to the bit-depth of the samples. Each sample is "clocked" into the DAC's register. A '1' in a register place will add a voltage to the sum of that sample proportionate to its binary value. In this hypothetical case, we have a sample whose binary value is 5. The gates or switches for the binary places of '4' and '1' are closed, and the value of 5 mvolts is sent out the DAC and held until the next sample is clocked into the register. Before you have visions of 16 physical switches flopping open and shut at 44,100 times per second, these are now very compact and cheap electronic switches, small enough to make your digital watch beep.

If samples are clocked into the DAC at the rate they were sampled, then the original frequencies will be reproduced up to the Nyquist frequency. If the samples are clocked in at twice the rate, then the frequency will be doubled. A common studio mishap is to play back a file which was recorded at 48K at 44.1K, which lowers the pitch by about a whole step. Because the output of a DAC creates a staircase wave (as in the sampling rate diagram of the previous module) instead of a smoother analog one, a smoothing (lowpass) filter tuned to the sampling rate acts to reduce the sharpness of those steps and the unwanted frequencies they can produce. The reason some super high-end audio applications have gone to not only 24-bits, but also to a 96K or 192K sampling rate is to make sure the roll-off of those filters—and the ADC anti-aliasing filters—are not in the audio range at all.

| School of Music | Center for Electronic and Computer Music | About This Text | Contact Us | ©2005 Prof. Jeffrey Hass