Skip to content

VSCode Extension

The VSCode extension is the main way you’ll live-code Resonon. You write in a .non file, select code, and press a key to run it — the sound changes while the editor keeps a connection open to a running session. On top of that loop the extension gives you syntax highlighting, as-you-type error underlines, hover docs, completions, and one-key transport.

This page is about the editor itself: getting connected, the evaluate loop, and the panels and shortcuts around it. The live-coding workflow — building a piece up evaluation by evaluation — is the next page.

  1. Open VSCode and go to Extensions (Cmd+Shift+X).
  2. Search for RESONON.
  3. Install it.

The extension bundles a language server, so once it’s installed you get editor intelligence for .non files automatically — no extra setup.

You don’t have to start a server by hand. Open a .non file, write a line of code, select it, and press Cmd+Enter (Ctrl+Enter on Windows/Linux):

PRINT "Hello, RESONON!";

The first time you evaluate, the extension spins up a local Resonon server, connects to it, and runs your code against it. Every later evaluation reuses that same runtime, so the session remembers everything you’ve run.

If you’d rather manage the connection yourself, the RESONON item in the status bar (bottom-right) and the sidebar both let you start, pick, or connect to a server explicitly.

Live coding in Resonon is a tight loop:

  1. Select the code you want to run (or just put the cursor on its line).
  2. Evaluate with Cmd+Enter.
  3. Listen, tweak the code, and evaluate again.

Because the runtime persists between evaluations, you build a piece up incrementally — define a track once, then keep sending it new patterns without redefining anything. Output from PRINT and PUT shows up in the Output panel (Cmd+Shift+U, then pick “RESONON” from the dropdown).

You can drive playback without leaving the editor or typing transport commands:

KeyAction
F5Play / Pause — toggles playback
Shift+F5Stop — halts playback and mutes output
Ctrl+Shift+F5Reset — wipes the session, fresh runtime

These send the equivalent of PLAY;, STOP;, and RESET; to the active server, and only fire while a .non file is focused. What each one actually does to your session is covered in Live Workflow.

Click the Resonon icon in the activity bar to open the RESONON sidebar. It groups everything into five views:

ViewWhat it’s for
ServersAll discovered, spawned, and manually added servers. Click to connect or set active.
Server ControlsStart, stop, and restart the active server.
TransportPlay, pause, stop, and reset buttons for the active server.
EvaluateRun the current selection or the whole file.
ViewsOpen the Console, Mixer, Routing, and MIDI Monitor panels.

Servers in the list are labelled by where they came from:

  • Discovered — found automatically over the local network (UDP broadcast).
  • Spawned — started from inside VSCode with Start Server.
  • Manual — added by hand with Add Server….

Connecting to other people’s servers and sharing a session is its own topic — see Server & Collaboration.

The bundled language server (LSP) reads your code as you type — before you ever evaluate it.

  • Hover over any symbol for its type, signature, and docs: variables, functions, built-in classes and methods, and module members like MyModule.some_function.
  • Completions appear as you type, including after a . for method calls — the LSP infers the receiver’s type and suggests its methods.
  • Go to Definition (Cmd+Click or F12) jumps to where a symbol is defined. It even works on a shader path string inside gfx.load_shader("…"), opening the backing .glsl file.
  • Real-time diagnostics underline parse errors as you type.

You’ll see two kinds of error underline. LSP diagnostics are parse errors caught while typing. Server diagnostics are runtime errors returned after you evaluate — type errors, undefined variables, and anything that can only surface at run time. Both show up as red underlines, on hover, and in the Problems panel (Cmd+Shift+M). Server diagnostics clear on your next evaluation; LSP ones clear when you fix the parse error.

The second status-bar item, LSP, shows the language server’s state. If it reads $(error) LSP, hover it for details, and check that resonon-lsp is on your PATH (or point resonon.lsp.path at it).

The Views section of the sidebar opens dedicated panels as integrated terminals:

ViewShows
ConsoleThe server console with output and shortcut hints
MixerTrack levels and mixing controls
RoutingThe MIDI and audio routing overview
MIDI MonitorLive MIDI messages on the system

Console, Mixer, and Routing connect to the active server; the MIDI Monitor runs standalone and shows all MIDI activity on the system. These are the same TUI views you can launch from the command line with resonon view … — see Live Workflow.

Several editors (or other clients) can connect to one server at the same time and share its session — patterns and variables defined by one are visible to all. Each client picks a display name (the resonon.client.name setting, the Set Display Name command, or your system username), shown in the status bar and output. When the output gets busy, Toggle Output Filter (Own / All) switches between your own evaluations and everyone’s. The collaboration story — performing together, teaching, multi-window — is covered in Server & Collaboration.

CommandKeybindingDescription
RESONON: Connect to ServerAuto-connect: use active server, pick one, or spawn a new one
RESONON: Disconnect from ServerDisconnect from the active server
RESONON: Connect to Server…Connect to a specific server (sidebar context menu)
RESONON: Set as Active ServerSet a connected server as the evaluation target
RESONON: Add Server…Manually add a server by host and port
RESONON: Refresh ServersRefresh the server list
RESONON: Start ServerStart a local server and connect to it
RESONON: Stop ServerStop the active server’s process
RESONON: Restart ServerStop and re-start the active server
RESONON: Play / PauseF5Toggle playback on the active server
RESONON: StopShift+F5Stop playback and mute output
RESONON: ResetCtrl+Shift+F5Reset the server session
RESONON: Evaluate Selection or LineCmd+Enter / Ctrl+EnterRun the selection or current line
RESONON: Evaluate FileRun the entire file
RESONON: Open Console / Mixer / Routing / MIDI MonitorOpen the corresponding view panel
RESONON: Toggle Output Filter (Own / All)Show only your output or all clients’
RESONON: Set Display NameSet your display name for multi-client sessions

Configure these under RESONON in VSCode settings (Cmd+,):

SettingDefaultDescription
resonon.server.path""Path to the resonon binary. Empty searches PATH; set it if resonon isn’t on your PATH.
resonon.server.port5555WebSocket port used when spawning a server from VSCode.
resonon.lsp.enabledtrueEnable LSP features (hover, completion, go to definition).
resonon.lsp.path""Path to the resonon-lsp binary. Empty searches PATH.
resonon.client.name""Display name for multi-client sessions. Empty uses your system username.
{
"resonon.server.path": "/usr/local/bin/resonon",
"resonon.client.name": "Alice"
}
IconStateClick
$(circle-slash) RESONONDisconnectedConnect to server
$(sync~spin) RESONONConnecting / Reconnecting
$(circle-filled) RESONON: Name (as You)ConnectedOpen the server menu

When connected, the status bar shows the server name and your display name (e.g. RESONON: Studio (as Alice)). A second item shows LSP state: $(check) LSP running, $(sync~spin) LSP starting, $(circle-slash) LSP stopped, $(error) LSP errored (hover for details).

Your editor is wired up. Now learn the workflow it’s built for, then the language itself.