**Aliasing Effectively Vanquished! (way back in 1978 : US4249447)**

I don't know why I keep thinking I can add anything fundamentally new to the research that's already been done regarding waveform generation. People who had almost nothing in the way of processing horsepower wracked their brains and long ago mined out all of the simplest and most efficient and direct discoveries. Spent a couple of weeks looking into soft clipping, tried many things, sadly with nothing of interest to report. On Monday I was casting about listlessly on the old music DSP website (link) and encountered some code describing an old patented oscillator. Found the patent and simulated three different forms detailed there (link). Coded it up and have it running on the prototype. WOW! Pretty much exactly what I was looking for, a quasi band-limited version of my power-based phase modulation glottal generator. Here is a diagram of what I've got running:

The phase increment value ("frequency") comes in at the upper left and gets routed two ways. The lower way is fed to a second order polynomial, which gives us smaller numbers for smaller phase increments. The upper way is scaled to give C8 maximum and accumulated in the normal NCO fashion. The accumulated phase forms a sawtooth, which is optionally modulo multiplied by 2 to double the frequency, and fed to two summing nodes, which in turn feed sine wave functions. The lower sine wave is averaged for stability reasons (and to give a zero at Nyquist, or 24kHz), combined with a fraction (beta) of the polynomial result, and fed back to the phase inputs of the sine functions.

Beta controls the harmonic content, with 0 giving a pure sine wave, and 1 giving a 1/f harmonic roll-off (~sawtooth equivalent of 6dB / octave) and numbers in-between giving steeper slopes (we want ~12dB / octave nominal for vocal stuff). If we do the frequency multiplication for the lower sine generator we get odd harmonics at the output (~square wave) with similarly variable harmonic content. If you don't want just odd harmonics you can use a single sine function. The full all / odd consumes 62 cycles max. on my Hive processor.

The beauty part though is the spectra have the secondary steeper "knee" heading into Nyquist, which really tames aliasing. Here are some results from simulation which make that evident:

When beta = 1 there is a bit of ringing and rounding, but otherwise the waveform looks like a sawtooth. The spectra shows a secondary steeper roll-off above 10kHz which massively controls aliasing fold-back.

Using the output sinewave itself as a feedback phase modifier is super simple and quite ingenious! I've been avoiding all of these FM type solutions figuring they produced inferior spectra, were difficult to control, etc. but it doesn't really get much better or easier than this, particularly if you're looking for continuously variable harmonic content.

Is the knee audible? When beta is dialed back I would say yes to some small degree as muffledness, though the knee ends up being many tens of dB below the fundamental, which masks it a lot. At very low frequencies there is a bit of digital "burbling" going on, but it's pretty low level, and it seems all methods do this somewhat. It's more noticeable when pitch correction / quantization is applied.

**[EDIT] **Here's a sample of the new oscillator in the prototype: (link). Other than the marked lack of aliasing, and a more linear dynamic curve to the harmonic modulation input, I honestly can't tell any difference between it and the old oscillator. My ears are kinda old, let me know if you hear any aliasing, the polynomial can be easily adjusted to fix various frequency bands.

The last main brick in the DSP wall! (Leave those kids alone...)

**[EDIT2]** Tweaked the polynomial coefficients to minimize aliasing while maximizing harmonic content. Using **0.44, 0.76, 0.54** now (L to R in the drawing above). The "hump" out past 10kHz is now gone.