Just released a very cool new feature in the soul command-line tool. We had a rudimentary C++ generator in there, but I’ve spent a few weeks pimping it, so that now it can take a SOUL patch and spit out a folder containing a full, ready-to-build, 100% C++ JUCE project.
Double-click the .jucer file to open it in projucer, hit “save” and you can build a VST/AU/AAX/standalone plugin for whatever OS you’re on.
The code it emits is completely dependency-free (except for JUCE of course), and there’s no JIT involved, it’s a pure-C++ version of the SOUL code.
A nice aspect of the code it generates is that it defines a juce::AudioPluginInstance class which you can override to customise it, e.g. you add your own GUI, and I’ve tried to arrange things so that you can customise without having to change anything inside the generated files.
There’s been a fair amount of behind-the-scenes work to get here, and it’s fresh code, so let us know how you get on, and any problems.
Obviously the next step will be for us to add this to the website, so that you can go to https://soul.dev, tinker around to build yourself a patch, then simply download a zip of a JUCE project that can build a native VST of it
Well, the code is easier to write than C++, I guess.
But obviously it’s a chunk of C++ that it spits out, and then gets built as a VST/AU, so it can’t do any of the fancy low-latency/live-reloading/offload-to-other-devices stuff that SOUL itself offers, or anything that’s not possible in a normal plugin.
Think of it more as an intermediate tool to help people get used to writing SOUL while we wait for native hardware/DAW support.
Got the same result with other example soul patches in the official SOUL repository. Following the steps in your post.
I’m particulary confused by the LNK1104 asking for .lib. This doesn’t happen on any of my other projects. Only those created by “soul generate”.
Any help would be immensly appreciated and apologies in advance for my novice c++ knowledge
Downloaded soul 0.9.13.After ensuring no other versions of SOUL are on my pc and adding the install location to PATH, “soul --version” displays:
SOUL version 0.8.0
Build Date: Jun 22 2020 16:21:30
Im assuming given the build date that this is the version 0.9 but the welcome message just needs updating.
I then followed the steps in the readme trying first with JUCE 5.47 and then JUCE 6 getting the same above result for both. I’m opening the project with visual studio 2019 using the built in c++ compiler.
The the soul code Im trying to build are the example patches in the above mentioned fresh install of SOUL. No changes made to the code atall.
This is all im doing:
It looks like the Microsoft compiler is complaining about a zero-length array that we generate in situations where there are no input channels, whereas clang and GCC don’t seem to mind. It’s an easy fix for us to skip generating that array if there are no channels, so will push out a new release soon…
Ok, so the problem turned out to be a stack overflow - this was caused by this patch having a very large state, and the code for clearing the state causing a stack overflow. I’ve fixed this by moving to a different strategy for clearing the state, a simple memset for now in the init() method. There is the possibility that other zeroing operations within the code will likewise cause such an issue, so i’ll work out a general solution (my first attempt was a little ugly so i haven’t moved to this for now).
I’ve pushed a new update to the tools which resolves this issue - give it a try and see if this works for you.
Yep, thats done the trick! PadSynth is up and running in less than 5 clicks. Noticed it’s working with Visual c++ too. Thanks so much for your help Can’t wait to see where you go next with this
We’ll certainly support multiple formats for GUIs for SOUL patches, and will be fairly agnostic about what hosts choose to support, but would expect most people to write it in React or Javascript web-standards, or maybe simple declarative GUI framework using something like Lua.
Are there any example projects that create a GUI for SOUL using any of these alternate methods? Something less complicated than using JUCE Components in C++?