The "supersquare" oscillator has a large DC offset


#1

I made the smallest possible testpatch showing the behaviour. I absolutely love the sound of the supersquare synth, I use it to add mysterious, somewhat noisy overtones to saw-pads, which sounds fantastic.

I noticed that I could very quickly drive the output into (nasty, digitial) overdrive when mixing in the supersquare oscillator.

I suspected the mixer arithmetic, but that seemed weird, with the mixers so widely used. So I isolated it to the supersquare oscillator, see attached picture.

Supersquare-Test.axp (1.3 KB)

I looked at the code, but I don't know enough to fix it, although I suspect it should be fairly easy.

The workaround is to add a simpl highpass-filter with very low cutoff frequency, which removes the DC offset, but of course costs a small CPU load penalty. (subtracting a constant value ("math/-c" object) also works, but somehow feels "wrong", since I'm not sure of the exact size of the offset.

P. S. Just found that the superSqrSaw oscillator has the same problem with pw values != 0. The DC offset is positive with negative pw values and vice versa.

Cheers,
Bernd


#2

Here it is: supersquare b.axo (1.5 KB)

I left its max upper range the same, because I thought it would be more useful for more stuff, but you can simply multiply it by .5 and it will do what you want. That has very little CPU impact. Like this:

The stuff with the DC offset in the superSqrSaw should be a thing of SirSickSik, though it doesn't seem to be much of a problem to me, to be honest. I wonder if it's supposed to work that way.

Edit: I was given access and added it to the community library.


#3

Thanks, I'll give it a try.

Bernd