More paper trouble (algorithm not working?)
So, I have more trouble with this paper...
The solution for anti-aliased waveshaping using a rectangular anti-alias filter is (9). However, if I use this formula to process some test audio, it does not work at all. Using (21) for processing, for example, leads to jumbled audio and the same happens if I use any other waveshaping function with their corresponding antiderivative. Though it could be that my implementation is not right, plugging (21) into a graphing calculator with x(t) = t shows the waveshape curve being shifted 0.5 to the right. I don't know why this happens but interestingly, a paper that builds on this idea of antiderivatives shows similar behavior: Using the second-order antiderivative formula (15) produces the correct curve (I think, at least) but it is shifted 1 to the right. In the picture, you can see the hard clipping function in green, the first-order approach in blue and the second-order approach in red. What am I doing wrong?
Posted Mar 30, 2020, 10:31 PM UTC
It's a casual low-pass filter. Some delay is an inevitable and harmless side effect. Nothing to worry about.
Hm, you're right. I took a look at my code again and spotted a dumb mistake I had the new and old batches of samples in the wrong order. It works now. Thanks!