I want to modify DSPModulePlugInDemo.h to include an arbitrary transfer function. Like y=f(x) where x is the input sample and y is the resulting output sample.
There’s a bit in the code where std::tanh is passed into Waveshaper. The compiler won’t let me substitute anything that requires additional parameters (eg. std::pow(a,b)). I’m not much experienced in C++.
Is there a way to define an arbitrary transfer function and pass it into Waveshaper? Or else perform it on the block samples directly (hopefully using the context already created in this file)?
MacOS 10.13.6 (High Sierra)