pub struct NodeProg {
    pub inp: Vec<ProcBuf>,
    pub cur_inp: Vec<ProcBuf>,
    pub out: Vec<ProcBuf>,
    pub params: Vec<f32>,
    pub atoms: Vec<SAtom>,
    pub prog: Vec<NodeOp>,
    pub modops: Vec<ModOp>,
    pub locked_buffers: bool,
    pub out_feedback: Input<Vec<f32>>,
    pub out_fb_cons: Option<Output<Vec<f32>>>,
    pub unique_id: usize,
}
Expand description

A node graph execution program. It comes with buffers for the inputs, outputs and node parameters (knob values).

Fields

inp: Vec<ProcBuf>

The input vector stores the smoothed values of the params. It is not used directly, but will be merged into the cur_inp field together with the assigned outputs.

cur_inp: Vec<ProcBuf>

The temporary input vector that is initialized from inp and is then merged with the associated outputs.

out: Vec<ProcBuf>

The output vector, holding all the node outputs.

params: Vec<f32>

The param vector, holding all parameter inputs of the nodes, such as knob settings.

atoms: Vec<SAtom>

The atom vector, holding all non automatable parameter inputs of the nodes, such as samples or integer settings.

prog: Vec<NodeOp>

The node operations that are executed in the order they appear in this vector.

modops: Vec<ModOp>

The modulators for the input parameters.

locked_buffers: bool

A marker, that checks if we can still swap buffers with with other NodeProg instances. This is usally set if the ProcBuf pointers have been copied into cur_inp. You can call unlock_buffers to clear locked_buffers:

out_feedback: Input<Vec<f32>>

Holds the input end of a triple buffer that is used to publish the most recent output values to the frontend.

out_fb_cons: Option<Output<Vec<f32>>>

Temporary hold for the producer for the out_feedback:

unique_id: usize

A unique ID assigned to the node prog. Mostly for debugging purposes. You should only read this field.

Implementations

This is called right after the crate::nodes::NodeExecutor received this NodeProg from the crate::nodes::NodeConfigurator. It initializes internal buffers with parameter data.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.