Skip to content

Reference library > Operators

Operators

  • Add: Add each sample of a to each sample of b. Can also be written as a + b
  • AmplitudeToDecibels: Map a linear amplitude value to decibels.
  • DecibelsToAmplitude: DecibelsToAmplitude
  • Bus: Bus is a node with a fixed number of input channels and arbitrary number of inputs, used to aggregate multiple sources. It is similar to Sum, but with a defined channel count that does not adapt to its inputs.
  • ChannelArray: Takes an array of inputs and spreads them across multiple channels of output.
  • ChannelCrossfade: Given a multichannel input, crossfades between channels based on the given position within the virtual array, producing a single-channel output.
  • ChannelMixer: Downmix a multichannel input to a lower-channel output. If num_channels is greater than one, spreads the input channels across the field. If amplitude_compensation is enabled, scale down the amplitude based on the ratio of input to output channels.
  • ChannelOffset: Offsets the input by a specified number of channels. With an N-channel input and an offset of M, the output will have M+N channels.
  • ChannelSelect: Select a subset of channels from a multichannel input, starting at offset, up to a maximum of maximum, with the given step.
  • Equal: Compares the output of a to the output of b. Outputs 1 when equal, 0 otherwise. Can also be written as a == b
  • NotEqual: Compares the output of a to the output of b. Outputs 0 when equal, 1 otherwise. Can also be written as a != b
  • GreaterThan: Compares the output of a to the output of b. Outputs 1 when a > b, 0 otherwise. Can also be written as a > b
  • GreaterThanOrEqual: Compares the output of a to the output of b. Outputs 1 when a >= b, 0 otherwise. Can also be written as a >= b
  • LessThan: Compares the output of a to the output of b. Outputs 1 when a < b, 0 otherwise. Can also be written as a < b
  • LessThanOrEqual: Compares the output of a to the output of b. Outputs 1 when a <= b, 0 otherwise. Can also be written as a <= b
  • Modulo: Outputs the value of a modulo b, per sample. Supports fractional values. Can also be written as a % b
  • Abs: Outputs the absolute value of a, per sample. Can also be written as abs(a)
  • If: Outputs value_if_true for each non-zero value of a, value_if_false for all other values.
  • Divide: Divide each sample of a by each sample of b. Can also be written as a / b
  • FrequencyToMidiNote: Map a frequency to a MIDI note (where 440Hz = A4 = 69), with floating-point output.
  • MidiNoteToFrequency: Map a MIDI note to a frequency (where 440Hz = A4 = 69), supporting floating-point input.
  • Multiply: Multiply each sample of a by each sample of b. Can also be written as a * b
  • Pow: Outputs a to the power of b, per sample. Can also be written as a ** b
  • RoundToScale: Given a frequency input, generates a frequency output that is rounded to the nearest MIDI note. (TODO: Not very well named)
  • Round: Round the input to the nearest integer value.
  • ScaleLinExp: Scales the input from a linear range (between a and b) to an exponential range (between c and d).
  • ScaleLinLin: Scales the input from a linear range (between a and b) to a linear range (between c and d).
  • SelectInput: Pass through the output of one or more inputs, based on the integer input index specified in index. Unlike ChannelSelect, inputs may be multichannel, and index can be modulated in real time.
  • Subtract: Subtract each sample of b from each sample of a. Can also be written as a - b
  • Sum: Sums the output of all of the input nodes, by sample.
  • TimeShift: TimeShift
  • Sin: Outputs sin(a), per sample.
  • Cos: Outputs cos(a), per sample.
  • Tan: Outputs tan(a), per sample.
  • Tanh: Outputs tanh(a), per sample. Can be used as a soft clipper.

Last update: 2024-09-11
Created: 2023-11-09