Skip to content

Script Engine Overview

Neurode MIDI uses Neuroscript v3 (Rust) as the canonical way to express routing and transforms.

Quick Validation

Try the Neuroscript Simulator for quick, single-event tests without creating a full route.

What is the Script Engine?

The Script Engine lets you write custom MIDI transforms using Neuroscript. Each MIDI event enters your script, you optionally filter or modify it, and the runtime emits the resulting events deterministically.

How It Works

Neuroscript compiles to an immutable execution plan. Each event flows through the statements in your script with bounded execution time. If compilation fails, the route falls back to pass-through and the UI surfaces the error.

Quick Start

neuroscript
# Keep notes on channel 1, tame velocity peaks
keep note where ch == 1
when vel > 110: event(vel = 110)

State & Memory

Neuroscript exposes deterministic registers and counters:

  • r(scope, key) — read/write register values via routing sinks
  • counter(key) — incrementable counters via routing sinks

Example:

neuroscript
counter("notes") + 1 -> counter("notes")
when counter("notes") > 4: drop

Next Steps


Performance

The engine tracks per-event execution time. Keep scripts focused and avoid unnecessary work for best realtime performance.

Built with ❤️ for musicians