Wavefolder/waveshaper - the problem of gain compensation

In the spirit of the thread on my HPSS/Transients-sliced granulator, here is a wavefolder I’ve been working on.

The comment about not using FluCoMa tools isn’t fully accurate as it turns out. I did use fluid.loudness~ to try to improve my gain compensation, but it’s still not quite there.

I guess it’s the nature of wavefolding/shaping that you get pretty wild changes in gain as you adjust the parameters, particularly with ones like “creasing”. The gain compensation I’ve come up with works 100% perfectly…60% of the time. I’m kind of wondering if I should incorporate some pre/post fluid.loudness~ “gain riding” to more automatically get things in the same ball park.

Either way, open to thoughts on this.

It’s a mix of a few different approaches. Some ideas I got from a patch from @tremblap, other’s from a bit of code that Randy shared from the Aalto prototype, which is itself based on some Buchla stuff, and finally some ideas from the Mannequins Cold Mac (which is also based on Buchla stuff).

wavefolder.zip (21.1 KB)

Using a perceptual matching rider (loudness before/after) is a good idea for this indeed. I’d use the ITU settings because you can :wink: You’ll have to deal with digital silence and other extreme settings, but that should give you a good idea of how to tame this very (i find) input-dependant gain acquisition.

What I tried doing before was using the measurements to figure out how much to compensate for. It’s tricky though since it’s so non-linear (particularly things like ‘Crease’).

Having an auto-gain function would be cool, but I think in the end (as in, post-FluCoMa performance), I’ll end up building an output gain stage. I was just hoping to avoid that. (I do an ok job of this in my distortion module, it’s just harder here).

1 Like