DAC performs antialiasing during conversion to analog but this does not eliminate the need to properly antialias generated waveforms as
once aliasing happens, it can't be "taken back". For example pure "saw" waveshape has infinite harmonics. If you don't apply bandlimiting, those infinite harmonics will fold into audible range (below nyquist/2) and become audible as nasty non-harmonic frequencies.
A 5 kHz sawtooth has harmonic partials at integer multiples of the fundamental:
fn = n * 5 kHz
With a 44.1 kHz sampling rate, the Nyquist limit is 22.05 kHz.
Any harmonic above 22.05 kHz will be reflected (“folded”) back into the 0–22.05 kHz band. A convenient alias-frequency formula is
falias=abs( ( (f + fs/2) mod fs ) ) - fs/2)
Harmonics of a 5 kHz saw and where they land
Below Nyquist (no aliasing yet):
| Harmonic | Freq | Status |
|---|
| 1 | 5 kHz | OK |
| 2 | 10 kHz | OK |
| 3 | 15 kHz | OK |
| 4 | 20 kHz | OK |
Above Nyquist — these fold back:
| Harmonic | Original | Folded to | Reflection reasoning |
|---|
| 5 | 25 kHz | 44.1 − 25 = 19.1 kHz | mirror across 22.05 |
| 6 | 30 kHz | 44.1 − 30 = 14.1 kHz | mirror |
| 7 | 35 kHz | 44.1 − 35 = 9.1 kHz | mirror |
| 8 | 40 kHz | 44.1 − 40 = 4.1 kHz | mirror |
| 9 | 45 kHz | 45 − 44.1 = 0.9 kHz | wrapped past fs |
| 10 | 50 kHz | 50 − 44.1 = 5.9 kHz | wrapped (no mirror needed) |
| 11 | 55 kHz | 2nd-zone mirror → 44.1 − (55 − 44.1)= 13.2 kHz | etc. |
You can see the pattern: every harmonic above Nyquist reflects back toward DC, then the process repeats in each band of width 22.05 kHz.
Intuition
- Sawtooth harmonics extend indefinitely, so many upper partials fold into the audible band.
- Their amplitudes still follow 1/n, but after aliasing they appear at unrelated frequencies, giving the “buzzy / digital” character.
Triangle has less energy in higher harmonics but still can alias.
When compared to sawtooth, triangle has only odd harmonics and their amplitude is 1/(n*n) as compared to 1/n for sawtooth.
So you need to bandlimit all generated data (including triangle wave).
See this for detailed explanation why aliasing happens and how to create alias-free equivalents of analog oscillators: