VSCode Extension
The extension evaluates code on a resonon server and bundles the language server. A walk-through is Live Coding Workflow.
Key bindings
Section titled “Key bindings”| Key | Command | Active when |
|---|---|---|
Cmd+Enter (Ctrl+Enter on Windows and Linux) | Run Selection Live | A resonon editor has focus |
Cmd+Shift+Enter (Ctrl+Shift+Enter on Windows and Linux) | Run File Live | A resonon editor has focus |
F5 | Play / Pause | A resonon file is open |
Shift+F5 | Stop. Three in a row cut everything still sounding | A resonon file is open |
Ctrl+Shift+F5 | Reset | A resonon file is open |
What each transport command does: Transport. Reset Project has no key binding.
Commands
Section titled “Commands”Every command is in the command palette, prefixed RESONON:.
Evaluation and transport
Section titled “Evaluation and transport”| Command | What it does |
|---|---|
| Run Selection Live | Runs the selection, or the line the cursor is on. Connects first if needed. |
| Run File Live | Saves edited files, then evaluates the whole entry file of the project into the running session. It does not reset the session or call setup(). Not a session undo step. |
| Play / Pause | PLAY when stopped or paused, PAUSE when playing. |
| Stop | STOP. |
| Reset | RESET: discards the session. |
Both evaluate commands are also in the editor’s title bar.
Project
Section titled “Project”| Command | What it does |
|---|---|
| Reset Project | Saves edited files, then opens the project of the active file again from its files: teardown(), RESET, the saved session, then the entry file with setup(). Asks first when the session has changes since the last save, and when tracks were renamed since the code named them. See The entry file’s lifecycle. |
| Save Project Session | Saves the session into the project’s session/ folder. |
| Collect and Save Project Session | Copies external samples into the project, then saves the session. |
Servers
Section titled “Servers”| Command | What it does |
|---|---|
| Connect to Server | Connects to the active server; with several known, offers a list; with none known, starts a local one. |
| Disconnect from Server | Disconnects from the active server. |
| Start Server | Starts a local server and connects to it. |
| Stop Server | Stops the active server. |
| Add Server… | Adds a server by host and port. |
| Refresh Servers | Refreshes the Servers view. |
| Connect to Server… | Connects to the server clicked in the Servers view. |
| Disconnect | Disconnects from the server clicked in the Servers view. |
| Set as Active Server | Makes a connected server the one evaluations go to. |
| Stop Server Process | Stops a server this window started. |
| Remove Server | Removes a server added by hand. |
| Set Display Name | Sets the name other clients see for you. |
| Toggle Output Filter (Own / All) | Shows only your own output, or every client’s. |
Views, plugins and preferences
Section titled “Views, plugins and preferences”| Command | What it does |
|---|---|
| Open Console | Server output, in a terminal. |
| Open Resonon Window | Opens the main window on the server. |
| Open Routing | Audio and MIDI routing, in a terminal. |
| Open Scope | An oscilloscope on the output, in a terminal. |
| Open MIDI Monitor | All MIDI on this machine, in a terminal. Needs no server. |
| Open Visuals | The native visuals window of the active server. |
| Rescan Plugins | Scans the plugin folders for new and changed plugins. |
| Rescan Plugins (Full) | Opens every plugin again, including those skipped after a crash. |
| Retry Skipped Plugins… | Opens chosen skipped plugins again. |
| Open Preferences | Opens ~/.resonon/preferences.toml. |
| Restart Language Server | Restarts the language server of the current file. |
The terminal views are the ones resonon view opens; see the
CLI reference.
Sidebar
Section titled “Sidebar”The resonon icon in the activity bar opens four views:
| View | Contents |
|---|---|
| Servers | Every server found on the network, started from this window, or added by hand. Click to connect. |
| Server Controls | Start and stop the server, reset, preferences, plugin rescan, add a server, connect, disconnect, display name. |
| Transport | Play / pause, stop, Run Selection Live, Run File Live, Reset Project. |
| Views | Console, mixer, routing, MIDI monitor, scope, visuals. |
Settings
Section titled “Settings”| Setting | Default | What it is |
|---|---|---|
resonon.server.path | "" | The resonon binary. Empty searches PATH. A path into one version (~/.resonon/versions/<v>/bin/resonon) bypasses the launcher, so projects’ pinned versions no longer apply. |
resonon.server.port | 5555 | Port of a server the extension starts. |
resonon.client.name | "" | Your display name. Empty uses your system user name. |
resonon.lsp.enabled | true | The language features. |
resonon.lsp.path | "" | The resonon-lsp binary. Empty searches PATH. A path into one version gives every project that version. |
resonon.audio.multicore | false | Render audio on several CPU cores, in a server the extension starts. |
resonon.plugins.autoScan | true | Keep the plugin database up to date automatically. |
Status bar
Section titled “Status bar”The RESONON item shows the connection:
| Text | State | Click |
|---|---|---|
$(circle-slash) RESONON | Disconnected | Connect |
$(sync~spin) RESONON | Connecting or reconnecting | — |
$(circle-filled) RESONON: studio (as Alice) $(pulse) 12% | Connected, with the server’s name, your display name and the audio CPU load | Server menu |
The LSP item shows the language server of the current file, its version and, while it runs,
the mode, for example $(check) LSP 0.14.0 · Live:
| Text | State |
|---|---|
$(sync~spin) LSP 0.14.0 | Starting |
$(check) LSP 0.14.0 · File | Running, in File Mode |
$(check) LSP 0.14.0 · Live | Running, in Live Mode |
$(circle-slash) LSP 0.14.0 | Stopped |
$(error) LSP 0.14.0 | Failed. Click to retry |
Language features
Section titled “Language features”The language server works on .non files and on resonon.toml.
| Feature | How | What it does |
|---|---|---|
| Hover | Point at a name | The type, signature and documentation of a variable, function, class, method or module member. |
| Completion | Type, or Ctrl+Space | Keywords and names; methods after a .; parameter names in .parameter("…") and .set_parameter("…"); effect slot names in .effect("…"); module paths in use "…" and names in its { … }. |
| Signature help | Type ( or , | The parameters of the function being called, including module functions (gfx.Visual() and DSP builtins inside a dsp block. |
| Go to Definition | Cmd+Click or F12 | Jumps to where a name is defined, in the file, a module or the standard library. On the path string of gfx.load_shader(...) or load_file(...) it opens that file. |
| Find All References | Shift+F12 | Every use of the name in the current file. |
| Rename Symbol | F2 | Renames the name in the current file. Refused on a keyword, and for a new name that is not an identifier or is a keyword. |
| Format Document | Shift+Alt+F | Re-indents the whole file; see below. |
| Inlay hints | — | name: before each positional argument of a call to your own function, class or method. |
| Outline | Outline view, breadcrumbs | Functions, classes and their methods, dsp declarations, let bindings and uses. |
| Diagnostics | — | Underlines errors; see below. |
| Quick fixes | Cmd+. (Ctrl+.) | See below. |
Completion of values, effect slots and parameters reads the state of the session after your last evaluation; in File Mode, it offers only names in the file.
Live Mode and File Mode
Section titled “Live Mode and File Mode”The editor reads code in one of two modes, and switches between them on its own. The status bar shows which.
| Mode | When | What the editor reads |
|---|---|---|
| File Mode (offline) | Nothing has been evaluated yet, and again after RESET, or when the server stops or crashes | The file, as one program run top to bottom |
| Live Mode (online) | From the first evaluation, in any file | The session: the file is a scratchpad of selections, each evaluated on its own |
Each evaluation of any file switches every open file to Live Mode, because definitions belong to the whole session. A server that crashed is noticed at your next edit. Rename and Find All References work on the current file, match methods by name only, and skip strings and comments.
Diagnostics
Section titled “Diagnostics”Parse errors, undefined names and wrong argument counts are underlined as you type; runtime errors are underlined after you evaluate, and clear at your next evaluation. Both are in the Problems panel.
A name defined twice at the top level of a file, or defined and also imported with use, is marked
only in File Mode. In Live Mode, evaluating a new definition further down
is how you change one. A name repeated inside one definition, such as two methods m in a class, or
inside a module the file imports, is marked in both modes: either is always evaluated whole.
Every kind and its severity: Errors & Warnings.
In resonon.toml, each [local] kits entry is followed by a note: in this project,
on this machine, travels anyway or missing.
Formatting
Section titled “Formatting”| Rule | |
|---|---|
| Indentation | One level per open bracket, in the editor’s tab size, with spaces or a tab as the editor is set |
| Continuation | A line starting with . is indented one more level |
| Blank lines | At most 2 in a row; none at the end |
| Trailing whitespace | Removed |
| End of file | Exactly one newline |
| Line endings | CRLF kept if most lines use it |
| Unchanged | Line breaks, spacing inside a line, comments, and lines that start inside a string or /* */ comment |
A file that does not parse is left unchanged. resonon.toml is not formatted.
Quick fixes
Section titled “Quick fixes”| Where | Fix |
|---|---|
| An undefined name | Did you mean X? — the closest defined name, including DSP builtins inside a dsp block |
A Kit("…") whose kit is outside the project | Copy ‘k’ into this project; List ‘k’ under [local] in resonon.toml |
A [local] kits entry | Copy ‘k’ into this project (for a kit on this machine, outside the project); Remove ‘k’ from resonon.toml |
A misspelled key in resonon.toml | Rename to key |
| A plugin that was skipped after a crash | Retry plugin — opens the plugin again |
UI parameter values in code
Section titled “UI parameter values in code”In Live Mode, a parameter changed in the Mixer or the Devices panel shows its current value beside the last executed argument that set it. Write UI value into code replaces that numeric literal when you choose the action. It does not evaluate the code. Running the original line again restores the coded value and clears the hint.
Variables and expressions still show the value, but the action explains that only numeric literals can be rewritten. Hints are hidden if the executed source lines have changed, or if the editor is in File Mode. The UI never edits source by itself.
Versions
Section titled “Versions”Each project gets its own language server, running the version its resonon.toml pins. Files outside
a project share one running your default version. If a project pins a version you don’t have, a
notification offers to install it.
The server you evaluate on runs one version: that of the project it was started from. Code from a project that needs a newer version is refused, with an offer to restart the server for that project when that version is installed. Code from a project that targets an older version runs, with a warning the first time in a session.