Script Validator
The NeuroScript editor validates source automatically after you pause typing and also provides an explicit Validate action.
Automatic validation
When editor source changes, validation runs automatically after a short pause. A newer edit replaces the pending result.
Validate now
Select Validate in the route editor or the full-screen NeuroScript editor to run validation immediately.
The UI can show:
- Validating… while compilation is running;
- Compile error when source cannot be compiled;
- Plan error when a route plan cannot be prepared;
- Script active when the current script is active on the route.
Save and Apply actions remain unavailable while validation is running or a blocking error is present.
What validation catches
The validator uses the same NeuroScript compiler used by the route engine. It can catch problems such as:
- invalid syntax;
- unknown fields or functions;
- invalid argument counts or types;
- undeclared state;
- code that exceeds compiler or output-capacity constraints.
For example, the MIDI velocity field is named velocity:
when is note_on and velocity > 100 {
emit current with velocity = 100
}What validation cannot prove
A successful compile does not prove that the script has the intended musical result. It cannot predict every interaction with live devices, route channel mappings, timing, or a changing clock source.
After validation:
- Apply the route.
- Test with controlled MIDI input.
- Watch source and destination activity.
- Test Note Off, sustain, disconnect, and Panic behaviour when the script changes note flow.
Troubleshooting
Validation reports an error after an edit
- Wait for the automatic validation cycle or select Validate.
- Start with the first reported error; later errors may be consequences of it.
- Compare field and function names with the NeuroScript reference.
Validation succeeds but Apply is unavailable
- Check for a route-plan error outside the script editor.
- Confirm that a destination and required route fields are selected.
- Wait for the current validation task to finish.
A valid script behaves incorrectly
- Reduce it to the smallest event condition.
- Use the simulator for isolated events.
- Verify actual channel, note, controller, and velocity values in the activity tools.
- Reintroduce state and delayed emits one piece at a time.
Privacy and execution
Validation is performed locally by the bundled NeuroScript engine. Source is not uploaded to a validation service.
