Questions about the Saturation Module
-
Does anyone know what type of algorithm the stock Saturation module is inside HISE? I think it might be a type of hard clipping based on the harmonics that it produces, but if anyone knows for sure I what it is I would appreciate it. I am asking because I wan't to recreate it inside scriptnode.
Another question, is there a way to script smoothing (i.e. interpolation) of a knob, similar to how the smoothed node works inside scriptnode? I tried
Math.smoothstep
but it didn't have any audible effect. Basically I really like the built in saturator but I want to remove the clicks/artefacts when using the knobs. -
I've added a snippet to the browser which reimplements the saturator using a SNEX shaper node. It also features the
sfloat
SNEX object type that performs automatic smoothing of the parameter. -
@Christoph-Hart Thank you, gave me an excuse to try out the new snippet browser!!
Sadly, the SNEX shaper throws an error once I load the snippet, is the processFrame set properly to handle smoothing on both channels?
template <typename T> void processFrame(T& data) { for(auto& s: data) s = getSample(s); }
Apologies, I am an amateur with C++ so still trying to wrap my head around SNEX code.
-
@HISEnberg oh, interesting it worked when I wrote it but now it throws the error here too when I'm reloading the snippet. I'll investigate.
-
@Christoph-Hart Thanks, as always I appreciate your timely responses! I am having a great time checking out the snippet browser by the way. I have a few snippets I would be happy to contribute.
-
@HISEnberg Alright it's fixed - I actually fixed it here already (it was just a simple typo), but somehow the SNEX files embedded into a snippet were not being reloaded properly so I committed an outdated version. But this is fixed now too :)
And sure the snippet browser is designed to be filled by other users, the easiest workflow would just be to checkout the HISE snippet repository instead of using the download function in the settings, and then do pull requests for the snippets that you want to share in the "official repository".
-
@Christoph-Hart said in Questions about the Saturation Module:
Working now!
Thanks for sending the github repo for the snippets as well.
-