Strudel for VS Code
A modern, offline-capable Strudel live-coding environment inside Visual Studio Code.
This is a maintained fork of the original extension, updated for the newest Strudel releases (1.2.x+), with improved audio loading, sample prebaking, and a more reliable webview playback system.
Features
- Live-evaluate Strudel patterns directly from VS Code
$: support and full modern Strudel transpiler compatibility
- Syntax highlighting, completion, and documentation
- Built-in audio engine using
@strudel/webaudio
- Offline-friendly sample loading
- Supports whole-file play or play-selection
- Status indicators and logs in the VS Code UI
- Embedded piano roll (when used in pattern output)
Getting Started
Install
(Once published to Marketplace)
ext install cmillsdev.strudel-vscode
Use
Select a .strudel.js or .strudel file and start live-coding:
- Play file:
Ctrl+Enter
- Play selection:
Ctrl+Shift+Enter
- Stop:
Ctrl+.
- Reconnect audio: via the Strudel panel button
All commands are also available via Command Palette:
Ctrl+Shift+P → "Strudel: ..."
Samples & Soundbanks
On first connection, the extension automatically preloads:
- Dirt-Samples
- Tidal Drum Machines
- Piano
- EmuSP12
- VCSL
- Mridangam
- All default synths and soundfonts
This ensures an offline-capable workflow close to the Strudel browser experience.
Configuration
Strudel VS Code provides several settings to customize the live highlighting feature:
Live Highlighting Settings
strudel.consoleLogLevel (string enum: off | info | debug | highlight, default: off)
Control extension logging verbosity. Use the level appropriate for your needs:
off — Disable extension console logging (recommended for normal use).
info — Show standard lifecycle and user-facing logs (good for routine diagnostics).
debug — Verbose debug messages for troubleshooting edge cases.
highlight — Very verbose; enables live-highlighting diagnostics (high volume; useful only when debugging highlighting issues).
Set via Settings or settings.json (e.g., "strudel.consoleLogLevel": "info").
strudel.liveHighlight.enabled (boolean, default: true)
Enable or disable live highlighting of notes, samples, and banks during playback.
strudel.liveHighlight.maxDocumentSize (number, default: 100000)
Automatically disable highlighting for documents exceeding this many characters. When a document exceeds this limit, you'll see an info message once per session.
strudel.liveHighlight.maxEventsPerSecond (number, default: 100)
Throttle highlighting updates when the event rate exceeds this threshold. Updates are batched every 100ms during high-frequency periods to maintain performance.
Example Configuration
Add these settings to your settings.json:
{
"strudel.consoleLogLevel": "off",
"strudel.liveHighlight.enabled": true,
"strudel.liveHighlight.maxDocumentSize": 150000,
"strudel.liveHighlight.maxEventsPerSecond": 200
}
Troubleshooting
- Highlighting not appearing: Check that
strudel.liveHighlight.enabled is true and your document size is below maxDocumentSize.
- Performance issues: Try reducing
maxEventsPerSecond or disabling highlighting for complex patterns.
- Debugging sync issues: Set
strudel.consoleLogLevel to highlight to see detailed highlighting logs in the Strudel output panel (View → Output → Strudel).
Panel behavior
strudel.openPanelOnPlay (boolean, default: false)
When enabled, the extension will automatically reveal the Explorer pane (Primary Side Bar) and focus the Strudel web view when starting playback (Play / Play selection). This is opt-in to avoid changing users' layout by default. If you prefer, use the "Always Show Panel" action that appears in the informational prompt when starting playback while the Strudel panel is hidden to persist this preference.
Development
Clone the repo:
git clone https://codeberg.org/cmillsdev/strudel-vscode
cd strudel-vscode
npm install
Run in development mode:
npm run dev
Build a .vsix for local install:
npm run pack
Changelog
See CHANGELOG.md.
Authorship
This fork is maintained by cmillsdev.
Issues and pull requests are welcome.
☕ Support on Ko-fi
Extension Source Code
Strudel Engine