SuperCollider Language Server for Visual Studio Code
⚠ Note: This extension is still in development and is not yet stable.
A Visual Studio Code extension providing language support for SuperCollider, an audio synthesis and algorithmic composition platform.
Features
Requirements
The SuperCollider environment must be installed.
- macOS/Linux:
sclang should be in your PATH.
- Windows:
sclang.exe should be available.
- WSL: The extension automatically handles the
sclang alias issue by falling back to sclang.exe, or you can configure the path manually.
Extension Settings
supercollider.sclangPath: Path to the sclang executable (default: sclang).
Keybindings
| Command |
Keybinding |
| Execute Block/Selection |
Ctrl+Enter (Cmd+Enter on macOS) |
| Execute Block (Alternative) |
Shift+Enter |
| Stop All Sounds |
Ctrl+. (Cmd+. on macOS) |
Installation
- Clone this repository
- Run
npm install in the root folder
- Open VS Code on this folder
- Press
Ctrl+Shift+B to compile
- Press
F5 to launch the Extension Development Host
Usage
Create or open a .scd or .sc file and start writing SuperCollider code:
// Simple sine wave
{
var freq = 440;
SinOsc.ar(freq, 0, 0.1)
}.play;
// Pattern example
Pbind(
\instrument, \default,
\degree, Pseq([0, 2, 4, 5, 7], inf),
\dur, 0.25
).play;
Development
Project Structure
├── client/ # Language client (VSCode extension)
│ └── src/
│ └── extension.ts
├── server/ # Language server
│ └── src/
│ ├── server.ts
│ ├── languageModes.ts
│ └── modes/
│ └── scdMode.ts
├── syntaxes/ # TextMate grammar
│ └── scd.tmLanguage.json
└── package.json
Building
npm install
npm run compile
Debugging
- Open in VS Code
- Press
F5 to launch Extension Development Host
- Use "Attach to Server" debug configuration to debug the language server
License
MIT
Author
Roger Vilà
Built with AI