New Antialiasing Technique?


#21

I get your point @jaffasplaffa, I'll follow your advice when i will implement wavetable objects.

At the moment, I'm in an investigation phase.
I investigate practical use of Differentiated Polynomials on the Axoloti :

  • polynomial order ?
  • numerical problems / accuracy / ill conditions (div by 0)...
  • float, fixed point or mix ?
  • oversampling ?
  • usage:
    • wavetable
    • distortion
    • phase modulated wavetables
  • CPU load

Here are two simple and practical examples of Differentiated Polynomials used for distortion.

Here is a first order differentiated polynomial HardClipper:
DPHardClip.axo (1.9 KB)

and a first order differentiated polynomial SoftClipper:
DPSoftClip.axo (1.8 KB)
~740 cycles

I tried many combinations of int32_t and floats and in this case, using floats gave me the best CPU counts. Maybe because the FPU has lots of registers that helps the compiler to optimize the code...

PS I tried to go the Github / contribution way with no success so i post them here.


#22

Haven't had a chance to test any of these objects, yet, but if I may go back to something I mentioned earlier..

Do you think it would be possible to create an Axoloti patch capable of recording in realtime, then pre-process the recording into a wavetable suitable for anti-aliased DPW playback?

a|x


#23

Hi @toneburst,
I think that it is possible.
I think that the steps would be:

  • usual steps:
    • sample
    • loop (with cross-faded envelopes or crossing point / cycle detection)
    • after those steps we have v[] the table of values for one cycle
  • preparation / pre integration steps:
    • DC remove on v[]
    • calc of dv[] (delta values dv[i] = v[i+1] - v[i])
    • calc of first order integrated table Iv[] (Iv[i+1] = Iv[i] + v[i] + 0.5*dv[i])

The preparation steps are not too complicated (as compared to FFT bandlimiting used in MIPMAPing).

After this preparation, i think that the tables could be used like the static table I've hardcoded in wave3.axo

In the next days, i think that i will experiment with oversampling because to me, first order DPW should be complemented by x2 or x4 oversampling for high quality results.


#24

Yes I see there are many things to take in to consideration. Sorry, I can't help you with the technical stuff, seems like a great project. Thanks for taking my words into consideration. Still looking much forward to play around with your finished object :wink: The oversampling/better quality idea sounds really great :slight_smile:


#25

Wow. I've been reading Thierry's axoloti work again, and I love this work: sounds great, definitely over my head, and I was google searching for BLEPs and DPWs in hopes I could learn something and apply it to my own work (and maybe one day get stuff happening on Axoloti, too).

I didn't think I would run across this (first?) SmashedTransistors post, saying 'I'm new here'. I kind of am too, as I keep busy and can only revisit axo places now and then. But I think I can answer the OP question.

Because I'm Chris from Airwindows, and I'm the one who did Slew2 :slight_smile:

It is NOT antialiasing, not really. I'm not nearly as good at antialiasing as Thierry. What's in Slew2 is a weird sort of technique for crudely oversampling a waveform and then doing weird things to downsample it back, and specifically what happened in Slew2 was accidental. It's a slew clipper, nothing more, but it interacted strangely with the 'antialiasing' that's not really antialiasing, and produced a big cancellation node right at Nyquist. Fun but I don't think there's anything in there that'll apply to real antialiasing (I'm better at wordlength reduction, still working out things about antialiasing).

I could open source (MIT license) Slew2 if you like, though the 'antialiasing' is a bit sad. But it did produce Slew2, so that was kind of interesting. I expect if you run sweeps and things through it, it will freak out in weird ways like the other plugins of that generation: I ended up going with a minimal-calculations model and putting all my attention on word length, and just doing plugins which don't challenge Nyquist so much. Of course if you're building raw oscillators you can't do that :smile:

oh, and of course Olivier is right, it wouldn't work as a general anti-aliasing solution for digital oscillators.

Anyway I just had to reply, to say, surprise! I am here, and already a big fan of Thierry's work. Who knew that my experiments would start such a discussion? I too am interested in the answers. Maybe I'll end up with real antialiasing after all :heart_eyes:


#26

Hi Chris, great to see you around this forum, and hoping to see (hear) something of yours in axoloti land one day.
I'm also a great fan of Thierry's (@SmashedTransistors) axoloti achievements. I'm no coder, only a happy user, and I can't thank enough all you guys that provide us amazing / useful objects for our patching adventures.


#27

That Skew2, does look interesting :slight_smile:


#28

And a big thank you to @johannes that provides us with such a versatile environment !


#29

Hi @chrisj

I hope so, this is really nice to have code running out of a PC with almost no latency.

Lots of people, from companies and academics, focus on "Virtual Analog" stuff. I'm not a big fan of this, and this is great to see people experimenting with new ideas. There is a lot of stuff to experiment with non linear "filters".


#30

If nothing else I can post the source for it: it's Slew2 that OP was interested in :slight_smile: definitely a bit weird but nothing people can't implement in an Axo object.

Slew2 Source