Part 1: Building
Hey! You! Wanna turn your SuperCollider program into a real AU virtual instrument to use in your DAW? Great, then come with me into the depths of C++ sloppiness and clumsiness.
So, once upon.a time there was a project that allowed to run a SuperCollider SC synth server inside an AU plugin. It even ended up in the official SC repositories. But years were passing and dependencies around it slowly mutated, becoming more and more hostile. At some point in time, it stopped producing a valid AU, and later then even stopped building at all. The original author still expresses some interest to the project, last commit was about half year ago, but yet again I’m too anti-social to bother people with my crazy ideas, so I went there myself.
git clone --recursive https://github.com/supercollider/SuperColliderAU
Down below are the steps that fixes problem with building it.
-
At the moment of writing this post, I am on macOS Catalina 10.15.3 (19D76). I do not know how much it is actually important, but nevertheless.
-
It is better to build Supercollider from its standalone repo. Just get the fresh revision and follow the build instructions. Then copy it to /SuperColliderAU/supercollider/build. Revision (22e45f78fb8db8769aea34ce4ce09082917dd40d) worked for me.
-
Go to superCollider submodule and checkout to develop branch. Get some fresh revision, (30205c18a6cb5d74fff775d28469051899a2d0bb) worked for me.
-
On some hosts (Like the one bundled with JUCE as a code example, SuperColliderAU does not get fully initialised on scan, so the scan crushes, when tries to destroy its instance afterwards). If that is your case, edit the SCProcess.cpp file, comment out the mPort->stopAsioThread(); line.
-
By the way, what’s awesome about running a JUCE VST Host through Xcode, you can use debugger on the problematic plugin code, if you have sources and it was compiled with debug symbols.
- Supercollider now uses bundled C++ boost, SupercolliderAU make files are not aware of that. As a workaround:
deadvikki@darkhorse$ brew install boost
6.1. And edited SuperCollierAU CMakeList.txt file, so it searches in my local include paths:
diff --git a/CMakeLists.txt b/CMakeLists.txt index dd3d4c7..b206ac6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,11 +76,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") set(scau_bundle "SuperColliderAU") set(SNDFILE_INCLUDE_DIR ${SC_DIR}/external_libraries/libsndfile/) -set(BOOST_INCLUDE_DIR ${SC_DIR}external_libraries/boost/) +set(BOOST_INCLUDE_DIR /usr/local/include/) set(TLSF_INCLUDE_DIR ${SC_DIR}/external_libraries/TLSF-2.4.6/src/) include_directories(${SC_DIR}/external_libraries - ${SC_DIR}/${BOOST_INCLUDE_DIR} + ${BOOST_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR} ${PTHREADS_INCLUDE_DIR} ${TLSF_INCLUDE_DIR} (END)
- We do not want to use bundled Boost, so we say
cmake -DSYSTEM_BOOST=ON .. make
5.1. It will compile, but the link process will fail, but that’s not fatal
- Re-run make in verbose mode,
make VERBOSE=1
6.1. Manually execute the last command, just edit it a bit. 6.2. Remove
-lboost_system
and add-L /usr/local/lib -framework AppKit
!
Run make again to it can finish copying resource files to build dir.
By the way it screwed up my icu4c vesion , which node relied on. So,
brew info icu4c
brew switch icu4c 64.2
Bottom line: It builds.Currently it does not passes AUVAL checks, thankfully, garbage DAWs like my old trustworthy Tracktion7, do not bother validation. People been reporting that it also work in Reaper.
Problem: it seems that we are not freeing UDP port properly, so within the same host it starts on different port every time. But it might be the nature of UDP ports