Value Tracker

Track a numeric value over time as a running sum, min, max, average, EMA, rate, or count.

What it does

Value Tracker watches a number over time and carries state forward from frame to frame: a running total, the highest or lowest value seen, a smoothed average, a rate of change, or a count of threshold crossings. Mode sets which. No hand-built feedback loop is needed.

It also reports whether the tracked value changed this frame and how many samples have been processed since the last reset.

When to use it

ParameterTypeDefault
inputOneOf([Number, NumberArray])
resetOneOf([Boolean, Number])
gateOneOf([Boolean, Number])
modeString"Sum"
initial_valueNumber0
fadeNumber0
windowNumber0
smoothingNumber0.100
thresholdNumber0.500
count_edgeString"Rising"
enable_boundsBooleanfalse
bounds_modeString"Clamp"
bound_minNumber0
bound_maxNumber1

Gotchas

Fade multiplies the stored value by (1 - fade) every frame before the new input is folded in. It decays toward zero, not toward Initial Value. Leave it at 0 for no decay.

Window applies to Average, Max and Min mode only. Left at 0 it tracks over all time since the last reset; raise it to track only the most recent N frames.

Gate pauses tracking and holds the output at its last value. It resets nothing. Use Reset, on a rising edge, to snap the tracked value back to Initial Value.

Count mode needs Threshold and Count Edge, which stay hidden unless Mode is Count. Rising counts upward crossings, Falling counts downward crossings, and Both counts either direction.

Worked example

  1. Add a Value Tracker and wire a changing number into Input.

  2. Set Mode to Average and raise Window to smooth out short-term noise over the last N frames.

  3. Wire a Boolean into Reset so an external trigger can snap the running average back to Initial Value.

  4. Turn on Bounds and set Bound Min/Bound Max if the output must stay inside a fixed range.

See also

Hold · Analyze · Math · Numbers, signals & audio