- May 1, 2016
A real DAC, configured to reproduce a sampled, bandlimited signal (as in audio) will bandlimit its output, exactly as if it *did* add all of the sinewaves below the Nyquist frequency of its sampling rate. If you sample a 20khz sinewave at 44.1 khz, you'll get a pointy zigzag - most pairs of adjacent samples will have opposite signs. But if you feed that into a soundcard running at 44.1khz, the output will not be a horrible sawtooth - you will get a perfect reconstruction of the input sine wave.That's nitpickery, *nothing* can output *perfect* square waves. A maximum step from say 0V to 5V at 44kHz is ~0.22V/µs (if I didn't mess that up, I'm still not quite awake ^^) which is definitely doable with a good DAC. The first one I found right now can do 35V/µs for example.
What *I* was mainly trying to say is that (common) DACs do not output several added sinus waves but rather a voltage defined by a series of input values directly converted to a series of output values.
Post automatically merged:
I think you might have misinterpreted the (excellent!) videos a little. DACs don't "literally" operate in the frequency domain - usually the digital numbers represent a time series of amplitude values, just as Akko says. But for audio you want to apply a "reconstruction filter" which bandlimits the output, since the input is known to be similarly bandlimited - any frequency you output that is above the Nyquist frequency (say, the higher harmonics of the sharp edge of a square wave) is *noise* that definitely wasn't in the input signal - so you don't want to do that! It's not a "side effect" that audio DACs won't output a "perfect" square wave - it's a feature!You really, really need to watch at least the second video I posted links to above earlier. Filtering is actually far easier in the digital domain*, and the output of a DAC is not square waves - essentially the digital numbers give the coefficients of different frequencies and magnitudes of sine waves that need to be added together to give the intended output. This has the side effect that a DAC cannot reproduce a square wave, as it would need to sum an infinite series of sine waves to get a step function.
e.g. High quality Notch filters are expensive in the analogue domain, but trivial to do digitally.