achim wrote:Hi Masi,
both are mobile platforms. It's not that surprising they share some limitations, right?
it is not suprising, but it is not self-evident either. Instead of running many apps and giving each only maybe 50 MB, it could be possible to run less apps and allowing a single app to use more RAM. I just did not know how Android handles this. Nor do I know how Windows 8 behaves in this respect.
Regarding Java, the answer is yes and no. Opus #1 is based on FluidSynth (http://fluidsynth.sourceforge.net/
), basically a software implementation of a soundfont soundcard - in C++. The UI, event routing, etc. is done in Scala.
An elegant solution. I did similar experiments with early versions of timidity many years ago, but there did not exist sound fonts of a quality like nowadays, so I did not pursue this and never created a GUI for it.
I think though it should be possible to implement something similar completely in Java. I know, many developers think Java is slow etc. But actually, it depends on the virtual machine and the dalvik implementation in recent android versions is acceptably fast (current desktop Java vm's are fast too by the way).
As long as one can avoid heavy object creation, it could work. But I doubt that Java can compete with Objective-C for applications like this.
Scala by the way is typically as fast as or just slightly slower than Java. I choose it mainly out of curiosity and because features like traits, closures etc. seemed to be handy. That said, I currently would not recommend Scala for Android apps, because there are some problems related to Scala on Android: the Scala library is too huge for Android (meaning there has to be some treeshaking as part of every build), compile times are slower than Java, the tooling is not quite on par yet, ... However, when those limitations some day become irrelevant, Scala will definitively be my preferred choice. On the language level its clearly better than Java.
Scala seems to be an interesting language. As I like Java, I always wanted to look at Scala also, but never found the time.