Node
The Node
object is how you can access ScriptNode nodes
with scripting. The ScriptNode Editor
is normally taking care of a lot of these functions, but if you want to manipulate a DSPNetwork
via script, this gives you access to each single nodes properties and methods.
const var sn = Engine.createDspNetwork("ScriptNode");
const var node = sn.create("core.oscillator", "osc");
Console.print(node.getNumParameters());
Class methods
connectTo
Connects this node to the given parameter target. sourceInfo is either the parameter name (String) or output slot (integer).
Node.connectTo(var parameterTarget, var sourceInfo)
connectToBypass
Connects the bypass button of this node to the given source info ("NodeId.ParameterId").
Node.connectToBypass(var sourceInfo)
get
Returns a property of the node.
Node.get(var id)
getChildNodes
Returns a list of child nodes if this node is a container.
Node.getChildNodes(bool recursive)
getIndexInParent
Returns the index in the parent.
Node.getIndexInParent()
getNodeHolder
Not necessarily the DSP network.
Node.getNodeHolder()
getNumParameters
Returns the number of parameters.
Node.getNumParameters()
getParameter
Returns a reference to a parameter.
Node.getParameter(var indexOrId)
isActive
Checks if the node is inserted into the signal path.
Node.isActive(bool checkRecursively)
isBypassed
Checks if the node is bypassed.
Node.isBypassed()
reset
Reset the node's internal state (eg. at voice start).
Node.reset()=0
set
Sets the property of the node.
Node.set(var id, var value)
setBypassed
Bypasses the node.
Node.setBypassed(bool shouldBeBypassed)
setComplexDataIndex
Sets the complex data type at the dataSlot to the given index and data (if embedded).
Node.setComplexDataIndex(String dataType, int dataSlot, int indexValue)
setParent
Inserts the node into the given parent container.
Node.setParent(var parentNode, int indexInParent)