controlling 2 modules intensity toghether
-
hello !
seems that this:inline function onKnob1Control(component, value) { Delay.setAttribute(Delay.DelayTimeLeft, value); Delay.setAttribute(Delay.DelayTimeRight, value); }; Content.getComponent("Knob1").setControlCallback(onKnob1Control);
works to control, in this example, the delayTime (a component so ...)
but it's not working when trying to controll a module intensity. That's not working:
Delay.setAttribute(Delay.Intensity, value);
answer: "Interface:! Line ..., column ...: API call with undefined parameter 0 {...}"
what's wrong ?
thanks in advance.
-
Delay is not a modulator, hence it has no intensity. What do you want to achieve?
-
okay wrong example up ...
instead of delay, bla bla bla ... i put a script modulator (2 in fact) for the key follow code.
so i want to control the 2 script voic modulators intensity.
but when i put:
"modulator".setAttribute("modulator".Intensity, value);
i have the error above.
for example my key follow module (script voice):
SVFFollow.setAttribute(SVFFollow.Intensity, value);
not working...
-
Intensity is not a native parameter, but there is a direct function for modulators called
setIntensity()
(and currently in the making,getIntensity()
). -
but for controlling both 2 "Intensity" with the same slider i can't use the code above (1st thread) ?
-
Why not?
-
i replaced Intensity by setIntensity and always error ...
-
not sure all is right, but that works for me:
OnInit:const var SVFFollow = Synth.getModulator("SVFFollow"); const var MoogFollow = Synth.getModulator("MoogFollow"); const var KeyFollows = Content.getComponent("KeyFollows");
OnControl:
if (number == KeyFollows) { SVFFollow.setIntensity(value); MoogFollow.setIntensity(value); }
KeyFollows slider control both SVFFollow and MoogFollow ... ;)
-
hey @staiff,
the
setIntensity
is set as a method on the object and not as a ScriptParameter.that would be sth. like:
LFOModulator.setIntensity(value);
instead ofLFOModulator.setAttribute(..., ...)
Also FX won't work, as there is no Intensity there. The setIntensity() method mainly works with the Modulation Processors (VoiceStart, Envelopes, TimeVariant) on the Gain and Pitch Tabs.
ahh you found out yourself.. ;)
best,
d