jVSTwRapper is an easy and reliable Java Wrapper for Steinbergs VST interface.
It enables you to develop VST 2.4 compatible audio plugins and virtual instruments plus user interfaces with the
Java Programming Language on Windows, Linux and Mac OSX. Three Demo Plugins (+src) are included!
INTRO
The Steinberg VST interface technology is used and supported by a large variety of different audio applications on different platforms like Windows, Linux and Mac OS X. This technology is a de facto standard for audio applications, so almost all of them are capable of hosting VST plugins, including the [Audacity] project hostet at sourceforge.net [top]HOW IT WORKS
The Steinberg VST SDK is a free set of C++ classes to develop vst plugins for realtime dsp processing. The jVSTwRapper uses this classes and makes it possible toIt delegates the calls from the VST host system to an java interface and vice versa. So all you have to do is to write a java class which implements the wrapper interface and implement the audio algorithm. Providing a user interface for your audio plugin is done in exacly the same way.
The jVSTwRapper also enables you to write platform independent (mac/win/linux) vst plugins. The same files run, without any additional effort (no need for recompilation, no platform specific GUI, etc.) on all platforms. The wrapper itself is a native compiled binary (.so on linux, .vst bundle on the mac, .dll on windows) that invokes a JVM and delegates native calls to the VST plugin implemented in java[top]
INSTALLATION
- If you dont have java, download it from [http://www.java.com]
- Make sure that you have a correctly installed Java Virtual Machine >= v1.3. To see which version you have, type "java -version" in a commandline window
- [Download] the latest relase (make sure to choose the right platform) as a *.zip file and extract it to your audio apps plugins folder. e.g. /VSTPlugins in Cubase. or /Library/Audio/Plug-ins/VST on Mac OSX
- Start your audio app and enjoy the JayDLay demo plugin :-)
- If you want to use jVSTwRapper plugins in a LADSPA host, simply symlink jvstwrapper.so / libjvstwrapper.jnilib / jvstwrapper.dll to the directory where your LADSPA plug-ins are installed (e.g. /usr/lib/ladspa on linux, ~/Library/Audio/Plug-Ins/LADSPA or /Library/Audio/Plug-Ins/LADSPA on Mac OSX or the /plug-ins folder of your LADSPA capable app (e.g. Audacity) on windows)
TIPS
- Cubase5 users: Please activate "active in background" under "options" in the menue.
- Cubase SX users: Please DEACTIVATE "Plug-in Editors Always on Top" under File->Preferences->VST->Plug-ins in the menu.
- You may also want to take a look at the .ini file to enable the 3 Demo plugins - 1 effect and 2 virtual synthesizers - that now ship with the download.
- In some very rare cases the host crashes when loading the Java GUI. If thats your case, set CloseNativePluginWindow to 0 in the .ini file. If this doesnt solve your problem or you are on Linux / Mac OSX, disable the Java GUI by removing the PluginUIClass value from your plug-ins .ini file
- TAKE A LOOK AT jvstwrapper.ini AND README.html They contain all the information you need to get started.
- Never ever! call System.exit() or use EXIT_ON_CLOSE in .setDefaultCloseOperation() in your GUI. This exits the JVM and all Java plugins currently running. It also very likely crashes the Host application itself
- If you experience any problems, please do not hesitate to ask around in the [forum]
SCREENSHOTS
WindowsMac OSX
![]() |
Multiple instances of all three demo plugins under Live 7, MAC OSX |
![]() |
Various instances of the three demo plugins under Tracktion 3, Mac OSX |
![]() |
Four instances of JayDLay hosted by Melodyne on Mac OSX |
Linux
![]() |
All three example plugins hosted by Jost on Linux |
![]() |
2x DreiNullDrei, 1x VSTxSynth and 3x JayDLay in energyXT2 on Linux |
![]() |
5x JayDLay using jVSTwRapper as LADSPA plugin in Ardour |
USAGE
jVSTwRapper makes Java VST development as easy as possible. just copy and rename the jVSTwRapper.dll to the name of your plugin (e.g. MyPlugin.dll). On the Mac you can also use any name but make sure you leave the .jnilib extension. Also, edit the Info.plist to reflect the new executable name. The name of the wrapper dll will be displayed as your plugin name in the audio app. MAKE SURE to rename the jVSTwRapper.ini to the same name as the dll e.g MyPlugin.ini. Then edit the properties of the .ini file to fit to your Plugins class name, classpath, etc.If you want to disable the custom UI and use the default UI rendered by the host, simply comment out (prefix with #) the PluginUIClass property from the .ini file
To see how development works on the java side, please see the sources of the demo plugins. And if there are still questions left, leave a message at the [forum].
For documentation please use the javadoc which comes with the download. It is also a good idea to download Steinbergs well documented VST [SDK], the method names are the same on the java side. Also, the old VST SDK 2.0 specification contains some really good information to get started with VST. You can download it from [here].
[top]
LADSPA
jVSTwRapper exposes all plugins as VST and LADSPA at the same time. No additional coding or configuration is required. All LADSPA calls are simply translated to corresponding calls of the VST specification. Please note that the LADSPA specification is very basic, it therefore only covers effect plugins (no synthesizers possible) and also lacks support of customs GUIs.If your plugin is of category synthesizer, it wont be available as a LADSPA plugin. That is the reason why of all 3 demo plugins that come with the download, only JayDLay is available via both, LADSPA and VST. JayVSTxSynth and DreiNullDrei are both synthesizers and therefore not available via LADSPA (A LADSPA host will simply ignore these plugins, you will also find an appropriate error message in the _log.txt file) Also, the GUI of a LADSPA effect plugin is always rendered by the host application. This is why it may look different on each host application you use it. Please ask the [forum] if you encounter any problems.
[top]
PERFORMANCE
Performance is a critical thing, especially in realtime applications. And I can say I was really impressed how well the wrapper performs in comparison to native c++ plugins. But first, some more words on performance in general: We can split this issue into 2 categories: The jni and the jvm performance.The JNI performance isnt very important for the overall performance because this is a constant value added to any call done via JNI. And on todays fast cpus this value gets smaller and smaller. Of course, JNI calls bring an extra overhead, but the wrapper tries to minimize it whenever possible by using in-memory caches.
What we can see now is that the beast here really is the jvm performance. And surprisingly, this isnt a problem at all, as the articles linked below proove impressively.
[Java performance]
[Java numbercrunch performance]
So, in theory, we should only see a small (and constant) difference between native and java plugins. And this is exactly what I saw in my tests. I compared the DelayEditGUI example (C++) from Steinbergs VST-SDK and my java port of it (JayDLay). They use exactly the same processing algorithm. On my PII-450 (WinXP, J2SDK1.4.1) the Wavelab performance monitor shows 3% cpu usage with the native, and 4% with the java version. The difference is about 1% (on a PII-450).Try it by yourself. Download the VST SDK linked below and jVSTwRapper from the download page. The JayDLay plugin is the default plugin. Just unzip the donwload to your plugin directory, start your audio app and see the difference. [top]
TESTED HOST APPLICATIONS
Below is a list of host applications that I tested and can confirm that they work with jVSTwRapper. Please keep in mind that this is only the list of my Hosts. jVSTwRapper should work with ANY host application that conforms to Steinbergs VST specification. If you have any problems with a particular host application, please report it to the [forum].Hosts on Mac OSX:
- Ableton Live
- Melodyne
- Traction
- LUNA
- Amadeus II
- Amadeus Pro
- Plogue Bidule
- Spark XL
- Audacity (using jVSTwRapper as LADSPA plugin)
- Any host based on the Max/MSP runtime, e.g.: The Ugly VSTi Interface, VST Shell X, ...
- VSTi Host (this one uses Max/MSP Java (MXJ) and spawns a JVM --> simply put a copy of jVSTsYstem_bin.jar into the folder: "/Applications/VSTi Host/VSTi Host.app/support/java/lib")
- MissWatson
- minihost
- All versions of Cubase and Cubase SX
- WaveLab
- Ableton Live
- Logic
- Acid
- Samplitude
- Traction
- Energy XT and Energy XT2
- FL Studio
- Melodyne
- Sonar
- Chainer
- AudioMulch
- Podium
- Orion Platinum
- VSTHost
- Tobybear Minihost
- Cantabile
- Tunafish
- M-Audio Torq with the Xponent hardware
- Samplitude
- REAPER (Note: This is the first host I found that has a problem with our java GUI --> disable the custom GUI or set AttachToNativeWindow=0 in the .ini file)
- Sony Sound Forge Audio Studio (Note: On display problems, set AttachToNativeWindow=0 in the .ini)
- Adobe Audition (Note: This host doesnt support VST instruments (VSTi), also, only stereo (exactly 2 inputs, 2 outputs) plugins are supported. Please see [this] discussion for details.)
- Jost
- energyXT2
- Renoise
- Ardour (using jVSTwRapper as LADSPA plugin)
- Audacity (using jVSTwRapper as LADSPA plugin)
- Muse (using jVSTwRapper as LADSPA plugin)
- Rezound (using jVSTwRapper as LADSPA plugin)
HOW TO BUILD FROM THE SOURCES
Just do an anon cvs checkout of the cvs head and make sure to register at steinberg and download the current vst sdk [http://www.steinberg.de/324+M52087573ab0.html]Here are the links to [browse] the sources or anonymous cvs [checkout]. [top]
DEBUGGING OF YOUR PLUGIN
jVSTwRapper makes it very convenient to debug your vst plugin while running inside the host application. Take a look at the .ini file, read the documentation there and uncomment the jvm options for debugging. Then use a remote debug client, e.g. the one that comes with [ecplipse] to debug and step through your running plugin. [top]CREATING A MULTI-PLATFORM VERSION OF YOUR PLUGIN
jVSTwRapper is currently available for Windows, Linux and Mac OSX. As VST plugins are native libraries on these platforms, jVSTwRapper provides a native stub (.dll, .so or .jnilib file) that interacts with the java part of the plugin. So, in order to create a version for another platform, download the appropriate jVSTwRapper.zip (that contains a native stub file for a specific platform) from the download page, uncompress the .zip file and replace jVSTeXamples.jar with the .jar file of your plugin. Then edit the .ini file so that your plugin instead of the jVSTwRapper default plugin is loaded. Make sure to keep the directory structure from the .zip file, as some platforms (such as Mac OSX) expect a VST plugin to have a specific directory structure. Thats all, its only a matter of copying some files, no recompilation or dealing with any platform specific APIs is required. You should now be able to load your plugin in your favourite host application.To ease this process, you can automate these steps by installing [maven] and using the example [pom.xml] from the project CVS as a start for your plugin. Simply checkout the jvst_examples module
cvs -d:pserver:anonymous@jvstwrapper.cvs.sourceforge.net:/cvsroot/jvstwrapper login
cvs -z3 -d:pserver:anonymous@jvstwrapper.cvs.sourceforge.net:/cvsroot/jvstwrapper co -P jvst_examples
then download the latest jVSTwRapper binaries from the [download] page and extract them to their corresponding location under the 'dist' directory.
NOTE: please follow the instructions of the HOW_TO.txt files in the directories dist/linux, dist/win and dist/osx.
A simple
cd dist
mvn assembly:assembly
is then enough to create 3 zip files (in directory 'target') containing a version of the JayDLay example plugin for Windows, Mac OSX and Linux.
[top]
IF GARBAGE COLLECTION REALLY IS A PROBLEM FOR YOUR PLUGIN
Consider switching the class-GC off (-Xnoclassgc on a SUN VM) and/or use [javolutions] concept of object recycling. Also, consider switching to the concurrent collector (Enabled using -XX:+UseConcMarkSweepGC) or incremental collector (Enabled using -Xincgc). BEFORE YOU APPLY THESE SWITCHES, profile your jvm and BE CERTAIN, that gc really is the problem.This information here is just for your reference. In my 3+ years of java vst plugin development (and from all the feedback I have received so far) - gc never caused any audio clicks or cracks. I always found the problem to be somewhere in the processing algorithm.
Generally, you shouldnt create ANY objects within any of the process* methods (DONT use the new operator there) because these are called VERY often. [top]
PROJECT URL
[http://www.sourceforge.net/projects/jvstwrapper/]DOWNLOAD
[http://sourceforge.net/project/showfiles.php?group_id=92192]STATUS
Currently the wrapper supports the full vst 2.4 specification and works stable on all major vst hosts. The only thing left out from the 2.3 spec is some surround stuff. If there is demand for it Ill implement it, just let me know if youre interested. If any of you test the wrapper with other audio applications, please report to the [forum] if it works.[top]
FUTURE WORK / KNOWN ISSUES
There are a few things I would like to implement and I would love to have some help from the open-source community. So if you find any of the things below interesting and would like to contribute, please let me [know].- Mac OSX GUI refinement: Mac OSX java GUIs work great when using JRE 1.5.0_06 (Mac OSX >= 10.4.8) and above, but in a separate window. It would be nice to let AWT draw into the native window provided by the host application (like it works already in the windows and linux versions). I am trying my best, but this Carbon/Cocoa/Java integration is quite a challenge. If you have some knowledge in these areas or feel challenged by this task, please let me know.
- Linux Java GUI integration: VST plugin GUI handling differs a lot between Linux VST host applications. Currently, it seems that only Jost does everything in a correct way. If you are using Jost, you can safely set "AttachToNativePluginWindow" to 1 in the .ini, other host applications (such as energyXT2 and Renoise) work okay, however when closing the plugin GUI window, the java window is not hidden and stays visible in the upper left corner of the screen. This does not cause any errors and re-opening the plugin GUI causes the java window to be correctly embedded in the native window again. It is just a bit weird to have an undecorated java window staying there in that corner. So, dont be surprised when using the aforementioned VST host applications and the AttachToNativePluginWindow=1 setting.
- DSSI integration LADSPA works already, but for effect plugins only... DSSI would be the next step for the linux version of the wrapper. There are already some open-source projects (vstserver, dssi-vst) that could serve as a base for this task. So this shouldnt be that much of work. If you would like to contribute in this area, please le me know
OTHER JAVA VST STUFF
[JaVaStYle]If you came here to learn more about java and vst, you may also want to take a look at the [JaVaStYle] Project. This project does exactly the opposite of jVSTwRapper. It is a library that allows you to HOST (native) vst plugins. Except of the wrapping code, this library is also completely written in java - of course. It might be fun to see a jVSTwRapper plugin hosted by JaVaStYle. Just to see if both of the wrapping layers are compatible to each other. If anybody of you already successfully managed to do that, please let me know.
UPDATE: This project disappeared from Sourceforge because of long time of inactivity. You can access the LGPL code from [here]. I can NOT answer any questions regarding this code, this is just for the interested since I occasionally receive some requests about it.
[JVAPTools]
Everybody interested in Java VST development should also definitely take a look at the [JVAPTools] Project. It provides a library and examples for rapid vst-audio-plugin development with Java, based on jVSTwRapper.
The very nice [ScriptEffect] Plug-in (also Java VST) that is part of this package allows you to use a scripting language to prototype audio algorithms. Download it from [here]
[IC.J.VST]
"Intra-Actively Communicating Java VST", a framework on top of jVSTwRapper that allows "plugin instances to exchange data during runtime, for instance to react to each other and adjust to whatever is going on in all tracks of the entire mix" - definitely worth a look, especially if you plan to create vst plugins that interact with each other. 6 plugins already available!
[Pong]
"pong goes beyond the realm of automatic compositions to find a musical creativity expressed within a simple computer game. It is an implementation of the pong game that works as a MIDI instrument. It produces music as you play the game, based on your actions in the game." Download the Pong VST plugin based on jVSTwRapper [here], or play the game online...
[Liquinth a28]
A polyphonic synthesizer based on jVSTwRapper. Martin kindly donated his code to the jVSTwRapper project as another demo synth (thanks a lot!). It is now available via the project [cvs] and also included in the jVSTeXamples.jar binary that ships with the download.
[top]
CONTACT
Please use the [forum] for questions.Or send feedback via

[top]









