Skip to content
Voro
  1. Audio
  2. Control

Math

Math combines up to four control signals into one. For common cases the Operation menu covers it: add, multiply, min, max, mix, absolute value, differentiate, integrate, sample-hold, quantize, wrap, and fold. For everything else there is Expression, a small compiled RPN language with arithmetic, comparison, selection, integration, differentiation, delay, sample-hold, and slew. Programs run within fixed instruction and state budgets, and an invalid edit keeps the last good program running instead of breaking the signal.

Wire control signals into a through d and take the result from out. Pick an Operation for simple combinations, or type an Expression to replace it. Unwired inputs read as zero, except b, which reads the Constant parameter, so a b * with only a wired scales a signal by a knob.

  • Input 0-3: a, b, c, d — the control signals to combine. All optional.
  • Output 0: out — the computed result.
  • Operation — add, multiply, min, max, mix (blend a to b by c), abs, differentiate, integrate, sample_hold (hold a on c’s rising edge), quantize, wrap, or fold.
  • Constant — the k value in expressions, the fallback for the unwired b input, and the step size for quantize.
  • Min and Max — the range used by quantize, wrap, and fold.
  • Slew — output smoothing time in seconds, applied after the computation.
  • Expression — RPN program. When non-empty and valid, it replaces the Operation menu. Tokens: a b c d k time phase, numeric literals, + - * / min max abs sign clamp wrap fold mix < > select integrate differentiate delay sample_hold slew.
  • RPN reads left to right with a stack: a b + 0.5 * averages two inputs; a 0.5 > b c select switches between b and c on a threshold of a.
  • An expression that fails to compile is simply not installed; the previous program keeps running, so live edits cannot glitch a performance.
  • time and phase tokens give expressions a clock without wiring one in.

Inputs

  • a row
    control_f32_v1
  • b row
    control_f32_v1
  • c row
    control_f32_v1
  • d row
    control_f32_v1

Outputs

  • out row
    control_f32_v1
Operation (Operation) Menu op('math').par.Operation
Default:
0
Options:
add, multiply, min, max, mix, abs, differentiate, integrate, sample_hold, quantize, wrap, fold
Constant (Constant) Float op('math').par.Constant
Default:
0.5
Range:
-100000 to 100000
Min (Min) Float op('math').par.Min
Default:
0
Range:
-100000 to 100000
Max (Max) Float op('math').par.Max
Default:
1
Range:
-100000 to 100000
Slew (Slew) Float op('math').par.Slew
Default:
0
Range:
0 to 60
Expression (Expression) Str op('math').par.Expression
Default:
"" (Empty String)