This is an extension to work with Sonic Pi within vscode. It will launch Sonic Pi's backend when you open a ruby file.
At the moment this is run as an extension in development, so see the Requirements section below for instructions on how to run it.
Please feel free to contribute with your Pull Requests. Any help is welcome!
Also, if you like this project or are interested in its progress, it would be great if you star it in github to help spread the word! Thank you!
This is just starting, but we already have enough features to have some fun!
Configurable Sonic Pi server launch options. Now you can choose between:
Configurable Sonic Pi root path, in case the default does not work for you
Can run code pressing Alt-R (or Cmd-R on Mac, just like in Sonic Pi's editor) or with command palette "Sonic Pi: Run" (see Screenshot)
Can stop running audio with Alt-S (or Cmd-S on Mac) or "Sonic Pi: Stop"
Can run the selected code with Alt-T (or Cmd-T on Mac). If there is no code selected, it will offer to run the whole file instead (and persist the choice)
Some snippets like live_loop, effects, synths, samples, and possibly more coming soon. See the snippets directory for the full list and contribute new ones if you feel like it!
Highlight errors as reported by the Sonic Pi server
And of course, you have syntax highlighting, autoformatting, all the goodies that you usually have with vscode!
See a very short video of Robin Newman's arrangement of "Pase El Agua" launched from this extension, showing the thing working, logs, etc: Video
(You can find Robin's original work here: https://in-thread.sonic-pi.net/t/three-more-pieces-for-sonic-pi/2434).
The extension runs in development mode. Follow these steps:
If you run into problems, let me know, and I'll do my best to help you set this up.
Make sure you configure the Sonic Pi root path in the configuration if the default setting does not work for you Open Settings -> Extensions -> Sonic Pi -> Sonic Pi Root Directory
I have not tested this in Linux yet. Works nicely in Windows and Mac.