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.


  • administrators

    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...


  • administrators

    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) ?


  • administrators

    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 of LFOModulator.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


Log in to reply
 

1
Online

282
Users

767
Topics

5.0k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.