Norns REPL
This is a very simple extension that allows you to interact with Norns in a VSCode terminal, much like you would from the Maiden web interface.
The extension connects to Matron on Norns using a websocket. Lua code entered in the terminal is sent to Matron when you press return, and the results are printed in the terminal. There is basic support for command history using the up/down arrows.
Please file any bugs you find as a GitHub Issue!
Commands
nornsREPL.matron.connect
- Connect to the Matron REPL at the configured Norns host and port
- Command Palette: “Norns REPL: Connect to Matron…”
nornsREPL.matron.send
- Send a command to the Matron REPL at the configured Norns host and port
- Command Palette: “Norns REPL: Send Command to Matron…”
nornsREPL.crone.connect
- Connect to the Crone REPL at the configured Norns host and port
- Command Palette: “Norns REPL: Connect to Crone…”
nornsREPL.crone.send
- Send a command to the Crone REPL at the configured Norns host and port
- Command Palette: “Norns REPL: Send Command to Crone…”
nornsREPL.script.reload
- Reload the current script using
norns.script.load(norns.state.script)
- Command Palette: “Norns REPL: Reload Script”
nornsREPL.sleep
- Put Norns to sleep using
norns.shutdown()
- Command Palette: “Norns REPL: Sleep”
Configuration
nornsREPL.host
- Norns hostname to connect to
- Default:
norns.local
nornsREPL.matron.port
- Matron websocket port to connect to
- Default:
5555
nornsREPL.crone.port
- Crone websocket port to connect to
- Default:
5556
nornsREPL.maxHistory
- Maximum number of previous commands to store in history
- Default: 100
New in Latest Version (1.4.0)
Dedicated commands for reloading the current script and shutting down Norns, as well as commands for sending arbitrary one-off messages to Matron/Crone. These can be used to set up custom tasks that communicate with Norns like so:
// tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Play Note",
"command": "${command:nornsREPL.matron.send}",
"args": ["engine.hz(440)"]
}
]
}