1.3 Digital-to-analog conversion

1.3 Digital-to-analog conversion#

To actually hear digital audio, the discrete sample sequence has to be converted back into a continuous voltage that can drive a loudspeaker. This is the job of a digital-to-analog converter (DAC), a piece of hardware in every phone, laptop, and audio interface.

A DAC takes the integer samples, produces a piecewise-constant (“staircase”) voltage signal, and then applies a reconstruction filter that smooths the staircase back into a continuous waveform (more on filters later in Chapter 9). The whole round-trip pipeline (analog input, through ADC and DAC, back to analog output) looks like this:

Four vertically stacked plots showing the ADC-DAC round trip: analog input sine wave, discrete samples after ADC, staircase reconstruction before filtering, and smooth analog output after DAC

The big idea is that, under conditions we will formalize in a later chapter, this reconstruction can be perceptually identical to the original analog signal \(x(t)\), provided \(f_s\) is high enough and \(b\) is large enough. For now, trust that the DAC is doing the right thing, and focus on producing nice integer arrays for it to play.