1. embed the hp SVF module
2. add two inlets (blue fraction inlets) called "pitch" and "reso"
2. go to k-rate code and add "+inlet_pitch" and "+inlet_reso" at the spots where it tells you it uses the param_pitch and param_reso values:
(ok, for the resonance I did add an extra function: __USAT(.......,27),
which keeps the values safe from wrapping when the values add up and are shifted beyond a 32 bit value)
so, just copy and paste to the right lines in the code:
int32_t damp = (0x80<<24) - (__USAT(
As you can see, adding inputs to a module is fairly straight forward.
Just go through the code to find the places where "param_......" is used and add "+inlet_....." where the dotted line is the name of the parameter.
There are a few things to think about though (ps, the text editor overhere doesn't show the code in the right way when I use it in a single line, so I needed to use multiple lines. In the axoloti you can just write it as a single line of code)
-values that, when added up, might go too high for a 32bit value, losing bits in the math process. You'll need to clip these->
a unipolar saturate/clipping to 27 bits, which is the range of a normal unipolar knob
which means a bipolar saturate/clipping to 27 positive and 27 negative bits, which is the range of a normal bipolar knob.
-in some cases you'll need to put the summation in brackets "(...)" to make sure it's being added to each other before the next calculation is done, eg. when a parameter value is multiplied->
if it says:
note btw, that when putting the summation between __USAT(......,27) or __SSAT(.....,28), you don't need those extra brackets..
some of the controls (gain x1, gain x16 and some of the envelope time knobs) use a different range and scaling which makes it impossible to "just add" an inlet value to the parameter value. For this other ways should be used to add external control, but this is a bit harder to explain if you haven't coded yet and depending on which kind of parameter you have and what it's being used for)