Can I embed a Java GUI into a VST some how?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I found a good library that's written in Java and while it has a C++ API, the GUI for it is in Java.

Wanting to avoid rewriting the GUI or parts of it. I was thinking, would it be possible to "host" the GUI somehow inside a C++ VST?

Post

Yes, look up Java Native Interface. Whether it's a good idea is another question.

Could also use a network model, like REST API. Have the Java GUI run as a separate process and talk to the C++ plugin. But that's probably an even worse idea.

Post

Perhaps this is a simpler path to this:

http://jvstwrapper.sourceforge.net

Post

If using JNI, I don't remember a way to directly read from C memory : you have to copy it to the Java heap, and that might even allocate in the process. Having an UI in Java would probably prevent you from having real-time feedback that would fetch a buffer from DSP to UI (for say, the GR curve of a compressor).
Checkout our VST3/VST2/AU/AAX/LV2:
Inner Pitch | Lens | Couture | Panagement | Graillon

Post

I think that's a really bad idea but oh well.

Post

EvilDragon wrote:I think that's a really bad idea but oh well.
It could be that it'd take less time to write the GUI again in C++. Rather than try to host the Java GUI in C++.

What bugs me about VST SDK though is that I don't understand what kind of GUI standards it follows. Like can I write a VST SDK using Qt or something? Or do I need to use some "VST SDK -compatible" GUI SDK?

Post

soundmodel wrote:I don't understand what kind of GUI standards it follows. Like can I write a VST SDK using Qt or something? Or do I need to use some "VST SDK -compatible" GUI SDK?
It's best to use a GUI framework that's designed to be used for plugins. Qt is an example of a framework that is not going to work without major problems.

The usual recommendations : JUCE, IPlug, VSTGUI.

And the Java GUI idea is indeed a bad one...

Post

If anyone knows how to integrate Qt into another GUI framework/application, I would like to know too :)
As far as I know this only can happen with ActiveQt on Windows.
~stratum~

Post

soundmodel wrote: What bugs me about VST SDK though is that I don't understand what kind of GUI standards it follows. Like can I write a VST SDK using Qt or something? Or do I need to use some "VST SDK -compatible" GUI SDK?
Well, the compatibility requirements are basically that it needs to work with the host provided message loop and needs to be able to open your GUI inside a host provided window (ie. you get a HWND or Cocoa view to use as a parent depending on platform). One (or both) of these is usually the main problem with the "big frameworks" as they often like to have full control over the application and that's just not going to work in a plugin.

In contrast the toolkits (eg. Juce, IPlug) that are usually recommended for plugin work have been specifically designed to work in this environment and they make few assumptions about the rest of the application. On top of that they might include work-arounds for various corner cases in various specific hosts, so you potentially save yourself a bunch of troubleshooting.

Post Reply

Return to “DSP and Plugin Development”