bug: "ScriptedParameters"



  • I found a bug concerning "ScriptedParameters". The following remote-control code does not work well (the second knob).

    function onControl(number, value)
    {
    	
    	switch(number)
    	{
    		case Knob1:
    		{
    			ScriptFX.setAttribute(ScriptFX.ScriptedParameters.Knob1, value);
    			break;
    		}
    		case Knob2:
    		{
    			ScriptFX.setAttribute(ScriptFX.ScriptedParameters.Knob2, value);
    			break;
    		}
    	};
    }  
    

    while the following does work well.

    function onControl(number, value)
    {
    	
    	switch(number)
    	{
    		case Knob1:
    		{
    			ScriptFX.setAttribute(0, value);
    			break;
    		}
    		case Knob2:
    		{
    			ScriptFX.setAttribute(1, value);
    			break;
    		}
    	};
    }
    


  • That behaves I would expect. I'm not seeing ScriptedParameters in the API.



  • sorry, I can't figure out what you say. Do you mean the above example works well in your system?



  • I meant that there is no mention of a ScriptedParameters object in the API documentation so I would not expect your first example to work.


  • administrators

    I think I added the ScriptedParameters object before adding the properties directly so I don't use it anymore and it might be broken. What if you use ScriptFX.Knob2 directly?

    And are you sure the Knob2 is the second widget you are defining? What's your onInit callback?



  • The above example is one that was automatically generated using the widget command "connect module parameter". I set the Knob2 in Interface script & linked it to Script FX's Knob2.


  • administrators

    I have plans for changing this wizard and add another way of connecting modules simply by adding the module ID and parameter ID to the JSON:

    const var Knob = Content.addKnob("Knob", 62, 6);
    // [JSON Knob]
    Content.setPropertiesFromJSON("Knob", {
      "width": 129,
      "height": 47,
      "processor": "LFO Modulator 2",
      "parameter": "Frequency"
    });
    // [/JSON Knob]
    

    This is a far more stable and bug prone way to implement a simple parameter connection (the wizard has to do a lot of regex processing which can lead to a lot of edge cases).


Log in to reply

Looks like your connection to bug: "ScriptedParameters" was lost, please wait while we try to reconnect.