VCV Rack as a Synth Engine

Hi all,

I’ve been playing around with Zynthian for a week or so; it’s an amazing project and thanks to all the hard effort everyone has put into it. I’ve seen some dated posts on VCV-Rack but nothing focused on bringing it into Zynthian as a synth engine. At a high level it seems feasible with the risk being performance and software user interaction. On the performance side there is another project (sonaremin) which bundles it and whose author has some headstart in optimizing the build for Raspberry Pi. For the UI, I was thinking using X11 forwarding or VNC would work for building out virtualized euroracks and the Zynthian could be used for layer management with more robust interaction that could be discovered as the project matured.

I’m interested in a couple things. Is this project of interest to the community? It would be easier for me to manage the installation and configuration manually on my box but if this is aligned with and supported by this group I’d take a stab at contributing back. Are there prototypical examples of how to bootstrap this project? The documentation has good pointers but if a subject matter expert could point me in the right direction I would appreciate it.

Any help, pointers or guidance welcome and much appreciated.

Hi @whyjustin, welcome to our casa.

This subject had come up a few times in the past few years. (Search forum for references.) I feel like VCV is an excellent concept which may be implemented well (I haven’t tried it) but kinda sits alongside Zynthian as a different product. It may prove rather challenging to co-host both applications on a single Raspberry Pi, especially when considering resources like CPU, memory, storage, etc. Others may have a different opinion :slight_smile:.

Agreed that it would cannibalize a good deal of the machine’s resources when the layer existed. This could be a project direction question, would Zynthian allow layers that were meant to be part of the multitool but didn’t play nicely with resources. It would seem to me that Pianoteq sets a precedent for this as it is heavily CPU intensive. I can enjoy Pianoteq on Zynthian but if I want to add a few layers I probably shouldn’t include it.

There is a fork of VCVRack named miRack. This one has tweaks for RPi[34]. But the lastcommit was in June 2019.

Using VCVRack on Zynthian seems to be cool, but I think you must have a kind of “player” plugin. The patching on the normal Zynthian 3.5" screen is IMHO not working - only if you have very small fingers. Best way would be a LV2-VCVRack-Player plugin for VCVRack patches…

Regards, Holger

It appears this project is dead in favor of an iOS version the author has pivoted to developing and selling.

My thought would be to utilize a computer or tablet to manage this via VNC or X11 forwarding.

This is a good idea and on the VCV roadmap but will be released as a commercial offering. It may be the best approach but I’d like something accessible for everyone.

While I do control my zynthian mostly via vnc, I think building app support into the zynthian that forces that method as the interface is probably against the ethos of zynth.

Having said that, it is fine for you to do yourself.

Thanks everyone in the community for the information and feedback. For the forum record, it appears without an LV2 plugin or custom development around controlling VCV Rack from Zynthian’s UI this project is a non-starter due to lack of project alignment. In addition, VCV Rack leverages OpenGL 2.0 which makes X11 forwarding a non-starter due to lack of technical feasibility. Cheers!

Perhaps it’s not so difficult. Using the headless mode we could easily create a vcv-player, same as we have for PureData , using a control definition file for every patch, etc .

I don’t know how much CPU it would eat but i suspect a rbpi4 can run most of patches, moreover when no gui has to be rendered.

If someone creates a recipe for installing vcvrack on Zynthian, i would create the basic skeleton for the engine.

Regards!

4 Likes

Just when I thought I could give up. Thanks for the reply @jofemodo. Essentially at that point the workflow you be creating a patch on another computer and uploading it to Zynthian, loading the desired patch via the Zynthian interface, and then using it. With the correct patch, MIDI could be used to control various parameters of the Eurorack modules. I’ll take a look into it when I have some free time.

Note that V2 is not released yet and headless mode it’s not available. We have to wait …

This is the sort of thing you could build using the pinetab married to some sort of expansion board.

Until we have headless mode, I’ve created a PR for v1. It still needs a lot of love but I think will provide the groundwork for the future. VCV Rack loads its patch via a field in the settings.json file (patchPath) so a Zynthian friendly mode where the Zynthian interface selects and loads a patch is possible.

I could use some pointers around the audio configuration as I got a bit lost around the approach and zynthian_autoconnect.py. I’m hoping someone can point me in the right direction. Once I get this right I will focus on audio and UI optimization - it would be great to be able to edit patches remotely via xpra although I’d be happy with creating patches on another computer and loading them into Zynthian.

2 Likes

Might make sense to dedicate a small X86-64 PC to Linux/VCV. This has potential due to Rasperry Pi GPIO and Arduino onboard… https://www.mouser.co.uk/new/seeed-studio/seeed-studio-odyssey-x86j4105-sbcs/ 150 UK pounds… not cheap but good specs if graphics are up to the task… else headless. :slight_smile:

After toying with this for a while, the set up is fairly performant utilizing the Skyler Jack modules for audio. Both the sys and ui PRs need some love but in my opinion this is a viable path forward. I’ve only tested on a Raspberry Pi 4 and understand that there will be considerable performance degradation on a Raspberry Pi 3. If anybody is interested in trying it out and providing feedback, I would love it.

2 Likes

I’ve got this far enough to remove WIP from the PRs. Feel free to provide feedback or use as you wish. Of note, VCV Rack is GPL software although Zynthian is also GPL so it is most likely compatible.

Hi,

This is extremely exciting! VCV Rack running on Zynthian, so I had to give this a try!
VCV Has the official ports of Mutable Instruments’ devices which bring great potential to generative “west coast style” ambient audio synthesis.

I understand this is still WIP/in development and not even merged in a branch, so please don’t follow my footsteps yet…

I’m testing this on a RP4/ Kitv4.

I’m just documenting the process here for those who’d like to try (at their own peril).

  1. I downloaded the install_vcvrack.sh script and ran it. It installed a bunch of packages and 1 customised preset to test.
  2. I downloaded the patch associated with the ui PR and applied it in a new private branch on the zynthian-ui git repository.
  3. Rebooted the zynthian and crossed fingers.

From there I could create a New Special Layer>Virtual VCV Rack and open the preset generative-01.

This gave me this audio output:

I was also able to see the patch by connecting to the Zynthian:

This has huge potential if this could be fully integrated into Zynthian (midi integration etc).
My remarks:

  • From the audio recording you can hear cracks and strange audible artifacts which seem to be related to the CPU load. I tried to ameliorate this by setting the sample rate lower and reducing the Threads to from the external UI, which did not help much. In all cases the CPU load remained fairly high, maxing out all 4 CPU’s. From the logs I could see that there were frequent “Jack Audio XRUN!” messages.
  • Using the remote interface to edit the patches is a bit painful due to the high CPU load.
  • The standard controllers on the Zynthian don’t do anything yet (volume/modulation/pan/sustain), but this could be extended to for example to tame the cpu load by setting the audio quality/cpu usage, in this way possibly even allowing for co-existence with other layers).

Again, this is extremely impressive so far and proves the possibility to integrate VCVRack in Zynthian opening up a whole extra world of sounds! Just the Plaits module alone with an LFO and an Analog Filter and a few extra modules would already make for a very capable hybrid digital-analog synthesizer comparable to Arturia’s Microfreak partly based on Plaits algorithms, but VCV is far more extensible off course, or even combining the two in very interesting ways!

So please, do try to integrate this, but try to find a way to lower the CPU load a bit to avoid the XRUN’s, or if there is any way to tweak the performance further, please do share!

Thank you for developing this integration!

6 Likes

Better to start with simple patches (1 or 2 osc., no FX) and see how far you can get before xruns/glitches creep in. Even on my 4gHz AMD 8800, 16 gB RAM PC, I get a few ‘hiccups’… I think VCV is great… but would not expect a Pi to be able to do more than a few monosynth patches.

I was able to tweak the config a bit and got considerable better results without any reported XRUNS and I couldn’t hear any glitches /for the test patch/:

threadCount=3 (from:2), realTime=true (from:off), sampleRate=32000 (unchanged)

4 threads works as well, but this makes the zynthian very unresponsive in turning nobs, using the webconfig etc so this is certainly not a good option.

There are a few cracks only in the first recording, not live which I suspect are from the volume going in the “red” zone on the first recording, but I didn’t find a way to easily tune down the volume from the Zynthian for this layer.

Modified /zynthian/zynthian-sw/vcvrack.raspbian-v1/settings.json
settings.json (587 Bytes)

Sample music from generative-01 patch, recorded with the Zynthian Audio Recorder :slight_smile:

And here is another generative sonaremin patch:

It appears that recording with the vcv-recorder component would also be a possibility, this renders out the video and audio of the patch glitchfree even if there are audible glitches and xruns, but would obviously use cpu as well, in turn increasing the chances of real-time audible glitches.

I’ve come across some interactive patches as well responding to notes from Midi Channel 1.

4 Likes

I just thought I would mention the existence of another project to run VCV Rack on the RPi: https://community.vcvrack.com/t/the-sonaremin-v1-1-6-now-supports-the-raspberry-pi-4/10056/38.

Rather than fork and rewrite the code as miRack did, sonaremin is much more closely related to VCV Rack. The newest version can be found here: https://github.com/hexdump0815/sonaremin/releases/tag/v1.1.6_8

2 Likes

The install script is using VCV rack v1.1.6_3 (from May 24) from the sonaremin project.

There is a new release available at:
https://github.com/hexdump0815/vcvrack-dockerbuild-v1/releases/download/v1.1.6_5/vcvrack.armv7l-v1.tar.gz (from Aug 25, note this is the 32-bit version)

I just upgraded to v1.1.6_5, it appears to be working at least as well with the same settings.

There is also a 64bit version, which would most certainly help a bit with the performance, but for that we’ll need to wait for the 64bit Zynthian OS.