Beginner question on oscillator antialiasing

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I see it often suggested to use BLEP methods to accomplish antialiasing in oscillators.
It's probably a naive question, but wouldn't it work to simply apply a smoothing, like a low-order FIR filter, to the point of discontinuity?

I understand given the Nyquist theorem that a naive oscillator, non-oversampled, already has the high frequency components mixed in, and the aliased output is indistinguishable in theory from the real signal. I understand too that oversampling cannot work as a generic solution for oscillators having hundreds of harmonics.
What about applying a FIR LPF, not to the whole signal, but only to the zone of discontinuity, leaving alone the rest of the signal?

From my understanding (correct me if wrong) minBLEP/polyBLEP provides an approximation of the perfect step residual function.
It has a drawback: it must be precomputed and so only applies to predefined shapes like as saw, square...
It cannot be used to antialias and sync arbitrary shapes. I have in mind the oscillator of a Moog which can change shape at the turn of a knob, and it doesn't seem a similiar thing can be done with BLEP.

Maybe I am a noob and the suggested idea is stupid, I have no idea of its performance.
My intuition suggests me that maybe LP filtering (trivial such as h=[0.25,0.5,0.25]) can reduce high frequency harmonics enough that if coupled together with low factor oversampling some good AA may be achievable.

What do you think? Or is there a good conventional solution for arbitrary waveforms?
 

Post

What you have suggested is simply to use a suitably high sampling rate followed by low pass filtering as an approximation, to reduce aliasing. Beneath somewhat confused sentences, this idea can be seen, when read carefully. There is no doubt that this can work, but it is an approximation.

Also the meaning of oversampled needs to be clarified:

from https://en.wikipedia.org/wiki/Oversampling
In signal processing, oversampling is the process of sampling a signal with a sampling frequency significantly higher than the Nyquist rate.
Since waveforms like square,saw etc contain frequencies up to infinity, one cannot oversample them.

One can filter them before sampling however, but that cannot be done numerically inside a computer program. It has do be done mathematically, on paper. (Or one do that paper-pencil calculation with a computer program). The idea is that one cannot sample then filter (as that would be an approximation). You have to first filter (obtain a formula that generates bandwidth limited signal), then sample. Not the other way around (whether this is practical or not is a different matter, but if you follow what is correct in principle, then you can find something practical and useful).

What is interesting is that these basic concepts and many more are very well explained in this book http://www.dspguide.com/ but since it is not directly audio or music-dsp related, some people do not read it (or consider it interesting) and struggle with basics while trying to do more advanced things.
~stratum~

Post

stratum wrote:Since waveforms like square,saw etc contain frequencies up to infinity, one cannot oversample them.
I'm not suggesting oversampling as an ideal solution, but its worth mentioning that as the partials decay at increasing frequency we'd only need to oversample enough that aliased partials are below an acceptable level, perhaps the noise floor of the system. Of course this will add significant cpu cost if we want to do really clean waveforms this way.

Post Reply

Return to “DSP and Plugin Development”