Jules, Native vst on linux?


#1

Jorgen of EnergyXT, having ported ext to linux is sort of pushing for native linux VSTs. Might be a good addition to JAP.

It doesn’t affect me personally in any way, but it might attract devs to JUCE.


#2

Interesting - are there actually any linux hosts that use VST?


#3

Aside from EnergyXT… don’t think so.


#4

actually there isn’t any host allowing use of native vst (since from what i’ve heard only a few vst have be ported to linux).
but support for windows native vst is possible, and a reality (not for all complex plugins tho):
with fst (http://www.joebutton.co.uk/fst/) is possible hosting windows native vst plugins to be used under the jack environment,
with qtractor (http://qtractor.sourceforge.net/qtractor-index.html) or seq24 (http://filter24.org/seq24/) is possible make song with them…
if you are looking for a complete environment then lmms (http://lmms.sourceforge.net/) is a good starting app for making noize with vsts…

just waiting for some native port of good vst plugins out there…


#5

ah i forgotted http://dssi.sourceforge.net/download.html


#6

the post is not too old, and i think it worth mention my new project going on…

http://www.anticore.org/jucetice

here you can find plugin ports for linux (windoze open source vsts), some plugins made by me with juce… and a fresh new open source vst host for linux made with juce that hosts perfectly vsts plugins made with the plugin framework !!

yay !


#7

Hi,

had a quick look into the juceVstWrapper.cpp, there seems to be some (preliminary?) Linux support in it. Is this already usable? If so, has someone already successfully compiled the demo vst for linux?

Greetings,
NothanUmber

P.S.: to kraken: did you build the eqinox plugin with the juce audiowrapper or did you “just” use juce for gui stuff?


#8

yeah i’m the one struggling for adding vst capability for the wrapper on linux. The one in the current release is usable, unless you can live with some little gui glitches and an overall slugginess of the gui (mainly related to how the message thread is handled).

The new version that i’ve worked out is pretty more stable and it covers 98% of compatibility with the other vst platform standards. Anyway it requires some little tweaks in the juce_linux_Windowing.cpp code (thanx to jules!).
The uber latest pack for making plugins is the JOST sources… in there you find:

  • modified juce codebase for behave under a host enviroment in linux
  • jucetice basic AudioPlugin / ParameterManager and utils stuff
  • updated wrappers for VST, and the new one Jack-Audio-Connection-Kit wrapper…

probably the best is start from that until we settle the main codebase to be compliant. i’ll provide a demo project soon !

ps. i’ve wrote eqinox with the same package, so with juce + juce wrapper + jucetice utils…


#9

Just started a rather naive approach to try to compile the demo vst for linux:

cd ~/dev/JuceAudioPlugin/demo/build/VST_Linux
./compile.sh

compile.sh looks like that:

#!/bin/bash
export JUCEDIR=~/dev/juce
export JUCEAUDIOPLUGINDIR=…/…/…
export VSTDIR=~/dev/vstsdk2.4
if [ ! -e build ]
then
mkdir build
fi
g++ -I$JUCEAUDIOPLUGINDIR/demo/src -I$VSTDIR -I$JUCEDIR -I$JUCEAUDIOPLUGINDIR/wrapper -I$JUCEAUDIOPLUGINDIR/wrapper/formats/VST -DLINUX -L$JUCEDIR/bin -ljuce $JUCEAUDIOPLUGINDIR/demo/src/DemoEditorComponent.cpp $JUCEAUDIOPLUGINDIR/demo/src/DemoJuceFilter.cpp $JUCEAUDIOPLUGINDIR/wrapper/juce_AudioFilterBase.cpp $JUCEAUDIOPLUGINDIR/wrapper/juce_AudioFilterEditor.cpp $JUCEAUDIOPLUGINDIR/wrapper/formats/VST/juce_VstWrapper.cpp -o build/juceVSTDemo.so

Compiles but is not linkable.
If I link with libjuce main is defined twice (presumably it’s in libjuce.a and Juce_VstWrapper.cpp) but otherwise all the juce utility classes will be missing, wouldn’t they? How is that supposed to be compiled?

Greetings,
NothanUmber


#10

Thanks for the suggestions kraken,

jost compiles just fine here. (In order to start it I had to comment out an assert in juce_Desktop.cpp (in line 85), otherwise neither jost nor any other juce application is starting on my box - am I the only one with that problem?)

Tried to compile the demo that comes with the juce wrapper against the enhanced jost code base - with the same result (still can’t link).

Greetings,
NothanUmber


#11

gave it another try, it’s compiling now (linking agains libc and X11 etc. would have been a good idea… :oops: ). In order to resolve the dependencies I had to include half of your vsthost though - the result has a size of about 2.1 MB and can’t be loaded with neither jost (the “open” button is greyed out) nor energyXT. The vst plugin doesn’t need hosting capabilities itself so presumably most of the jost sources shouldn’t be taken in - just couldn’t get it to compile otherwise… Any ideas?

Here the new config.sh (still a rather “brute force” approach…):

#!/bin/bash
export JUCEDIR=~/dev/jost/juce
export JUCELIBDIR=~/dev/jost/bin
export JUCEAUDIOPLUGINDIR=~/dev/jost/
export VSTDIR=~/dev/vstsdk2.4
if [ ! -e build ]
then
mkdir build
fi
export INCLUDES="-I$JUCEAUDIOPLUGINDIR/demo/src -I$VSTDIR -I$JUCEDIR -I$JUCEAUDIOPLUGINDIR/wrapper -I$JUCEAUDIOPLUGINDIR/plugins/Jost/src -I$JUCEAUDIOPLUGINDIR/jucetice -I$JUCEAUDIOPLUGINDIR/vst/source/common"
export DEFINES="-DLINUX -DCONFIG=Release"
export LIBS="-L$JUCELIBDIR -ljuce -lfreetype -lX11 -lasound -lc"

g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/demo/src/DemoEditorComponent.cpp -o build/DemoEditorComponent.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/demo/src/DemoJuceFilter.cpp -o build/DemoJuceFilter.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/wrapper/juce_AudioFilterBase.cpp -o build/juce_AudioFilterBase.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/wrapper/juce_AudioFilterEditor.cpp -o build/juce_AudioFilterEditor.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/wrapper/formats/VST/juce_VstWrapper.cpp -o build/juce_VstWrapper.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/jucetice/jucetice_Parameter.cpp -o build/jucetice_Parameter.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/jucetice/jucetice_OpenSoundController.cpp -o build/jucetice_OpenSoundController.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/jucetice/controls/jucetice_ImageSlider.cpp -o build/jucetice_ImageSlider.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/jucetice/dependancies/libsocket/UDPSocket.cpp -o build/UDPSocket.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/jucetice/dependancies/libosc/OSCMessage.cpp -o build/OSCMessage.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/jucetice/dependancies/libosc/OSCBundle.cpp -o build/OSCBundle.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/jucetice/dependancies/libosc/OSCTimeTag.cpp -o build/OSCTimeTag.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/HostCallback.cpp -o build/HostCallback.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/HostFilterComponent.cpp -o build/HostFilterComponent.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/HostFilterBase.cpp -o build/HostFilterBase.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/Config.cpp -o build/Config.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/VstPlugin.cpp -o build/VstPlugin.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/TrackComponent.cpp -o build/TrackComponent.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/plugins/VstPluginNativeEditor.cpp -o build/VstPluginNativeEditor.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/plugins/VstPluginExternalEditor.cpp -o build/VstPluginExternalEditor.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/plugins/VstPluginWindowContent.cpp -o build/VstPluginWindowContent.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/plugins/VstPluginWindowTabPanel.cpp -o build/VstPluginWindowTabPanel.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/lookandfeel/JostLookAndFeel.cpp -o build/JostLookAndFeel.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/components/Dock.cpp -o build/Dock.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/model/Commands.cpp -o build/Commands.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/model/MultiTrack.cpp -o build/MultiTrack.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/model/Track.cpp -o build/Track.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/ui/plugins/VstPluginWindow.cpp -o build/VstPluginWindow.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/plugins/Jost/src/resources/Resources.cpp -o build/Resources.o
g++ build/DemoEditorComponent.o build/DemoJuceFilter.o build/juce_AudioFilterBase.o build/juce_AudioFilterEditor.o build/VstPluginWindow.o build/juce_VstWrapper.o build/HostFilterComponent.o build/HostFilterBase.o build/TrackComponent.o build/Config.o build/Resources.o build/VstPlugin.o build/VstPluginNativeEditor.o build/VstPluginExternalEditor.o build/VstPluginWindowContent.o build/Commands.o build/JostLookAndFeel.o build/jucetice_Parameter.o build/MultiTrack.o build/jucetice_OpenSoundController.o build/Track.o build/Dock.o build/HostCallback.o build/jucetice_ImageSlider.o build/UDPSocket.o build/OSCMessage.o build/VstPluginWindowTabPanel.o build/OSCBundle.o build/OSCTimeTag.o $LIBS -ljuce -o build/juceVSTDemo.so


#12

Next chapter from the ongoing novel:

Went back to the original juce version now so I could get it to compile without the dependencies. Unfortunately the result can’t be loaded from jost/energyXT (it’s somewhat smaller now, about 1.5 MB)

Build file:

#!/bin/bash
export JUCEDIR=~/dev/juce
export JUCELIBDIR=~/dev/juce/bin
export JUCEAUDIOPLUGINDIR=~/dev/JuceAudioPlugin
export VSTDIR=~/dev/vstsdk2.4
if [ ! -e build ]
then
mkdir build
fi
export INCLUDES="-I$JUCEAUDIOPLUGINDIR/demo/src -I$VSTDIR -I$JUCEDIR -I$JUCEAUDIOPLUGINDIR/wrapper -I$JUCEAUDIOPLUGINDIR/plugins/Jost/src -I$JUCEAUDIOPLUGINDIR/jucetice -I$JUCEAUDIOPLUGINDIR/vst/source/common"
export DEFINES="-DLINUX -DCONFIG=Release"
export LIBS="-L$JUCELIBDIR -ljuce -lfreetype -lX11 -lasound -lc -lXext -lXinerama"

g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/demo/src/DemoEditorComponent.cpp -o build/DemoEditorComponent.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/demo/src/DemoJuceFilter.cpp -o build/DemoJuceFilter.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/wrapper/juce_AudioFilterBase.cpp -o build/juce_AudioFilterBase.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/wrapper/juce_AudioFilterEditor.cpp -o build/juce_AudioFilterEditor.o
g++ -c $INCLUDES $DEFINES $JUCEAUDIOPLUGINDIR/wrapper/formats/VST/juce_VstWrapper.cpp -o build/juce_VstWrapper.o
g++ build/DemoEditorComponent.o build/DemoJuceFilter.o build/juce_AudioFilterBase.o build/juce_AudioFilterEditor.o build/juce_VstWrapper.o $LIBS -ljuce -o build/juceVSTDemo.so


#13

argh… in order to compile a shared lib perhaps it would be a good idea to put the “-shared” option into the game… :oops:

so for completeness, in order to get a proper plugin replace the last line of the (non jost) description above with this one:

g++ build/DemoEditorComponent.o build/DemoJuceFilter.o build/juce_AudioFilterBase.o build/juce_AudioFilterEditor.o build/juce_VstWrapper.o $LIBS -shared -o build/juceVSTDemo.so

Now the original version can be loaded in both jost(*) and energyXT, and shows the keyboard gui. Very nice indeed!

If I load the version that was compiled against the jost sources I get - surprise surprise - a vst version of jost running in energyXT (so obviously the jost identity of the plugin won :slight_smile: ). Not what I expected but nonetheless nice, so jost can essentially be used as a subhost!

Greetings,
NothanUmber

(*) edit: in contrary to what I wrote before it’s working fine in jost, just didn’t realize that one has to click into the panel in order to open the gui… :oops:


#14

yeah that for sure, vsts are shared libraries after all :slight_smile:

if you use premake, a lot of things are handled by the machanism, and you can replicate your premake config file for a lot of other plugins.
that’s my premake for eqinox, and can be used for a lot of plugins just changing the project name and directories :slight_smile:

project.name = "eqinox"
project.bindir = "../../../../bin"
project.libdir = "../../../../bin"

project.configs = { "Debug", "Release" }

package = newpackage()
package.name = "eqinox"
package.target = "eqinox"
package.kind = "dll"
package.language = "c++"

package.objdir = "intermediate"
package.config["Debug"].objdir   = "../../../../bin/intermediate/XEQDebug"
package.config["Release"].objdir = "../../../../bin/intermediate/XEQRelease"

package.config["Debug"].defines         = { "LINUX=1", "DEBUG=1", "_DEBUG=1" }
package.config["Debug"].buildoptions    = { "-O0 -fPIC -ggdb -g3 -Wall -fexceptions" }

package.config["Release"].defines       = { "LINUX=1", "NDEBUG=1" }
package.config["Release"].buildoptions  = { "-O2 -fPIC -s -funroll-loops -fomit-frame-pointer -fexceptions" }

package.includepaths = {
    "/usr/include",
    "/usr/include/freetype2",
    "../../../../juce",
    "../../../../juce/src",
    "../../../../jucetice",
    "../../../../wrapper",
    "../../../../vst",
    "../../src"
}

package.libpaths = {
    "../../../../bin",
    "/usr/X11R6/lib/",
    "/usr/lib"
}

package.config["Debug"].links = {
    "freetype", "pthread", "X11", "asound", "juce_debug"
}

package.config["Release"].links = {
    "freetype", "pthread", "X11", "asound", "juce"
}

package.files = {
    matchrecursive (
        "../../../../jucetice/*.h",
        "../../../../jucetice/*.cpp",
        "../../../../jucetice/*.c"
    ),
    matchfiles (
        "../../../../wrapper/*.h",
        "../../../../wrapper/*.cpp",
        "../../../../wrapper/formats/VST/*.cpp"
    ),
    matchrecursive (
        "../../src/*.h",
        "../../src/*.cpp"
    )
}

maybe can come in handy.

yeah that’s basically the point (a thing i will do when jost will grow): it is built on top of the juce AudioPluginFramework !


#15