🎹 Sonic Pi now runs as a plugin inside your music software: live coding in the DAW

In brief
- 🎹 Sam Aaron has released Sonic Pi, the software for making music with code, as a VST3 and AU plugin for music workstations.
- 🥁 The plugin follows the DAW's tempo and transport, takes MIDI and audio in and sends MIDI to other instruments.
- 💻 VST3 runs on macOS and Windows, Audio Unit on macOS; there is no Linux version yet.
- 💶 The plugin is paid; according to Aaron the regular Sonic Pi app and the web version stay free.
🎹 Sonic Pi, a long-standing free environment where you make music by typing code, is now also available as a plugin for music software. Developer Sam Aaron has packed the whole program, sound engine included, into a library that runs directly inside the process of a DAW (digital audio workstation) such as Ableton Live, Logic or Reaper. According to the [product page](https://sonic-pi.net/plugin.html) it comes as VST3 for macOS and Windows and as an Audio Unit for macOS. 🥁 The plugin follows the project's tempo and bars and starts and stops with the DAW's transport. It takes MIDI from a keyboard or from clips, sends MIDI to other instruments in the session and can change the track's stereo audio live with code. Several instances run at once. Randomness is reproducible: according to Aaron, bouncing the same project twice gives the same audio. 💶 Unlike the app, the plugin is paid. Aaron had announced a final price of 99 dollars on the community forum; until 7 December the Sonic Pi store gives a 40 percent discount. The price includes tax and there is a 14-day refund. The income is meant to fund further open source work. The plugin is for people who already produce in a DAW and want algorithmic patterns, rhythms or generated MIDI lines in their projects; anyone who only wants to try music made with code can stay with the free app.
🔧 How it is built. Until now Sonic Pi consisted of several programs in several languages: Erlang, Ruby and C++ worked together in separate processes, and the sound came from scsynth, the synth server of the SuperCollider project. For the plugin Aaron says he had to rebuild this into a single library that runs inside the DAW's process and renders its audio directly in the host's audio callback. That was made possible by SuperSonic, Aaron's own port of scsynth. The same engine, compiled to WebAssembly, also plays the examples on the product page, so you can hear what the plugin produces without installing anything.
🎼 What you do with it. The product page shows short programs that an AI wrote from a request, for example two kalimba voices on the same pattern, one very slightly slower so that they drift apart and come back together, or a drum groove whose hits are distributed differently in every bar without losing the beat. You press play and edit the code. Other examples show how incoming MIDI notes from the DAW are handled: each key plays one hit of the well-known amen break, a minor seventh chord over two octaves, or its own eight-note melody. In the other direction, code generates MIDI notes and sends them to other instruments in the session.
🎚️ In everyday production. Code buffers can be tied to the transport with a sync button so that they start and stop with the song. An offset in milliseconds nudges everything earlier or later to sit with the other tracks. Because Sonic Pi compositions are text, they can be saved, shared and edited together as easily as an email. Every synth has its own documentation page and the tutorial is built in.
🗓️ How it got here. Aaron first presented the plugin as an early release on the community forum in_thread on 18 November, at an early-bird price of 20 dollars meant to cover all future Sonic Pi 5 releases; supporters on the higher tiers of his Patreon page got it as a thank-you. Version 0.2 added MIDI in and out, lower latency, a full-screen mode and per-buffer playback control from the DAW. For the final release Aaron announced a price of 99 dollars. The early-bird phase is now over and the plugin is on sale in the Sonic Pi store, with 40 percent off until 7 December. On the forum Aaron also wrote that the plugin is open source and anyone is free to build it themselves; buying it helps him keep maintaining the free app and the web version, which he said he was struggling to do financially.
⚠️ Limits. There is no Linux version. Aaron writes that Linux is not forgotten, but building and testing on a platform he does not use for audio himself is a lot of work and sales do not justify it yet. The early release had no automatable parameters for the DAW; Aaron asked the community which ones would make sense. People who do not want to program will get little out of the plugin: here the music comes from code, not from knobs and faders.