Login / Register 0 items | $0.00 New @ KVR
soundmodel
KVRian
 
641 posts since 28 May, 2010, from Finland

Postby soundmodel; Wed May 23, 2018 11:44 am Can I embed a Java GUI into a VST some how?

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?
yellowmix
KVRian
 
578 posts since 10 Aug, 2012

Postby yellowmix; Wed May 23, 2018 2:54 pm Re: Can I embed a Java GUI into a VST some how?

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.
soundmodel
KVRian
 
641 posts since 28 May, 2010, from Finland

Postby soundmodel; Thu May 24, 2018 7:36 am Re: Can I embed a Java GUI into a VST some how?

Perhaps this is a simpler path to this:

http://jvstwrapper.sourceforge.net
User avatar
Guillaume Piolat
KVRist
 
159 posts since 21 Sep, 2015, from Grenoble

Postby Guillaume Piolat; Thu May 24, 2018 7:48 am Re: Can I embed a Java GUI into a VST some how?

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).
User avatar
EvilDragon
KVRAF
 
16290 posts since 6 Jan, 2009, from Croatia

Postby EvilDragon; Thu May 24, 2018 7:52 am Re: Can I embed a Java GUI into a VST some how?

I think that's a really bad idea but oh well.
soundmodel
KVRian
 
641 posts since 28 May, 2010, from Finland

Postby soundmodel; Thu May 24, 2018 8:20 am Re: Can I embed a Java GUI into a VST some how?

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?
Xenakios
KVRian
 
1122 posts since 9 Sep, 2005, from Oulu, Finland

Postby Xenakios; Thu May 24, 2018 9:05 am Re: Can I embed a Java GUI into a VST some how?

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...
stratum
KVRAF
 
1796 posts since 29 May, 2012

Postby stratum; Thu May 24, 2018 1:37 pm Re: Can I embed a Java GUI into a VST some how?

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~
mystran
KVRAF
 
4890 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Thu May 24, 2018 2:10 pm Re: Can I embed a Java GUI into a VST some how?

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.
Image <- plugins | forum

Moderator: Moderators (Main)

Return to DSP and Plug-in Development