BTW, VSTPlugin can now be compiled for Apple M1, with a plugin bridge for 64-bit Intel plugins!
Unfortunately, I donât have access to an M1 (yet), so I couldnât really test it myself, but a few kind souls have done it for me. For some it seemed to work, others have experienced issues. Iâd love to hear more reports!
The binary seems to be running really well in SC 3.12.
I also tried using it in a standalone I have of SC 3.6 but get an error about ERROR: API Version Mismatch: VSTPlugin.scx . Do you think it would be possible to use it if I build it against the SC 3.6 source code or is the API Version Mismatch referring to something else? I am on OS X 10.14 if that makes any difference.
Iâm giving it a try now and got a fatal error: 'sndfile.h' file not found. do you know what to do with that?
Here is the process that got me there with the full error at the bottom:
$ cmake .. -DPD=OFF -DSC_INCLUDEDIR=/Users/martin/Downloads/supercollider-3.6 -DSC_INSTALLDIR=/Users/martin/scwork/Extensions
-- Project: vstplugin
-- Build type: Release
-- LOGLEVEL: 2
-- Build with VST2 support
-- VST2DIR: /Users/martin/Downloads/vstplugin-master/vst/VST_SDK/VST2_SDK
-- Build with VST3 support
-- VST3DIR: /Users/martin/Downloads/vstplugin-master/vst/VST_SDK/VST3_SDK
-- Enable plugin bridge
-- ---
*** VSTPlugin ***
-- SC_INCLUDEDIR: /Users/martin/Downloads/supercollider-3.6
-- SC_INSTALLDIR: /Users/martin/scwork/Extensions
-- SUPERNOVA: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/martin/Downloads/vstplugin-master/build
$ cmake --build . -j -v
//lots of compiling code and then this:
In file included from /Users/martin/Downloads/vstplugin-master/sc/src/VSTPlugin.cpp:1:
In file included from /Users/martin/Downloads/vstplugin-master/sc/src/VSTPlugin.h:3:
In file included from /Users/martin/Downloads/supercollider-3.6/include/plugin_interface/SC_PlugIn.hpp:24:
In file included from /Users/martin/Downloads/supercollider-3.6/include/plugin_interface/SC_PlugIn.h:28:
/Users/martin/Downloads/supercollider-3.6/include/plugin_interface/SC_InterfaceTable.h:35:10: fatal error: 'sndfile.h' file not
found
#include <sndfile.h>
^~~~~~~~~~~
1 error generated.
make[2]: *** [sc/CMakeFiles/VSTPlugin.dir/src/VSTPlugin.cpp.o] Error 1
make[1]: *** [sc/CMakeFiles/VSTPlugin.dir/all] Error 2
make: *** [all] Error 2
Thanks for helping with this, I know next to nothing about using cmake and building source code, just stumbling through examples from the web
Where/how exactly do I put the -DNO_LIBSNDFILE ?
While looking for solutions I found libsoundfile in â/external libraries/â path in the sc3.6 source and tried to add it to the searchpath of cmake with -DADDITIONAL_PATH but that didnât work.
My main use of SC is a standalone of 3.6 with an extensive GUI. Itâs a sound design / live performance tool for my theater work that has just grown bigger with time and I havenât seen much reason to try and make a new standalone from the new IDE yet. I do quite like how in my standalone, which is plain GUI on launch, I can just cmd+N and get a code window if I need to adjust or add some code somewhere.
Iâve actually just recently started to properly explore the new (to me) IDE and seeing whatâs been developing, like your plugin - and it made me want to convert some max patches I have that are relying on VST plugins to SC. Iâm quite fed up with apps/runtimes made from old max versions that doesnât work on newer systems etc. If I get them to SC I know they will be good for the future and not locked behind some proprietary walls
It is on my to-do list now to try making a standalone from the latest build though
This should do the trick: cmake -DCMAKE_CXX_FLAGS="-DNO_LIBSNDFILE" ..
Alternatively, you can set the CPPFLAGS environment variable (i.e. export CPPFLAGS=-DNO_LIBSNDFILE) before running cmakefor the first time. (If you already have run cmake, just delete the build folder.)
Tough luck. Seems like SC 3.6 is missing some member functions in the C++ wrapperâŚ
Actually, I just realized that you can use the SC 3.7 or 3.8 header files, they should be backwards compatible with SC 3.6 and they donât have any of the problems above.
By this do you mean to build with the 3.7 or 3.8 source or should I replace some files in 3.6 with files from one of them? What files would that be in case?
I just tried to build with 3.7 and it finished building But it gave me errors in SC3.6 when executing the examples in VSTPluginController help file:
SynthDef:insert
Synth("insert" : 1000)
ERROR: couldn't find SynthDef 'insert' in global SynthDescLib!
RECEIVER:
class VSTPluginController (0x10e8973c0) {
instance variables [19]
name : Symbol 'VSTPluginController'
nextclass : instance of Meta_VSTPluginDesc (0x10ea83dc0, size=19, set=5)
superclass : Symbol 'Object'
subclasses : instance of Array (0x10f30f480, size=1, set=2)
methods : instance of Array (0x10e897540, size=118, set=7)
instVarNames : instance of SymbolArray (0x10e897dc0, size=21, set=4)
classVarNames : nil
iprototype : instance of Array (0x10e897f40, size=21, set=5)
cprototype : nil
constNames : instance of SymbolArray (0x10e8981c0, size=1, set=2)
constValues : instance of Array (0x10e898280, size=1, set=2)
instanceFormat : Integer 0
instanceFlags : Integer 0
classIndex : Integer 324
classFlags : Integer 0
maxSubclassIndex : Integer 325
filenameSymbol : Symbol '/Applications/SamplerCentral 2.6.app/Contents/Resources/SCClassLibrary/Extensions/VSTPlugin/classes/VSTPluginController.sc'
charPos : Integer 0
classVarIndex : Integer 660
}
CALL STACK:
MethodError:reportError 0x1279190a8
arg this = <instance of MethodError>
Nil:handleError 0x127919418
arg this = nil
arg error = <instance of MethodError>
Thread:handleError 0x127917ec8
arg this = <instance of Thread>
arg error = <instance of MethodError>
Object:throw 0x127917738
arg this = <instance of MethodError>
Meta_VSTPluginController:prFindPlugins 0x128079528
arg this = <instance of Meta_VSTPluginController>
arg synth = <instance of Synth>
arg synthDef = nil
var desc = nil
var metadata = nil
var plugins = nil
Meta_VSTPluginController:new 0x128079658
arg this = <instance of Meta_VSTPluginController>
arg synth = <instance of Synth>
arg id = nil
arg synthDef = nil
arg wait = -1
var plugins = nil
var desc = nil
var info = nil
< closed FunctionDef > (no arguments or variables)
Interpreter:interpretPrintCmdLine 0x128079928
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "~fx = VSTPluginController(~s..."
var doc = <instance of CocoaDocument>
Process:interpretPrintCmdLine 0x127918448
arg this = <instance of Main>
For advice: [http://supercollider.sf.net/wiki/index.php/MethodError]
After some digging, it seems that in 3.6 Synth.defName returns a String while in later versions it returns a Symbol. I added asSymbol to the instances of synth.defName in the VSTPluginController class and now it is indeed working
Just to report on the final success - Iâve now managed to build it with Xcode 9.4 with VST2, VST3 and 32bit support and it works great. If you or anyone else using SC3.6 want a copy, let me know.
Thanks again Christof for the help and a great plugin!
Is there any way to use the following plugins in SuperCollider via VSTPlugin v0.5.4?
-> a VSTPluginController
WARNING: 'WaveShell1-VST 14.0' is neither an existing plugin name nor a valid file path.
ERROR: couldn't open 'WaveShell1-VST 14.0'
-> a VSTPluginController
'/Library/Audio/Plug-Ins/VST/Kontakt.vst' is black-listed.
ERROR: couldn't open 'Kontakt'
They are all black-listed:
VSTPlugin.search;
searching in '/Users/prko/Library/Audio/Plug-Ins/VST'...
found 0 plugins
searching in '/Library/Audio/Plug-Ins/VST'...
'/Library/Audio/Plug-Ins/VST/Kontakt.vst' is black-listed.
'/Library/Audio/Plug-Ins/VST/ValhallaShimmer_x64.vst' is black-listed.
'/Library/Audio/Plug-Ins/VST/WaveShell1-VST 14.0.vst' is black-listed.
found 0 plugins
searching in '/Library/Audio/Plug-Ins/VST3'...
'/Library/Audio/Plug-Ins/VST3/Dexed.vst3' is black-listed.
'/Library/Audio/Plug-Ins/VST3/Kontakt.vst3' is black-listed.
'/Library/Audio/Plug-Ins/VST3/ValhallaShimmer.vst3' is black-listed.
'/Library/Audio/Plug-Ins/VST3/WaveShell1-VST3 14.0.vst3' is black-listed.
found 0 plugins
Hey, these plugins should work, donât know whatâs going wrong⌠Please open a ticket at Issues ¡ Pure Data libraries / vstplugin ¡ GitLab and letâs continue there. The first thing you can do is clear the plugin cache, make a new search and post the console output. Also provide your OS version and SC version.