Page 2 of 3

Re: New PWM

Posted: Mon May 11, 2020 9:43 pm
by k brown
I noticed this produces pretty severe distortion/aliasing on higher notes - any way to smooth that out?

Does this maybe only work best in blue?

Re: New PWM

Posted: Mon May 11, 2020 10:49 pm
by BobF
BobsAllWaveformPWM_1a Antialiased and white.fsm
(994.08 KiB) Downloaded 1063 times


Hi Kevin,

Try this one!

Good luck, BobF.....

Re: New PWM

Posted: Tue May 12, 2020 12:21 am
by k brown
Thanks for that - however I would describe the results as a mild improvement at the expense of noticeably duller sound.

Re: New PWM

Posted: Tue May 12, 2020 4:22 am
by BobF
Hi again Kevin,

Unfortunately aliasing is common in many distortion and wave shaping devices. If you missed this post read it over for possibly a little more help.

Reducing aliasing of waveshaping using convolution.

Try the conv tanh.fsm and see if it helps any better than the anti-aliasing filter I added.

conv tanh.fsm
(867.53 KiB) Downloaded 1050 times


And last, you could also remove some of the 1 pole low pass filters from the 36db anti-aliasing filter, they are each 6db. This could add a LITTLE punch back in.

Good luck and please let me know how you make out.

Take care, BobF.....

Re: New PWM

Posted: Tue May 12, 2020 5:43 am
by k brown
A 'convoluted' answer! :) - I'll give it a try.

Re: New PWM

Posted: Tue May 12, 2020 7:09 am
by adamszabo
Bob, unfortunately the 36 dB filter is just a simple filter its not anti-aliasing at all. You cannot remove aliasing by simply filtering the signal with a low pass filter, its not how it works.

Re: New PWM

Posted: Tue May 12, 2020 9:36 am
by martinvicanek
A simple antialiasing technique consists in synthesizing the time integrated waveform and then numetically differentiate it. Example: a square wave is obtained by differentiating a triangle wave. The method is called DPW (differentiated polynomial waveform).

Re: New PWM

Posted: Tue May 12, 2020 9:43 am
by k brown
Easy for you to say! :shock: ;)

Re: New PWM

Posted: Tue May 12, 2020 3:07 pm
by BobF
My bad on the antialiasing filter, just found it in another schematic and well used it. Sorry!!!

Later then BobF.....

Re: New PWM

Posted: Tue May 12, 2020 5:16 pm
by BobF
Bobs3Freq_PWM.fsm
(836.92 KiB) Downloaded 1059 times


Hello all,

Had this laying around, so just thought I would add it for completeness.

Later then, BobF.....

@ Adam, it's fixed, very sorry!