DownloadNewsSourceForge.netForumContact
Every click supports this project. Thank you.



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 to

develop VST plugins with the Java programming language

It 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

TIPS

SCREENSHOTS

Windows
Various instances of the 3 Demo Plugins (using the Napkin Look and Feel) hosted by VSTHost on Windows Various instances of the 3 Demo Plugins (using the Napkin Look and Feel) hosted by VSTHost on Windows
All 3 Demo Plugs (JayDLay, JayVSTxSynth and DreiNullDrei) hosted by Traction on Windows All 3 Demo Plugs (JayDLay, JayVSTxSynth and DreiNullDrei) hosted by Traction on Windows
All 3 Demo Plugs (2x JayDLay, 1x JayVSTxSynth and 1x DreiNullDrei) hosted by CubaseSX on Windows All 3 Demo Plugs (2x JayDLay, 1x JayVSTxSynth and 1x DreiNullDrei) hosted by CubaseSX on Windows
DreiNullDrei demo synth hosted by VSTHost on Windows DreiNullDrei demo synth hosted by VSTHost on Windows

Mac OSX
Multiple instances of all three demo plugins under Live 7, MAC 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 Various instances of the three demo plugins under Tracktion 3, Mac OSX
Four instances of JayDLay hosted by Melodyne on Mac OSX Four instances of JayDLay hosted by Melodyne on Mac OSX

Linux
All three example plugins hosted by Jost on Linux All three example plugins hosted by Jost on Linux
2x DreiNullDrei, 1x VSTxSynth and 3x JayDLay in energyXT2 on Linux 2x DreiNullDrei, 1x VSTxSynth and 3x JayDLay in energyXT2 on Linux
5x JayDLay using jVSTwRapper as LADSPA plugin in Ardour 5x JayDLay using jVSTwRapper as LADSPA plugin in Ardour

[Other screenshots]
[top]

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: Hosts on Windows: Hosts on Linux:

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].

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 feedback
[top]


Support This Project

SourceForge.net Logo