Notes on native Linux VSTs (May 2011)

In 424, all the sample code was written with VST in mind, not LADSPA. While VST support is fairly widespread in Windows and Mac OSX, Linux support isn't necessarily obvious. Here is how I set things up so that I could work on the CCRMA workstations:

First, you need a Linux VST host. I used jost-v0.5.4, which at the time of writing may be found here:

Scroll down to "Changelog / Downloads:" to find binary and source links.

Once you have this set up, you need to be able to compile linux VSTs. You need the SDK for this. There is no way around accepting the Steinberg terms and conditions like everyone else in the course. So go ahead and do that.

We were using verison 2.4 of the VST SDK. It seems to be compatible with the binary version of Jost from the above link, even though I think that was built with 2.3 in mind. If you build from source it shouldn't be a problem; just use the appropriate headers. If you want to use 2.3 you may have to do some URL mangling to find it, and you will find that that you will have to change several things in the source code provided in class to get things to compile. I had no issues using 2.4.

In any event, once you have the SDK set up you can start with one of the templates from the assignment (I used the mac templates) and instead of using the project files, use a makefile like the following (replace "Effect" in two places below with the name of the source file you are using):


VPATH = source vst_sdk/public.sdk/source/vst2.x

CC = g++
CC_FLAGS = -Wall -O2 -D__cdecl="" -Ivst_sdk

	Effect.o \
	audioeffect.o \
	audioeffectx.o \
	vstplugmain.o \

	${CC} -fPIC -DPIC -shared ${CC_FLAGS} -o ${TARGET} ${OBJ_FILES}

.c.o : 
	${CC} ${CC_FLAGS} -c $<

	${CC} ${CC_FLAGS} -c $<

clean :
	rm -f ${TARGET}
	rm -f ${OBJ_FILES}
	rm -f *~
	rm -f source/*~

Some explaination is in order... the VPATH will set things up so that make can find all your files assuming you put the effects files under source and the VST SDK under vst_sdk like the example projects expect. The -D__cdecl="" is to fix a problem where a flag gets defined even though it causes problems in the linux environment; by license we are not allowed to modify Steinberg's source code but we can use the preprocessor to take care of it. The rest is pretty standard stuff (flags in the target rule are for making shared object files, other rules are generic compilation rules, etc). You might want to add a dependency between Effect.c and Effect.h but I usually just make clean when I change co-dependant header files and these projects are very small so it's usually pretty quick to do so.

If you run into problems, make sure you're using the right version of the SDK and also check that all the files are in the right location. You shouldn't have to do more than drop the same files and folders into vst_sdk as a mac/windows user would.

If all goes well you should be able to load up the plugin in Jost and connect inputs and outputs to it using Jack. You can set up Audacity to send and record directly to/from it in Audacity's preferences.

You should also be able to cross-compile Windows VSTs and use dssi-vst to host them via Wine but I didn't put in the effort to do this. Ardour should be able to use dssi-vst to host Windows VST plugins also.