What is it for?
- Adding two values to offset a position or strength
- Multiplying by a factor to control intensity
- Preparing a value for a threshold calculation or
Compare - Combining parameters into a new value
Overview
The graph's calculator node, supporting arithmetic, min/max, modulo, and power for two numbers. It is the basic building block for numeric wiring that combines parameters into new values.
Usage tips
- Processing waveform outputs is a common use: choose
Multiplyto change amplitude orAddto shift the center. For simple cases, a singleremapmay be easier to read. Modulomakes values periodic by folding positive or negative inputs into a repeating range from0(inclusive) to|B|(exclusive).Min/Maxguarantee upper or lower bounds. For example,Max(value, 0.1)guarantees a minimum value.- For three or more terms or a complex expression, consolidating the calculation in
expression_floatusually makes the graph easier to read.
Related nodes
math_funcâ one-input functions such as absolute value, rounding, and trigonometryexpression_floatâ evaluate a complex expression in one noderemap/clampâ dedicated range conversion and limiting nodesfloat_input/int_inputâ supply constants
Operations
Add- Addition:
A + B - Example: inputs
2and3produce5.
- Addition:
Subtract- Subtraction:
A - B - Example: inputs
5and2produce3.
- Subtraction:
Multiply- Multiplication:
A * B - Example: inputs
4and3produce12.
- Multiplication:
Divide- Division:
A / B - Example: inputs
7and2produce3.5.
- Division:
Min- Returns the smaller input.
Max- Returns the larger input.
Modulo- Returns the Euclidean remainder in the range
0 <= result < |B|. - Example: inputs
-7and3produce2.
- Returns the Euclidean remainder in the range
Power- Exponentiation. Returns
Ato the power ofB. - Example: inputs
2and3produce8.
- Exponentiation. Returns
Notes
DivideandModuloproduce an error whenB = 0.Add/Subtract/Multiply/Min/Max/Modulopreserve anIntruntime value when both inputs areInt.DivideandPowermay produce fractional results even when the inputs are integers.- You cannot connect
BoolorImage; this node accepts numbers only.
Examples
AddFloat Input(0.25)andFloat Input(0.5)- The result is
0.75. - Use this to combine offsets or correction values.
- The result is
- Multiply the output of
Noiseby0.5withMath Op(Multiply)- Halves the movement range or strength.
- Use
Math Op(Subtract)to calculatecurrent value - threshold, then pass it toCompare- This works as preprocessing for a condition.
- Use
Math Op(Max)to set aguaranteed minimum value- Useful for preventing values from becoming too small.