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
A running total or accumulator: Sum mode
The highest or lowest value seen over a run, or over a rolling window of recent frames: Max/Min mode
A smoothed value that reacts to noisy input without jittering: Average or EMA mode
How fast a value is changing per second: Rate mode
A count of threshold crossings, for beat or trigger detection: Count mode
A tracked value that decays back toward a baseline over time, or is clamped or wrapped into a fixed range
| Parameter | Type | Default | What it does |
|---|---|---|---|
input | Number or Number[] | — | Numeric value to track (Number or NumberArray) |
reset | Boolean or Number | — | Rising edge resets tracked value to initial_value |
gate | Boolean or Number | — | When false, tracking pauses and output holds at last known value |
mode | String | "Sum" | Sum: running total. Max/Min: highest/lowest seen. Average: arithmetic mean. EMA: exponential moving average. Rate: change per second. Count: threshold crossings. One of: Sum, Max, Min, Average, EMA, Rate, Count. |
initial_value | Number | 0 | Initial tracked value and the value restored on reset |
fade | Number | 0 | Decay rate per frame. Stored value is multiplied by (1 - fade) each frame before new input. 0 = no decay. |
window | Number | 0 | Rolling window size in frames. 0 = track over all time. |
smoothing | Number | 0.100 | Smoothing factor (alpha). Lower = smoother/slower. Higher = faster/noisier. Formula: state += alpha * (input - state). |
threshold | Number | 0.500 | Input must cross this value to increment the count |
count_edge | String | "Rising" | Rising: count when crossing above. Falling: below. Both: either direction. One of: Rising, Falling, Both. |
enable_bounds | Boolean | false | Clamp or wrap the output value to a range |
bounds_mode | String | "Clamp" | Clamp: restrict to [min, max]. Wrap: modulo wrap around the range. One of: Clamp, Wrap. |
bound_min | Number | 0 | Lower bound |
bound_max | Number | 1 | Upper bound |
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
Add a Value Tracker and wire a changing number into Input.
Set Mode to Average and raise Window to smooth out short-term noise over the last N frames.
Wire a Boolean into Reset so an external trigger can snap the running average back to Initial Value.
Turn on Bounds and set Bound Min/Bound Max if the output must stay inside a fixed range.