Data Lab node
Derivative
Central-difference derivative of every channel (first or second order) in the Signal’s unit per second — µV becomes µV/s, u becomes u/s. Smooth Taps runs a moving average first, because differentiation amplifies noise. Velocity from a position, acceleration from a velocity.
Inputs
| Port | Type | Default |
|---|---|---|
| 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 | — |
| OrderFirst = rate of change (unit/s), second = rate of that (unit/s²). | int | 1 |
| Smooth TapsA moving average before differentiating; differentiation amplifies noise, so 5–15 taps often help. 1 = none. | int | 1 |
| Update RateHow many times per second the analysis is recomputed (default 0, every frame); 0 = every frame. Lower rates save CPU on long windows — a moved parameter always recomputes at once. | float | 0 |
Outputs
| Port | Type |
|---|---|
| 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 |
| Latest | float |
How It Works
Derivative takes the central-difference derivative of every channel, first or second order, and reports it in the Signal's unit per second: µV becomes µV/s, Grafit units become u/s, and second order gives u/s².
Differentiation amplifies noise — that is arithmetic, not a defect — so Smooth Taps runs a moving average first. Raising it is almost always the right answer to a derivative that looks like hash.
The unit bookkeeping is automatic, so a derivative's Plot axis reads correctly without any configuration.
Use Cases
- Velocity from position — A tracked hand's position window becomes its speed.
- Acceleration — Order 2, or a second Derivative in series.
- Rate of change as a control — How fast a value is moving is often a better performance control than the value itself.
- Edge detection in time — A big derivative is a sudden change; feed it to Events with a threshold.
- Onset from an envelope — The derivative of an envelope peaks at attacks.
Tips
- Start with Smooth Taps around 5–9 on frame-rate data; raise until the derivative reads as motion rather than noise.
- Second order is much noisier than first. Smooth more, or take two first-order derivatives with smoothing between them.
- The unit per second is honest only if the Signal's rate is honest — check Actual Rate on the window.
- To integrate back, use Integral; the pair round-trips up to the constant that differentiation discards.
Open Derivative in the interactive catalog →
Derivative 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.