Data Lab node

Integral

Trapezoid integral of every channel from the window’s start, in the unit times seconds (u·s, µV·s). Leak (per second) turns it into a leaky integrator that forgets the past; Remove Mean subtracts the window mean first so a DC offset does not run away. Displacement from a velocity, energy from a power.

Inputs

PortTypeDefault
SignalThe Data Lab signal to analyse — a Signal node's output, a Window, or any float array with its sample rate. Multi-channel signals are handled per channel.structure—
LeakForgetting rate per second: 0 keeps everything since the window start, 1 forgets over about a second.float0
Remove MeanSubtract the window mean first so a DC offset does not integrate into a runaway ramp.boolfalse
Update RateHow many times per second the analysis is recomputed (default 10); 0 = every frame. Lower rates save CPU on long windows — a moved parameter always recomputes at once.float0

Outputs

PortType
SignalThe Data Lab signal to analyse — a Signal node's output, a Window, or any float array with its sample rate. Multi-channel signals are handled per channel.structure
Latestfloat

How It Works

Integral accumulates every channel with the trapezoid rule from the window's start, in the unit times seconds — u·s, µV·s.

Two controls keep it usable on real data. Leak (per second) turns it into a leaky integrator that gradually forgets the past, which stops a small bias from running away forever. Remove Mean subtracts the window mean first, for the same reason from the other direction.

Use Cases

  • Displacement from velocity — Integrate a speed signal to see how far something travelled.
  • Energy from power — The integral of a squared signal over time.
  • Smooth accumulation as a control — A leaky integral of an audio envelope is a beautifully behaved "how loud has it been lately".
  • Dose and exposure — Anything where the total over time matters more than the instantaneous value.
  • Undo a derivative — Recover the shape of a signal from its rate of change.

Tips

  • Always consider Remove Mean first. An un-centred signal integrates into a ramp that hides everything else.
  • Leak is in units per second: a leak of 1 forgets most of a second ago, a leak of 0.1 has a long memory.
  • The integral is taken from the window's start, so a long Time Window means a long accumulation.
  • Watch the unit on Plot's axis — u·s is a genuinely different quantity, and the label will say so.

Open Integral in the interactive catalog →

Integral is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Data Lab nodes