Class Nodes
- Namespace
- Ofs
- Assembly
- Ofs.Api.dll
Registration of custom processing nodes. A node declares a NodeShape (N named input pins, M named output pins) and one eval delegate; the signal kind (functional vs discrete) is chosen by the delegate shape.
public sealed class Nodes
- Inheritance
-
objectNodes
Remarks
Node callbacks may run on worker threads: they receive only their inputs and parameters and must not touch Host, the player, or axes.
Methods
AddNode(string, string, NodeShape, EvalDiscrete, string?, NodeIcon, string?)
Registers a stateless discrete node: its eval reads the input action
lists and writes the output action lists, once per region.
public void AddNode(string id, string name, NodeShape shape, EvalDiscrete eval, string? group = null, NodeIcon icon = NodeIcon.Default, string? description = null)
Parameters
idstringStable id, unique within the plugin; combined with the plugin name as "<plugin>.<id>".
namestringDisplay name shown in the add-node menu, rendered verbatim.
shapeNodeShapeThe node's input/output pin names and counts.
evalEvalDiscreteWorker-thread compute. A stateless node has no
TState.groupstringOptional add-node menu group header; defaults to the plugin name.
iconNodeIconOptional palette/title-bar glyph; defaults to the node's arity icon.
descriptionstringOptional add-node menu hover tooltip describing the node; omit for none.
AddNode(string, string, NodeShape, EvalFunctional, string?, NodeIcon, string?)
Registers a stateless functional node — one with no parameters or persisted state and no
body UI. Its eval reads the input values at each sampled time and writes the
output values, 0..100.
public void AddNode(string id, string name, NodeShape shape, EvalFunctional eval, string? group = null, NodeIcon icon = NodeIcon.Default, string? description = null)
Parameters
idstringStable id, unique within the plugin; combined with the plugin name as "<plugin>.<id>".
namestringDisplay name shown in the add-node menu, rendered verbatim.
shapeNodeShapeThe node's input/output pin names and counts.
evalEvalFunctionalWorker-thread compute. A stateless node has no
TState.groupstringOptional add-node menu group header; defaults to the plugin name.
iconNodeIconOptional palette/title-bar glyph; defaults to the node's arity icon.
descriptionstringOptional add-node menu hover tooltip describing the node; omit for none.
AddNode(string, string, NodeShape, PrepareFunctional, string?, NodeIcon, string?)
Registers a stateless functional node whose prepare factory runs once
per region eval and returns the per-sample closure — build a LUT or other artifact there rather
than rebuilding it every sample.
public void AddNode(string id, string name, NodeShape shape, PrepareFunctional prepare, string? group = null, NodeIcon icon = NodeIcon.Default, string? description = null)
Parameters
idstringStable id, unique within the plugin; combined with the plugin name as "<plugin>.<id>".
namestringDisplay name shown in the add-node menu, rendered verbatim.
shapeNodeShapeThe node's input/output pin names and counts.
preparePrepareFunctionalgroupstringOptional add-node menu group header; defaults to the plugin name.
iconNodeIconOptional palette/title-bar glyph; defaults to the node's arity icon.
descriptionstringOptional add-node menu hover tooltip describing the node; omit for none.
AddNode<TState>(string, string, NodeShape, EvalDiscrete<TState>, NodeUi<TState>?, string?, NodeIcon, string?)
Registers a discrete node: its eval reads the input action lists and
writes the output action lists, once per region.
public void AddNode<TState>(string id, string name, NodeShape shape, EvalDiscrete<TState> eval, NodeUi<TState>? ui = null, string? group = null, NodeIcon icon = NodeIcon.Default, string? description = null) where TState : struct
Parameters
idstringStable id, unique within the plugin; combined with the plugin name as "<plugin>.<id>".
namestringDisplay name shown in the add-node menu, rendered verbatim.
shapeNodeShapeThe node's input/output pin names and counts.
evalEvalDiscrete<TState>Worker-thread compute. Reads a private copy of the state by
in.uiNodeUi<TState>Optional body UI drawn on the main thread; omit for a headless node.
groupstringOptional add-node menu group header; defaults to the plugin name. Pass the same string from several nodes (or plugins) to collect them under one heading.
iconNodeIconOptional palette/title-bar glyph; defaults to the node's arity icon.
descriptionstringOptional add-node menu hover tooltip describing the node; omit for none.
Type Parameters
TStateA struct whose fields are the node's state and parameters.
AddNode<TState>(string, string, NodeShape, EvalFunctional<TState>, NodeUi<TState>?, string?, NodeIcon, string?)
Registers a functional node: its eval reads the input values at each
sampled time and writes the output values, 0..100.
public void AddNode<TState>(string id, string name, NodeShape shape, EvalFunctional<TState> eval, NodeUi<TState>? ui = null, string? group = null, NodeIcon icon = NodeIcon.Default, string? description = null) where TState : struct
Parameters
idstringStable id, unique within the plugin; combined with the plugin name as "<plugin>.<id>".
namestringDisplay name shown in the add-node menu, rendered verbatim.
shapeNodeShapeThe node's input/output pin names and counts.
evalEvalFunctional<TState>Worker-thread compute. Reads a private copy of the state by
in.uiNodeUi<TState>Optional body UI drawn on the main thread; omit for a headless node.
groupstringOptional add-node menu group header; defaults to the plugin name. Pass the same string from several nodes (or plugins) to collect them under one heading.
iconNodeIconOptional palette/title-bar glyph; defaults to the node's arity icon.
descriptionstringOptional add-node menu hover tooltip describing the node; omit for none.
Type Parameters
TStateA struct whose fields are the node's state and parameters.
AddNode<TState>(string, string, NodeShape, PrepareFunctional<TState>, NodeUi<TState>?, string?, NodeIcon, string?)
Registers a functional node whose prepare factory runs once per region
eval and returns the per-sample closure — build a LUT or other artifact there rather than
rebuilding it every sample.
public void AddNode<TState>(string id, string name, NodeShape shape, PrepareFunctional<TState> prepare, NodeUi<TState>? ui = null, string? group = null, NodeIcon icon = NodeIcon.Default, string? description = null) where TState : struct
Parameters
idstringStable id, unique within the plugin; combined with the plugin name as "<plugin>.<id>".
namestringDisplay name shown in the add-node menu, rendered verbatim.
shapeNodeShapeThe node's input/output pin names and counts.
preparePrepareFunctional<TState>uiNodeUi<TState>Optional body UI drawn on the main thread; omit for a headless node.
groupstringOptional add-node menu group header; defaults to the plugin name. Pass the same string from several nodes (or plugins) to collect them under one heading.
iconNodeIconOptional palette/title-bar glyph; defaults to the node's arity icon.
descriptionstringOptional add-node menu hover tooltip describing the node; omit for none.
Type Parameters
TStateA struct whose fields are the node's state and parameters.