Filter Parameters Custom Callback
-
This might be a rudementary question, but even with about an hour googling I cannot find any examples or documentary to answer it
How do I set the Filter's parameters via script?
const var VCF1LowPass = Synth.getAllEffects("VCF1 LowPass"); // VCF1 LowPass Cutoff inline function onVCF1LowPassCutoffSliderControl(component, value) { VCF1LowPass.setAttribute('Frequency',value); }
this doesn't work as there is no setAttribute function, but neither is there a "frequency" one ...
-
@Morphoice said in Filter Parameters Custom Callback:
const var VCF1LowPass = Synth.getAllEffects("VCF1 LowPass");
getAllEffects
is used for getting multiple effects that contain the same text in their ID, and it returns an array. You need to usegetEffect
When you're setting an attribute you need to start with the module
.
followed by the attribute name, something like -VCF1LowPass.setAttribute(VCF1LowPass.Frequency, value);
-
@d-healey superb, that worked, thank you so much!
-
the resonance seems to throw a weird error though. what am I missing?
-
@Morphoice Are you sure that the Resonance attribute name is correct?
Is this scriptnode? -
@Morphoice When you see a message with
undefined parameter 0
it means the parameter you are passing to the function is undefined.0 means it's the first parameter, 1 would be the second parameter, 2 the third, etc.
So in your case
VCF1LowPass.Resonance
doesn't exist.To get a list of all the parameters for a particular module, follow the instructions in the post from earlier today - https://forum.hise.audio/topic/10742/module-browser-gone
-
@d-healey now I feel stupid. It's Q.