platform choice

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown platform choice

by Phil Burk-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For music experimentation, I like to use Java.

I find that I can get performance that is about 80% of 'C'. That's
enough for my applications. Who cares whether I use 8% or 10% of the
CPU? (Although, yes, there is a big difference between 90% and 112%!)

Another nice thing about Java is that you can use Eclipse as an IDE. The
refactoring tools in Eclipse make programing a delight. Eclipse is free.

   http://www.eclipse.org

Also Java is a real industrial strength programming language. So you
will be developing useful skills if you ever have to get a real job. ;-)

One downside to Java is that you can not use SIMD intrinsics like you
can in 'C'. So if you need to really crank some numbers then I recommend
'C' or C++ with SIMD. Note that use of SIMD is not portable across CPUs.

Another plus to using Java is that it is cross platform so you can build
an app with a GUI, multi-threading, and audio output and it will work on
Windows, Mac, and Linux without even recompiling.  You can even make an
Applet and post it on the web.

I wrote a library called JSyn for music synthesis. I started in 1997. In
those days I had to use native JNI code in 'C' to get audio output and
fast low level synthesis. But with the HotSpot JVM the performance of
Java has greatly improved. And JavaSound is nearly adequate. The native
JNI code is a real pain to maintain. So I am converting all my projects
to pure Java.

What ever you use, have fun making music.

Phil Burk
www.softsynth.com



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp links
http://music.columbia.edu/cmc/music-dsp 
http://music.columbia.edu/mailman/listinfo/music-dsp

Re: platform choice

by Thomas Strathmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Another plus to using Java is that it is cross platform so you can build
> an app with a GUI, multi-threading, and audio output and it will work on
> Windows, Mac, and Linux without even recompiling.  You can even make an
> Applet and post it on the web.

That is true and certainly a point in favor of Java (as a platform). But
in the wild you sometimes might want to use MIDI I/O together with
sample playing. If using MIDI is even a remote possibility I would from
personal experience with severe cross-platform issues advise against
using Java. There are certainly ways to make it work on most platforms,
but it requires more work than necessary if the Java platform were truly
cross-platform all the way down (excepting JNI).

        Thomas
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp links
http://music.columbia.edu/cmc/music-dsp 
http://music.columbia.edu/mailman/listinfo/music-dsp