-
-
Notifications
You must be signed in to change notification settings - Fork 1
Node Reference Logic
Logic nodes sit between sources and visuals: they have bindable inputs and one output. Chains evaluate in dependency order each stats refresh (STATS_HZ), before draw.
Output kinds: usually number or percent; String Format / String Join → text.
Wire any numeric source kind (percent, celsius, number) into float inputs unless noted.
| Output | number |
| input_a, input_b | bindable floats |
| operation | add, subtract, multiply, divide, average, min, max |
What it does: Combines two values each frame.
Examples:
- Average CPU + GPU temp before one gauge: A=CPU temp, B=GPU temp, average.
- VRAM fraction: used ÷ total (guard: divide yields 0 if B is 0).
-
min(cpu, 100)style caps via min with a constant B.
| Output | number |
| value, in_min, in_max | bindable |
| out_min, out_max | floats |
| clamp | bool (default on) |
Maps linearly from the input range to the output range.
Examples:
- CPU temp 30–95 °C → 0–100 for an Arc Gauge.
- Net down 0–1000 KiB/s → 0–1 for a Lerp colour blend.
- Invert a range without Invert Percent: in 0–100, out 100–0.
| Output | number |
| value | bindable |
| multiply, add | out = value × multiply + add |
Examples: °F → °C approx: multiply 0.555, add -17.777 (or use a convert plugin). RPM / 1000 → “kRPM” number for text.
| Output | number |
| value | bindable |
| min_value, max_value | floats |
Example: Force a sensor into 0–100 before a gauge that assumes percent.
| Output | number |
| a, b, t | bindable — a + (b − a) × t
|
Example: Map Range output as t, A=track opacity 0.2, B=1.0 → smooth opacity for a Glow or Rectangle.
| Output | number |
| decimals (Round) | 0–6 |
Example: Round temp to 0 decimals before String Format; Abs on Rate of Change for “magnitude of change” bars.
| Output | percent |
| value | bindable — ≈ 100 − value clamped |
Example: Disk used % → free % bar; battery “empty” stylisation.
| Output | number |
| value | bindable |
| alpha | 0.01–1 (small = heavier smoothing) |
| init_from_input | seed from first sample |
What it does: Exponential moving average in STATE across frames.
Example: Noisy GPU util → Smooth (α≈0.15) → Needle Gauge so the needle doesn’t jitter.
| Output | number |
| value | bindable |
| samples | look-back window (refresh ticks) |
Example: CPU % rate → positive = rising load; drive a small LED or text “rising/falling”.
| Output | number |
| centre, radius | collapse values near centre |
Example: Fan RPM deadzone around 0 so idle “0–50 RPM noise” reads as 0.
| Output |
number (0 or 1) |
| value | bindable |
| comparison |
>, >=, <, <=, ==
|
| threshold | float |
Example: CPU ≥ 90 → 1 → LED Dot/Glow trigger. Chain into AND/OR for compound alarms.
| Output | number |
| input, comparison, threshold | condition |
| then_value / else_value | outputs |
Example: GPU temp > 80 → then 1 else 0 for icon swap; or then 100 else input to hard-cap a display value.
| Output |
number (on/off values) |
| high / low | turn on/turn off thresholds |
| on_value / off_value | defaults 1/0 |
What it does: Turns on when value crosses high, stays on until value falls below low.
Example: Fan warn LED: high 75 °C, low 65 °C — no flicker around a single cut-off.
| Output |
number (0/1) |
| input_a, input_b | truthy if non-zero |
Example: (CPU ≥ 90) OR (GPU ≥ 90) → Glow trigger for “any hot device”.
| Output | number |
| selector | ≥ 0.5 → B, else A |
| input_a, input_b | bindable |
Example: Selector = Threshold(battery < 20); A = normal colour index, B = warn index — or pick between two scaled metrics.
| Output | number |
| input | text/category (case-insensitive) |
| keys / values | parallel comma lists |
| default_value | if no match |
Example: Weather category clear,cloud,rain,snow → 0,1,2,3 for Image path selection or opacity levels. Playback status playing,paused,stopped → 1,0.4,0.
| Output | text |
| input | any |
| template | must contain {value}
|
| decimals | for numeric inputs |
Example: Template CPU {value}% → Text Label. Template {value} °C for temps.
| Output | text |
| input_a, input_b | bindable |
| separator | e.g. —
|
| skip_empty | avoid stray separators |
Example: Artist + Title → one Now Playing line. Hostname + Kernel with separator ·.
| Need | Prefer |
|---|---|
| Quiet gauge | Smooth |
| °C → 0–100 ring | Map Range |
| Warn without flicker | Hysteresis or Threshold + LED |
| Compound alarm | Thresholds → OR |
| Label with units | String Format |
| Artist — Title | String Join |
| Category → icon index | Enum Map |
| Free disk from used % | Invert Percent |
Built-in vs plugin: plugins may add richer Threshold modes, Temp Convert, multi-stage chains; use built-ins first; they always ship with Studio.