So how do we go from seemingly jagged lines to nice curves in Digital Audio? Here is some background that might help to understand.

First a quick reminder of what we are talking about

:

This is the way some applications represent a wave file, this is the characteristic join-the-dots view:

This is what the exact same signal looks like in an application that shows the reconstructed waveform as it comes out of your converters:

This is a perfectly smooth 10Khz sine wave. So how do they do it?

The clue to this whole story is the way that complex waveforms can be seen as a series of added up sine waves. (Thanks to Mr Fourier for figuring that out).

To illustrate this, the following animation starts off with a single sine wave and adds an increasing number of odd harmonics to form what approaches a square wave:

The more odd harmonic one adds, the closer one gets to a square wave. With an infinite number of odd harmonics, we could create a perfect square wave. (And as we can never have an infinite number of anything, there are no perfect square waves in nature).

Here is a similar animation but this time we create a triangle wave:

The reason it becomes a triangle wave is because the level of the harmonics rolls off faster as they get higher compared to the harmonics of a square wave.

And here we have an animation of a sawtooth wave being created: (In this case we add even and odd harmonics)

Now, if you go in the opposite direction and start with a waveform that is a theoretical square, sawtooth or triangle wave and start removing the harmonics, as you progressively remove them, the rounder and more curve like the waveform becomes. The exact same thing happens if we start with a more complex but jagged and pointy waveform like the first picture in this post. Remove the harmonics (or upper frequencies) of the signal and you end up with a smooth rounded waveform just like you see in picture two.

What are harmonics and how do we remove them? Harmonics are higher frequency sine waves that have a mathematical relation to the base frequency. And how do we remove higher frequencies? We filter them out with a low-pass filter and a low-pass filter is exactly what you will find in the output of any quality DAC.

If one were to start with a perfect square wave and remove all the harmonics and just keep the fundamental base frequency we would get a perfect sine wave. Not only that, we can mathematically predict every single aspect of that sine wave before we even start removing the harmonics. The same rules apply to sawtooth waves or triangle waves.

Thanks to the work of geniuses like Mr Fourier, Mr Shannon and Mr Nyquist, we also know that the same thing applies to complex periodic waveforms and even random waves. We can predict mathematically

**exactly **what will happen when we filter out higher frequencies. That is why an application like Adobe Audition or iZotope RX can show us

**exactly** what the reconstructed waveform (the one that has been filter by your DAC) will look like before it gets anywhere near your DAC. Let this sink in. It is important!

This also brings us to the extremely important point in all these discussions about increasing sampling rates: It does not give us any more resolution! The increased sampling rate just allows us to sample higher and higher (inaudible) harmonics. There is not any more precision in the output within the frequency range we want to sample. The stuff we can hear. Again, let this sink in. It is important!

That waveform that looks like a jagged mess in some audio applications, just like in the first picture in this post, will look like the nice smooth wave in the second picture by the time it comes out of your DAC.

To drive the point home it is important to understand that our ears also function as low-pass filters.

*Even if you increase the sampling rate of your system, your ear is filtering out all those upper harmonics anyway!*
Which brings us back to the topic of Inter Sample Peaks: Certain signals, or rather I should say certain combination of sample points (it isn't an audio signal until it has gone through the reconstruction filter of your DAC), when filtered at the DAC will cause wave forms that "overshoot". This example I created a few years ago illustrates the point well:

Although all the sample points are within 0 dB FS, if you look at the highest peak this signal causes after filtering by the reconstruction filter, it is at above +6 dB FS! If your DAC has enough headroom in the analogue components, it will happily recreate that +6 dB FS peak (or rather a peak 6 dB higher in voltage than whatever level 0 dB FS represents depending on what analogue level your DAC is calibrated to). If there is not enough headroom in the design, this signal will cause analogue clipping in your DAC.

I hope this brings some clarity to the topic.

Alistair