Neuroscript Simulator
Try out Neuroscript and other scripting languages in this interactive simulator. Write code, test with sample MIDI events, and see the results instantly—all right here in your browser.
Powered by the Neuroscript WASM engine with live syntax highlighting, autocomplete hints, and MIDI device preview.
Script editor
Neuroscript DSL with inline highlighting and autocomplete. Press ⌘/Ctrl + Space to show suggestions.
Pick which events flow through.
Shape notes, velocity, CC, and channels.
Conditionally change behavior.
Single-event runner
Send a test event through the WASM engine to see transformed output instantly.
Run the script to see output...
Web MIDI bridge
Connect a hardware device to audition scripts with real-time MIDI input. Output can be mirrored to a selected destination.
Web MIDI runs locally in your browser and never leaves this page.
What's new in the sandbox
- Real Neuroscript WASM engine — the editor compiles and runs your DSL code in-browser, matching the runtime used in the app.
- Syntax highlighting + autocomplete — inline hints for
keep,drop,vel, channel maps, and conditional expressions. - Web MIDI bridge — connect hardware to audition transforms and optionally mirror output to another device.
- Transport-aware events — adjust BPM/beat when you want to preview time-aware behaviours.
When building the docs locally, run
npm run prebuild(ormake docs-wasm) insidedocs/webto copy theneuroscript-wasmpackage intopublic/so the simulator can fetch the WASM bundle.
How to Use
- Write Your Script: Enter Lua or Neuroscript code in the editor
- Configure Test Event: Set the MIDI event type, channel, note/CC number, and velocity
- Run: Click "Run" to execute your script against the test event
- Inspect Output: See the transformed MIDI event and execution time
Example Scripts
Velocity Boost
if event.type == 'noteOn' then
event.data2 = MIDI.clamp(event.data2 + 20)
end
return eventOctave Transpose
if event.type == 'noteOn' or event.type == 'noteOff' then
event.data1 = MIDI.clamp(event.data1 + 12)
end
return eventHarmonizer
if event.type == 'noteOn' then
return {
event,
MIDI.noteOn(event.channel, MIDI.clamp(event.data1 + 4), event.data2),
MIDI.noteOn(event.channel, MIDI.clamp(event.data1 + 7), event.data2)
}
end
return eventMIDI Helper API
The MIDI object is available in all scripts:
MIDI.clamp(value)- Clamps value to 0-127 rangeMIDI.noteName(note)- Converts MIDI note number to name (e.g., 60 → "C4")MIDI.noteNumber(name)- Converts note name to MIDI number (e.g., "C4" → 60)MIDI.NOTE_ON,MIDI.NOTE_OFF,MIDI.CC- Common MIDI constants
Alternative Testing
You can also test scripts directly in Neurode MIDI:
- Virtual Keyboard Tool: Use the built-in virtual keyboard to send test MIDI events
- MIDI Monitor: Watch incoming and outgoing MIDI streams in real-time
- Log Output: Enable detailed logging to see script execution results
Next Steps
- Script Engine Overview — Learn scripting basics
- Neuroscript Engine (JavaScript) — Embed a browser playground
Test scripts directly in routes:
- Create a route
- Add a Script transform
- Write and test your script
- Use Virtual Keyboard to send test events
Use MIDI Monitor:
- See script output in real-time
- Verify transformations work correctly
Check examples:
- Event Model — Understanding events
Feature checklist
- Live code editor — Write Neuroscript in-browser with highlighting and autocomplete
- Test event input — Send custom MIDI events and tweak BPM/beat
- Output visualization — View transformed events inline
- Performance metrics — Per-run execution timing
- Example library — Load, tweak, and remix common recipes
Use the Web MIDI panel to route a real controller into the Neuroscript engine and mirror the transformed stream to any connected output.
Alternative: Desktop Testing
Use the desktop app for script testing:
- Create test route with Virtual Keyboard
- Add your script transform
- Open MIDI Monitor to see output
- Play notes on Virtual Keyboard
- Iterate on script
Next Steps
- Script Engine Overview — Learn scripting basics
