(Scriptnode) Link parameter to Xfade Mode
-
I would like to change the xfade mode from the user interface. So it would be great to link a parameter to the xfade mode.
-
@bendurso you mean like this?
simply add a control to your UI, create a reference to your scriptNode, and call this in the widget CB:
yourScriptNodeName.setAttribute(yourScriptNodeName.Mix, value)'
-
@bendurso The node mode can't seem to be changed. What about using multiple xfade nodes?
-
You can do that by grabbing a script reference to the node in question and then setting the property (here it's called
"Mode"
), but you're entering experimental territory here as it's not used very often and compiling a node and doing this with the hardcoded version is completely out of the question.const var n = Engine.getDspNetworkReference("Script FX1", "script_fx1"); const var f = n.get("xfader1"); var useSwitch = true; f.set("Mode", useSwitch ? "Switch" : "Linear");
-
@Christoph-Hart Nice. It could be nice have something like this:
Edit: Actually, well the icon is just for illustration purposes hehe. It would be great to drag a parameter to the xfade combobox to compile a hardcoded fx.
-
@bendurso @Christoph-Hart Or just remove the dropdown and make it a parameter like in some other nodes