[music-dsp] DSP Application Development for Win
gogins at pipeline.com
Sun Jan 20 09:50:46 EST 2002
I have extensive experience with C, C++, and Java, both on my day job as
a software engineer and in my vocation as a computer music composer and
Java is less messy than C++, but no less inconsistent "under the
covers." In spite of that, I can write the same functionality in Java
about 3 times faster than I can in C++. This is mainly due to the fact
that Java compiles much faster than C or C++, so the repeated cycles of
edit/compile/test speed up drastically. It is also due to the fact that
Java comes with a huge package of pretty good classes for all purposes,
especially including GUI construction. And finally, Java can easily load
classes by name at run time, something that can be done with C++ only by
dint of writing special functions and libraries such as COM or the VST
On the other hand, the same functionality runs 3 to 5 times faster in
C++ than in Java.
The same functionality in C++ and C? The same speed, basically, if you
avoid late binding (in other words, if the compiler does not have to
type cast pointers to instances of objects with virtual functions at run
time). Better yet, templates as found in the Standard C++ Library or the
Standard Template Library run as fast as C.
As a result of this, I use Java for compositional software where speed
is not critical, and C++ with template collections for synthesis and
signal processing software where speed is critical.
If I had to choose just ONE language, it would be C++.
If the standard C++ library had dynamic class loading and some sort of
built in GUI library, there would be no real reason to use Java.
From: owner-music-dsp at shoko.calarts.edu
[mailto:owner-music-dsp at shoko.calarts.edu] On Behalf Of Bob Cain
Sent: Sunday, January 20, 2002 1:48 AM
To: music-dsp at shoko.calarts.edu
Subject: [music-dsp] DSP Application Development for Win
> The main reason to use C++ is to leverage GUI libs PowerPlant (Mac) or
> MFC (VC++/Win). Otherwise, you might as well look into Java,
> Objective-C, or C#, depending what you're doing.
I've sorta wondered about taking the Java path. Is it any less messy
and inconsistent than C++?
I take it from what you say that there is no MFC for Java. If there is
and if the Java language is better and if I can interface to high
performance DLL's for the number crunching it might be the way to go to
get a GUI driven DSP application built and debugged quickly.
Performance hardly matters for pushing buttons, moving sliders, updating
displays and selecting from lists.
It looks to me that the best of all worlds would be a fully cross
platform solution like Java/wxWindows, call it wxJava, but the wxWindows
people don't mention Java in their plans at all. There seems to be some
"Things should be described as simply as possible, but no simpler."
To contribute your unused processor cycles to the fight against cancer:
dupswapdrop -- the music-dsp mailing list and website: subscription
info, FAQ, source code archive, list archive, book reviews, dsp links
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
More information about the music-dsp