Applying AHDSR Envelope to Customized FX Effect
I am going to make a customized FX effect binary module and load it dynamically.
And here I have faced some problems.
I want to apply AHDSR envelope to the parameter of my new effect, for example cutoff of LPF.
However, I can't be sure how I can add modulators and link them to parse values to loaded binary module.
Please let me get some simple example for it.
I want to add following filter module, where ADSR envelope should be applied for filter parameters: cutoff, resonance, ...
And moreover, I need to apply LFO modulation to cutoff parameter value.
I have C++ codes for it and I hope to get how I can do those things.
If you don't have special algorithms for your filter, it should be sufficient to use the filters (and add missing algorithms) in HISE as they offer modulation of the cutoff frequency with all possible modulators on voice level. What filters do you need besides the all pass?
Evan C. last edited by Evan C.
Low pass, High pass, Band Pass, Notch, Allpass, Peak, Hybrid are just what I want.
And the most important thing is to know how I can connect AHDSR envelope or LFO modulation to filter/effect parameters.
It may cause some issues because of managing parameters between threads. So I need to be serious to do that.
Have a look at the polyphonic filter. Most of the filter types are there and can be automated with LFO. Mutlithreading is no problem here because modulators are rendered on the audio thread.
Yeah, I can find some filters in polyphonic filter. But there are few parameters that I can control. Is it possible to add parameters or change algorithms of such filters?
And you are saying modulators are rendered on the audio thread, so may I set parameter values in "processBlock" function of customized Script Fx?
What other parameters do you need? I wanted to improve the filters for a long time anyway so if you have some ideas, let me know.
You can call setParameter() from any thread, it tries to be as lock free as possible (using atomics for single values etc). But I am not sure why you want to set the parameter in the processBlock function, if you use the filters from HISE, you don't need to touch the script FX stuff.
This is an example patch with an envelope, velocity and LFO modulating the cutoff frequency of a state variable lowpass filter:
Thanks, I will have a look.