Java VST development?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Hi there

i am a newbie to VST coding. i'd liket o know what is the status quo of programming languages suitable for VST.
exisitng percentage stat (i'd guess):
C/C++ (Korg Legacy) ~90%
Delphi(Tobybear) ~9%
Assembler (VAZ Modular) ~1%

lisp, smalltalk, oberon, eiffel, ...: slow


java (+jvstwrapper): ???
i really wonder if java is good enough for VST now.

thank you for comments

Post

I think Java would be too slow for VST development :help:

Post

What about with a JIT compiler?

Post

jtxx000 wrote:What about with a JIT compiler?
Java's not only slow relative to good C/C++ code, it's also a huge memory pig and the garbage collector is a disaster for stuff with hard realtime requirements like a VST. Java's a great language for a lot of things but not for writing VSTs.

Stick with C/C++ with maybe a little judicious assembler.

Post

One of my Java books has a tutorial on how to write a standalone X0X style drum machine.. its near the end of the book and I havent got there yet.. but I plan on tweaking it a bit once I get there :D


I think (please correct me if im wrong) that Arturia's Storm (virtual studio) was coded in java... and it runs many softsynths at once.. so I dont see why it would be a major problem.

Post

VitaminD wrote:One of my Java books has a tutorial on how to write a standalone X0X style drum machine.. its near the end of the book and I havent got there yet.. but I plan on tweaking it a bit once I get there :D


I think (please correct me if im wrong) that Arturia's Storm (virtual studio) was coded in java... and it runs many softsynths at once.. so I dont see why it would be a major problem.
If you can write a VST even remotely in the league of the current good ones in java I'll eat my hat.
Last edited by kuniklo on Tue May 25, 2004 7:15 am, edited 1 time in total.

Post

VitaminD wrote:One of my Java books has a tutorial on how to write a standalone X0X style drum machine.. its near the end of the book and I havent got there yet.. but I plan on tweaking it a bit once I get there :D


I think (please correct me if im wrong) that Arturia's Storm (virtual studio) was coded in java... and it runs many softsynths at once.. so I dont see why it would be a major problem.
Hey there fella. Unfortunately i think you're only half right about storm, i believe that the core engine is C++ and the interface is Java. Thats actually quite a good idea. because UI stuff is pretty damn easy in Java.

Have to concur with the others, although i'm curious myself, its probably a waste of time gong for decent realtime VST plugins etc in Java.

Post

Java can be used for soft real-time application, and medium real-time application, I once read, not hard real-time.
But what is sure is that Java is 80 times slower than... CaML and GCC. So if you really want to write something efficient in Java... Look at Matlab, the GUI is slow, slow and slow. The only things that are fast are FFT because it's based on FFTW, and the other compiled functions...

But I'd like to see a simple plug-in in Java only to know if I'm right or not...

Post

With a JIT, a Java program can be *almost* as fast as a native C++ app, once it has loaded and all the JIT compilation has been performed. However - the JIT compiles classes on the fly, as they are first needed, so the overhead of compiling the classes sometimes costs more than the benefit of the compilation. For a VST, where the same code is exected a bazillion times over and over again, the JIT *ought* to give very good performance.

All this said, the garbage collection issue is a big one. C++ gains most of its strength from its ability to directly address memory, and gives the programmer lots of tools to be able to manipulate pointers and so forth. Java has no pointers and in fact has no addressable memory at all. It's a very pure programming environment - in many ways ideal for most programming tasks - but not really well suited for realtime.

It would be interesting to try though ... :D Maybe I'll give it a whirl ...

Post

amiga909 wrote:Hi there

i am a newbie to VST coding. i'd liket o know what is the status quo of programming languages suitable for VST.
exisitng percentage stat (i'd guess):
C/C++ (Korg Legacy) ~90%
Delphi(Tobybear) ~9%
Assembler (VAZ Modular) ~1%
FLS is also written in Delphi, and Synth1 in assembler.

I don't know by experience if Java is capable (facility or performance-wise) ... try it?

Doug
Logic is a pretty flower that smells bad - Spock, in "I, Mudd"

For a good time click http://www.belindabedekovic.com/video_fl_en.htm

Post

For midi stuff, Java's pretty good. Line6's customtone.com uses java, and Line6 edit was also made in Java. For audio, it is possible to have realtime processeing, but it's probably going to be slower than in C++. Maybe with excelsior JET?

Post

Just a quick thought here, not to put anyone off trying this java thing because i'm curious, but...

basic C code, which will form the basis of many plugins (OO skeleton withstanding) is pretty similar to java code. What i'm saying is that if you have decent enough grasp of java to attempt writing a DSP plugin, then you are almost certainly capable of making the transition to coding in C/C++.

I think many programmers will agree with me that its all about syntax, and the bottom line is that coding in many languages is much of a muchness, its just getting familiar with the slightly different syntax.

I know that once i learned to program to a reasonable level in one language, the transition to another is not so hard at all.

Anyway, good luck to whoever tries the java thing, and keep us updated, i can't be the only one here who'd love to know how far this can be taken :)

Post

I'll buy a beer to the first person who codes a VST in Lisp :-)
helge

HELP! MY TYPEWRITER IS BROKEN!
E E CUMMINGS

Post

I wonder if you could write one in python? :?

Post

texture wrote:I wonder if you could write one in python? :?
Writing a VST in any language that doesn't compile to native code and allow pretty fine-grained control of memory management and reliable realtime response is a waste of time.

Writing Java & Python code puts the bread on my table but I know their limitations well enough to know when they're not appropriate.

Post Reply

Return to “DSP and Plugin Development”