Alternative to band limited waverforms for antialiasing oscillators

Synvox

Member
Hello,

this question is regarding the usage of the Audio library on a Teensy 4.0 or 4.1.

i know there are already some threads on band limited waveform generation etc. here in the forum, but i have a specific question, which hopefully will suffice as a reason to create a new thread.

Is it feasible to use an 8-pole 48dB/octave (4 stages) biquad lowpass filter object (set to somewhere between 15 and 20 kHz corner freq.) after each waveform oscillator instead of (or in addition to) using band limited waveforms?
The reason behind this is, that i would like to implement a sync function in the existing waveform oscillator code, which of course introduces a step response in the waveform and might lead to aliasing. I don't know that much about DSP-coding, so i wouldn't be alble to do this with band limited step responses (BLEPs etc.).
My idea then was that instead i could maybe use a steep lowpass filter after each oscillator to mitigate or reduce the aliasing effects. From the processing power perspective it should be possible on a Teensy 4 i think, because i only want to implement one voice (with multiple oscillators etc.) per Teensy, which would then be fed via an i2s-DAC into an analog signal processor chip (4-pole filter and VCAs, AS3372). So the Teensy would only generate 3 or 4 raw waveform oscillators (with sync capabilities), noise and all the control signals (Envelopes and LFOs) for 1 voice.

Also a question is, if it's necessary to put a biquad filter after each oscillator, or if it would suffice to put one biquad filter at the end of the digital signal chain just before the i2s output. Where exactly does the aliasing happen? Is it right at the output (or processing of the output) of an oscillator (or any object, which produces a non-band-limited step response in the audio stream), or is it at the point of digital to analog conversion? Since the filters in the i2s-DAC do not remove the aliasing, i would assume that aliasing happens at the point of digital audio stream generation or the next processing step (even if it's only mixing).

I'm thankful for any clarification of my misconceptions:confused: and any advice on this topic.

Many thanks and best regards
Neni
 
I'm sorry. I just saw that i posted this thread in the wrong sub-category. Can it be moved to "Audio Projects"?
 
I'm going to go with answer no, probably not feasible, at least not in the simple way described.

It's not that Teensy 4.1 lacks the processing power to implement a lot of biquad filters. It certainly can, many times over. But in this case, I'm pretty sure they won't do any good, if deployed at 44.1 kHz sample rate. The oscillators generate a stream of samples at 44.1 kHz. If you make sudden changes like large phase change which (maybe) cause aliasing, the aliased spectral output at the wrong frequency is already "baked in" to the output stream.

For this sort of scheme to work, you'd need a special oscillator which creates samples at much higher speed than the normal sample rate, and a filter which takes that higher data rate as its input. That may be possible, but it would need to be a very special oscillator which does all this internally. We already have 2X oversampling (which really should be 3X) in the state variable filter, and as I recall 4X oversampling in the ladder filter, so this sort of thing certainly is possible with a lot of work done inside the audio objects. It's just not as simple as adding a filter in the design tool.
 
Many thanks Paul for your answer.

Yes, i'm afraid you're absolutely correct on this. I've now read several papers and writeups on antialiased oscillators, and none of them mention low pass post-filtering as a viable method of antialiased waveform generation. Virtually all of them describe band limited Step (BLEP) and other waveform generation algorithms, all of which are implemented on a per sample computation basis inside the actual waveform generation code (except the table-based ones).

So i will probably stick with my original plan of using the polyBLEP oscillator audio object (at least as one oscillator bank), which user "flo" from this forum kindly put together a while ago:
https://forum.pjrc.com/threads/62240-New-Audio-Object-polyBLEP-Oscillator-with-bandlimited-hard-sync

It implements 3 polyBLEP oscillators with different waveforms in one audio object, where the latter two can be synced (antialiased) to the first one. Although as a synced waveform only sawtooth is available, it's still better than no sync at all:). It's also not the most efficient audio object since it uses floating point math, but a Teensy 4 should have enough horsepower to run this and several other audio objects for one synth voice.

Thanks again and best regards
Neni
 
Back
Top