I only use one waveform/wavetable per tone generator. No band limiting. I'm sorry if I led you to believe that, or I were unaware that PolyBlep only worked for band limited waveforms.S0lo wrote: ↑Thu Jul 09, 2020 9:12 pm On a quick look at it, I'd say your doing it correctly since you've also added linear interpolation to the ELSE part. Although linear interpolation will still produce some aliasing, it's better than none. cubic is better.
Let me ask, Where is the waveform coming from? The waveform it self has to be band limited. If the user is simply drawing the waveform on screen then it's most certainly not band limited.
Try a waveform taken from a wave file or song. And play it at it's root frequency that it was recorded on. Any other frequencies will produce higher and higher aliasing as you go far from the root.
The reason PolyBLEP works well for saw/square is because you are generating those waveforms on the fly through formulas that produce only 1 discontinuity at that edge which PolyBLEP fixes. It's not because saw/square is special. To prove that, record a saw to a wavetable then play it again with PolyBLEP at a far frequency than what it was recorded on. You will hear aliasing with saw and square
I optimistically, naively just hoped that since "my" PolyBlep worked so great with a saw, and I saw there was different implementations for square, and triangle, perhaps there was a way to make it work with any, even hand drawn waveforms. Actually I don't mind if I have to check for discontinuity anywhere during sampling, meaning not just at the end.