vs-sonic-pi outside research (deep-dive cycle 1, day 12)¶
Outside research for bamr87/vs-sonic-pi on Sonic Pi v5 compatibility and ranked proposals P1–P9, dated 10 November 2026.
Date: 10 November 2026 (America/Denver)
Repo: bamr87/vs-sonic-pi (remote read only; no clone, no issues, no PRs)
Audience: Tools, to file as deep-dive issues/feature requests if they agree
Method: cursor-github MCP reads of AGENTS.md, README.md, package.json, docs/PRD.md, features/features.yml, CHANGELOG.md, and the connection/language/log/UI modules; GitHub issue search; WebSearch/WebFetch of peer projects and Sonic Pi daemon.rb on tags v4.6.0 and branch dev (current v5 protocol).
1. What vs-sonic-pi already ships¶
Do not re-file these as new features. They are present in package.json, the README, and the TypeScript modules named below.
| Area | Shipped capability |
|---|---|
| Language | .spi / .sonicpi TextMate grammar; completions for synths, samples, FX, scales, chords, notes, function names, and context-aware option keys after use_synth / with_fx (src/language/CompletionProvider.ts); hover docs; 31 snippets |
| Run / stop | Run, Run Selection, Stop; editor title/context menus; live_loop ▶ Run loop CodeLens; New Loop File; Beautify Buffer |
| Server | Auto-connect; /ping → /ack; spawn daemon.rb with bundled Ruby; parse daemon STDOUT; persist port-info; token on every OSC send; /daemon/keep-alive every 2 s with token; /daemon/exit on shutdown; Restart Daemon; audioInputs flag |
| Feedback | Output channel ("Sonic Pi Log"); inline / Problems-panel diagnostics; status bar; openLog |
| Learning | 85-chapter tutorial tree + webview; 55 bundled examples; language reference webview; Getting Started walkthrough |
| Other | Start/stop/save WAV recording; Codespaces/devcontainer headless server + HTTP audio stream player |
features/features.yml is stale relative to the code and README: SONICPI-009 (autocomplete), 010 (hover), 013 (error reporting), 014 (status bar) and 015 (daemon auto-start) are marked tbd / implemented: false, but they are shipped. SONICPI-019–022 (cue log, MIDI monitor, audio scope, multi-buffer workspaces) remain genuine gaps and match PRD Phase 3 (FR-19–22).
README and PRD still say compatibility is Sonic Pi v4.x. Sonic Pi v5.0.0 was released on 7 August 2026 (release notes). That matters for proposal 1.
2. Issue check (remote)¶
GitHub search repo:bamr87/vs-sonic-pi is:issue returned two issues:
- Open: #37 Adopt fleet frontend platform (§18, tier tokens) — fleet design-token work, blocked on hub ratification. Not a product feature.
- Closed: #2 CI failure: Node 18 incompatible with vitest 4 — already fixed.
None of the proposals below duplicate an existing issue. There are no open deep-dive or feature-request issues at all.
3. Protocol fact (needed for several proposals)¶
Official daemon.rb is the supported boot API for external editors (Sam Aaron on #3205; comments at the top of daemon.rb on dev). Clients must:
- Spawn
daemon.rband read one stdout line of ports + token (do not scrape log files). - Send
/daemon/keep-alivemore often than every 3 s, with the token as the first argument. - Send the token as the first argument on OSC commands to the Spider server.
- Shut down with
/daemon/exit+ token.
vs-sonic-pi already does (2)–(4) correctly (Heartbeat.ts default 2000 ms; OscTransport.send prepends the token). The stdout field layout changed in v5:
| Version | Stdout line (space-separated) | Source |
|---|---|---|
| v4.6.0 | 8 integers: daemon gui-listen gui-send scsynth osc-cues tau tau-phx token |
daemon.rb @ v4.6.0 (puts of those eight values) |
v5 / dev (Nov 2026) |
7 fields: daemon gui-listen gui-send scsynth osc-cues token engine-secret where engine-secret is 64 hex digits, not an integer |
daemon.rb on dev line that prints ports; header comment lists the same order |
parseDaemonOutput in PortDiscovery.ts requires at least eight numeric fields. A v5 line has seven tokens and a trailing hex secret, so Number(...) is NaN and the parser returns undefined. A spawned v5 daemon would then look like a boot timeout.
Older PRD / docs/08-daemon-spawner.md text still describes a ~30 s heartbeat, a ~90 s kill switch, and spider.log scraping. That documentation is outdated; the code already uses the 2 s / 3 s v4 contract and a port-info file. The live risk is the v5 field change, not the heartbeat interval.
4. Comparison table¶
Status notes are from the linked pages as of this research date. Star counts and last-update dates were not re-audited beyond the pages fetched.
| Project | Host | Run / stop | Server / daemon (v4+) | Logs / cues | Language / docs | Distinct UX | Notes |
|---|---|---|---|---|---|---|---|
| bamr87/vs-sonic-pi | VS Code | F5 / Shift+F5 / selection; live_loop CodeLens |
Spawns daemon.rb, token, 2 s keep-alive, restart, Codespaces headless |
Combined log + diagnostics; no cue pane | Completions, hover, snippets, 85-chapter tutorial, examples, reference | Recording, beautify, audio stream (headless) | Broadest VS Code feature set reviewed; README still targets v4.x; v5 stdout unparsed |
| Sonic Pi GUI v4 / v5.0.0 | Qt app | Run / stop; ten buffers; v5 Sets (.sonicpi) |
Owns daemon.rb |
Cue viewer (internal, MIDI, OSC, cue); log; scopes |
v5: richer completions with previews/sliders; docs pane with runnable examples; Quickstart Cards | v5: run flash + per-live_loop mini-scope; volume/drive; Link/MIDI clock |
Parity target in the PRD. v5 also added live audio-device switching via SuperSonic |
| s00500.sonic-pi-extension (s00500/vscode-sonic-pi) | VS Code | F5 run (same lineage as jakearl) | Adapted “for Sonic Pi v4 and up” | Not documented beyond the jakearl base | Completions, hovers, examples, tutorial content | — | Current Marketplace fork of jakearl + llloret; README is thin; still the most-installed alternative |
| JacksonKearl/vscode-sonic-pi (jakearl Marketplace) | VS Code | F5, Open Examples | Pre-v4 paths; community reports of breakage on 4.3+ (in-thread thread) | Limited | Completions, hovers | — | Last Marketplace build around 2021; language-support ancestor of vs-sonic-pi |
| llloret/sonic-pi-vscode-editor | VS Code (dev-mode) | Alt/Cmd-R run, Alt/Cmd-S stop, Alt/Cmd-T selection (native-style) | Configurable auto-launch of the backend | Logs and cues in the Output panel; error highlight | Snippets with choosers (fx, us, sa) |
— | Unreleased-as-extension ancestor of run/stop; last meaningfully active years ago; Linux untested per README |
| mactkg/vscode-sonic-pi | VS Code | Send / stop | Assumes a running app | Cannot display logs (known issue) | — | Eval flash colors (sonicpi.flashBackgroundColor) |
Small, older; last release 2020 |
| SunderB/sb-atom-sonic-pi | Atom | Run / stop | v4.0+ server control | Logs | Autocomplete | — | Atom is discontinued; not regularly maintained (README) |
| porras/sonic-pi-mode | Emacs | Send buffer / stop | Starts/connects the v4 daemon | — | — | Volume control command | Explicitly 4.x only; successor of sonic-pi.el |
| repl-electric/sonic-pi.el | Emacs | Send buffer / stop | jack-in / connect (pre-v4 server layout) |
— | Highlight | — | Older stack (Sonic Pi ⅔ era) |
| magicmonty/sonicpi.nvim | Neovim | Send buffer / stop | v4+ daemon start/stop + keep-alive; no external CLI | Logs and cues | Completions/help parsed from Sonic Pi server docs; nvim-cmp; LSP-style .sonicpi |
— | Strongest editor-plugin protocol peer; Sam Aaron pointed at it on #3205 |
| lilyinstarlight/vim-sonic-pi | Vim / Neovim | Eval / stop / record | Via emlyn/sonic-pi-tool or lpil/sonic-pi-tool; README notes v4 tool work was incomplete | Log window | — | Recording | Relies on an external CLI; sonic-pi-cli is a weaker fallback (Widdershin/sonic-pi-cli) |
| dermusikman/sonicpi.vim | Vim | Buffer / selection send | sonic-pi-cli or sonic-pi-tool | — | Omnicomplete of synth-specific params | — | Good language-UX prior art; pre-v4 defaults |
| tidalcycles/vscode-tidalcycles (Marketplace) | VS Code | Shift+Enter line, Ctrl+Enter block, hush | Spawns GHCi / SuperDirt, not OSC-to-Sonic-Pi | GHCi output; eval count | Hover/completion levels | tidalcycles.feedbackColor eval flash |
Best VS Code live-coding UX reference |
| pulsar-tidalcycles | Pulsar | Line / selection / whole editor; mute | GHCi | OSC eval highlighting | — | Osc-triggered eval | Same family as the old Atom Tidal package |
| strudel-box | VS Code | Ctrl/Cmd+Enter eval, Ctrl/Cmd+. stop | In-editor Strudel REPL (no Sonic Pi) | File browser / now playing | .strudel editor |
Playlist, instant audio | In-process engine; Hydra/CSound not loaded |
| bonzonkim/strudel.nvim | Neovim | Line / file eval | Browser Strudel via OSC + Puppeteer | — | Offline catalog completions | In-buffer per-note token flash in time with audio | Strongest “code lights up with the beat” reference |
| Flok | Web P2P editor | Slot eval to many REPLs (Tidal, Hydra, Strudel, sclang, …) | flok-repl; Sonic Pi target still unfinished (issue #29) |
— | Multi-language slots | Collaboration | Do not treat as a ready Sonic Pi integration. Hydra itself is a browser visual synth, not an editor plugin |
Related implementation references (not editors): official C++ API used by the Qt GUI; SunderB/sonic-pi-js-api (save_and_run_buffer / workspace_zero…workspace_nine).
5. Ranked improvement proposals¶
Effort: S = hours to about a day; M = a few days; L = a week or more, or needs protocol/hardware research. None of these are already open as issues. Items marked “catalogued” are already named in the PRD / features.yml as Phase 3 / tbd.
1. Sonic Pi v5 daemon stdout and SuperSonic protocol compatibility — P1¶
- Area: OSC / server handling
- Rationale: v5 (7 August 2026) replaced scsynth with SuperSonic and changed the daemon stdout contract from eight integers (v4.6) to seven fields ending in a hex
engine-secret. The current parser will reject that line, soDaemonSpawnercannot attach to a current official install. This is the highest-leverage gap: most other features assume a working connection. Support both layouts, detect version from field count/types, keep the token as the first OSC argument, and never log the engine-secret. Optionally document v4 vs v5 support in the README (it still says v4.x). - Sources: daemon.rb
devprint + comments; daemon.rb v4.6.0; v5.0.0 release; PortDiscovery.ts; issue #3205 (stdout is the supported API). Related hardening already done upstream: PR #3524 (GEM_PATH warnings corrupting the port line). - Effort: M
- Duplicates existing feature/issue? No. Code already implements the v4 contract well; this is a v5 compatibility fix, not a new spawn feature.
2. Dedicated cue (and MIDI) viewer — P2¶
- Area: UX / performance feedback
- Rationale: The native GUI’s cue pane is how live coders see
cue/sync, incoming OSC, and MIDI. vs-sonic-pi’sLogManagerhandles/log/multi_message,/log/info,/error,/syntax_error, and/scsynth/infoonly — no cue stream. llloret and sonicpi.nvim already split logs and cues. This is PRD FR-19 and, if MIDI events are shown in the same pane or a sibling view, FR-20. A VS Code Output channel or a sidebar/webview is enough for v1; do not block on a scope. - Sources: PRD FR-19 / FR-20; LogManager.ts; llloret README; sonicpi.nvim; Sonic Pi MIDI tutorial (cue paths).
- Effort: M
- Duplicates existing feature/issue? Catalogued as SONICPI-019 / 020 (
tbd). No GitHub issue.
3. Eval flash and optional live-loop activity feedback — P3¶
- Area: UX
- Rationale: Live-coding editors almost all flash the evaluated range so the performer can see what just ran. mactkg already did this in VS Code; TidalCycles exposes
tidalcycles.feedbackColor; Sonic Pi v5 flashes triggered code and can show a mini-scope beside eachlive_loop. vs-sonic-pi has no flash. A configurable decoration on Run / Run Selection / CodeLens is a small win. A later stretch is cue-timed or per-loop highlighting (strudel.nvim’s in-buffer token flash). - Sources: mactkg flash settings; TidalCycles VS Code settings; v5.0.0 GUI notes; strudel.nvim visuals.
- Effort: S for flash; L if bound to audio/cues
- Duplicates existing feature/issue? No.
4. Performance keybindings and “run current loop or block” — P4¶
- Area: UX
- Rationale: The native GUI uses Alt/Cmd-R (run) and Alt/Cmd-S (stop); llloret copied those. TidalCycles/Pulsar use Shift+Enter (line) and Ctrl+Enter (block). vs-sonic-pi binds F5 / Shift+F5 / Ctrl+F5, which work under
editorLangId == sonicpibut collide with the muscle memory of VS Code’s debugger and of Sonic Pi itself. CodeLens can run onelive_loop, but there is no keyboard command for “run the loop or block at the cursor” without a selection. Add a setting or keybinding preset (Sonic Pi / Tidal-like / current F5) and a “Run current loop or block” command. - Sources: llloret keybindings; vscode-tidalcycles; pulsar-tidalcycles; package.json keybindings; v5 “Keyboard Shortcuts preferences tab”.
- Effort: S
- Duplicates existing feature/issue? No. Does not replace CodeLens; it makes the same action keyboard-first.
5. Runnable examples in the tutorial / docs webview — P5¶
- Area: Docs / tutorial
- Rationale: The built-in 85-chapter tutorial is a real differentiator, but
TutorialWebviewsetsenableScripts: falseand only renders markdown — readers cannot Run a chapter example in place. Sonic Pi v5 rebuilt the Docs pane around syntax-highlighted, play/stop-from-the-help-pane examples and Quickstart Cards. A conservative v1: “Insert into editor” and “Run this example” buttons on fenced code blocks (requires a careful webview CSP, unlike the current no-script page). - Sources: TutorialWebview.ts; v5.0.0 “rebuilt Docs help pane”; official tutorial.
- Effort: M
- Duplicates existing feature/issue? No. Tutorial viewer is shipped (SONICPI-018); run-from-docs is not.
6. Safer attach-or-spawn connection policy — P6¶
- Area: OSC / server handling
- Rationale: The PRD’s main operational risk is a port / daemon conflict with the Qt GUI. The extension may spawn
daemon.rbwhen noport-infofile exists, even if the official app is already running (the GUI does not necessarily write this extension’s~/.sonic-pi/port-info). Conversely, if the user follows the README (“open the Sonic Pi application”), a second daemon is the failure mode. A clearer policy: probe an existing server first; only spawn if ping fails; if the GUI is detected, attach or tell the user not to start a second backend; surface scsynth device info (/scsynth/infois already logged) when audio is silent. This pairs with proposal 1, because attach/spawn both need a parser that understands the version in use. Official guidance remains: startdaemon.rbyourself and read stdout — do not scrapespider.log. - Sources: PRD §14 port-conflict risk; ConnectionManager.ts; Sam Aaron on controlling the server; #3205.
- Effort: M
- Duplicates existing feature/issue? No. Auto-start (SONICPI-015) is already shipped; this is conflict handling and UX, not “add a spawner”.
7. Multi-buffer workspaces / Sets — P7¶
- Area: Features / live performance
- Rationale: The native GUI has ten named workspaces (
workspace_zero…workspace_nine). v5 adds Sets: save/load all ten buffers as one.sonicpifile. vs-sonic-pi already uses a stable per-document buffer id so re-running a file replaces the previous job (CHANGELOG), but it does not map tabs onto Sonic Pi workspaces or offer Sets. PRD FR-22. Useful for sets with several loops in separate files. The JS API’ssave_and_run_bufferis a concrete model. - Sources: PRD FR-22; v5 Sets; sonic-pi-js-api; SonicPiAPI docs.
- Effort: M–L
- Duplicates existing feature/issue? Catalogued as SONICPI-022 (
tbd). No GitHub issue.
8. Refresh language data and completions for the v5 DSL — P8¶
- Area: Language support
- Rationale: Completions and hover already cover a large v4 catalog and even option keys for a given synth/FX. v5 adds
set_drive!,link_audio,use_bpm :midi, game-controller cues, new scales/chords, and a much richer official completion popup (inline docs, sample preview, option sliders). The cheapest valuable step is to re-runnpm run extract-dataagainst a v5 checkout and add hover/completion for the new functions. Signature Help for opts would approach sonicpi.vim’s contextual omnicomplete without copying the full v5 GUI playground. Sample preview from hover is optional and needs audio. - Sources: v5.0.0 synths, theory, and completion UI; CompletionProvider.ts; AGENTS.md
extract-data; sonicpi.vim omnicomplete. - Effort: S for data refresh; M for signature help / richer UI
- Duplicates existing feature/issue? No. SONICPI-009 is already shipped; this is a catalog/version update.
9. Audio scope (optional per-loop mini-scope) — P9¶
- Area: UX (stretch)
- Rationale: The native app’s scope (and v5’s triggered scopes plus per-
live_loopmini-oscilloscopes) is the remaining large parity hole. PRD FR-21 already marks it a stretch.daemon.rbnotes that the scsynth/SuperSonic port is needed “for connecting to the boost shared memory for scope data.” CodespacesopenAudioStreamis an HTTP MP3 player, not a scope — do not confuse the two. Reasonable order: get v5 protocol working (proposal 1), then a simple waveform/level webview, then per-loop scopes if the engine API allows it. - Sources: PRD FR-21; daemon.rb scope comment; v5.0.0 scopes.
- Effort: L
- Duplicates existing feature/issue? Catalogued as SONICPI-021 (
tbd). Audio stream already exists and should not be re-filed as a scope.
10. (Not recommended this cycle) Collaborative Flok-style sessions¶
- Flok’s Sonic Pi target is still incomplete (issue #29; comments through 2026). Troop and similar tools speak OSC, but this is a product bet, not a gap in an otherwise complete editor. Revisit only after proposals 1 and 2 are solid.
6. Docs / catalog debt (not user-facing features)¶
Worth a small Tools/docs PR, not a deep-dive feature epic:
- Mark SONICPI-009, 010, 013, 014, 015 as
shippedinfeatures/features.ymland regenerate the PRD catalog. - Update PRD /
docs/08-daemon-spawner.md: heartbeat is 2 s / 3 s timeout, not ~30 s / ~90 s; discovery usesport-infoand daemon STDOUT, notspider.log; document both v4.6 (8 ints) and v5 (token + engine-secret) layouts. - README compatibility line should name the tested Sonic Pi versions once proposal 1 lands.
7. Suggested filing order for Tools¶
- v5 daemon protocol (blocker for current official installs)
- Cue / MIDI viewer (largest missing live-coding pane)
- Eval flash (small, high-visibility UX)
- Keybinding presets + run current loop/block (small)
- Runnable tutorial examples
- Attach-or-spawn policy (can share a PR with 1)
- Workspaces / Sets
- v5 language data (can start in parallel with 1 once a v5 tree is available)
- Scope only after 1 is proven
No GitHub items were opened by this research.