A very dirty way of using SuperCollider as an LV2 plugin inside a DAW

I was playing around with mephisto.lv2, which is a just-in-time Faust compiler embedded in an LV2 plugin. Since it uses a terminal emulator and the shell’s standard text editor I wondered whether a similar implementation could not be done for SuperCollider? And it is actually possible to get to run SuperCollider code within mephisto.lv2 itself already!

Here’s my setup:

  • Arch Linux
  • Neovim with SCNvim
  • Reaper as DAW

So I loaded up mephisto.lv2 in Reaper which opens up with my regular Neovim configuration. I empty the document and change the filetype in Neovim:

:set filetype=supercollider

Then I fire up SCNvim and boot the Server with s.boot. Voilà!

This is very primitive of course — any audio or midi communication between SuperCollider and the DAW has still to be done with JACK routing. But the SuperCollider code is saved with the respective plugin instance inside my Reaper project, which is already nice. (Though I have to reset the filetype everytime I reopen it since mephisto.lv2 always saves files with a .dsp ending.)

So maybe mephisto.lv2 could at least be stripped down to its terminal emulation/editor functions without Jack, and default to saving with an .scd ending. And maybe some more adaptations to SuperCollider could be made… (Just daydreaming though because it’s probably way beyond my hacky programming capabilities.)

Edit: Another caveat — I realized it only works as long as the plugin instance is actually opened in Reaper, the server is shut down as soon as I close the plugin instance. So it’s truly a very dirty and not-so-practical way right now. (Still saves the track-specific SuperCollider code with the project though.)

3 Likes