Hi Panos, I would generalize to say that you could probably do everything you would need in both Java and Python. If you're wondering about differences between the two, I would say for smaller projects, Python is fantastic, but for larger projects, I would prefer Java. The reason for this preference is not so much the language but the tools: due to the nature of the language, Java has some of the best tools available for programming. Integrated Development Environments like Eclipse or Netbeans can give you tremendous power over your code in terms of refactoring (i.e. decide to move a method from one class to a another, you can tell the IDE to do it for you and all references are automatically updated), have tools like code-completion and documentation lookup as you code, and many other features. On the other hand, it is generally faster to code in a scripting language like Python and also faster to read code in Python that Java, which are real factors, but the size of the project and large-scale comprehension is also important. That said, I'll say that I use Java to program blue, but when composing with blue, I use Python to script musical algorithms (I have embedded a Java version of a Python interpreter within blue). The speed at which one can experiment and the small size of musical algorithms make Python the perfect choice when doing music work for me, while doing a large application like blue I feel Java is the better candidate due to the tool support, the speed at which it runs, type safety, etc. If you try both, my guess is that you would find working with Python is much quicker to just get up and going and faster for experimenting with a small idea, while Java takes much more work to get a project setup and going. However, if you're going to work on a long-term project, those differences quickly fade away and long term maintenance of the project becomes a more pressing issue. Another issue besides language issues you might think about is runtime characteristics. Java runs generally about a 1/2 to 1/3 the speed of C code, while Python generally clocks in about 1/10 the speed of C. This is a generalization, and due to things like using native libraries from Python some things in Python won't seems slow. It just depends on where the bulk of your computing is, whether in python code or in the libraries. For a lot of cases, both are "fast enough", but if your algorithms are complex, running either in Java or writing a native lib in C for python may be solutions. Besides that are threading issues. Python has a Global Interpreter Lock which has limitations (others more knowledgeable may chime in; there are discussions on the the GIL in the mailing list archives), but threaded programming in Java has perhaps a higher learning curve but no limitations like GIL as most Java runtimes map Java threads to native threads. Both are good solutions in that they are cross-platform and I think both are very strong candidates for long-term value: you're very likely to be able to run your work years from now. Both are disciplined in the evolution and have strong backing by very large businesses which I believe will help make your work last long into the future. For Java examples, there are two articles from the Journal: http://www.csounds.com/journal/2006summer/SliderDemo.html http://www.csounds.com/journal/issue5/HPKcomposer.html I haven't been following the API and if there have been any changes that would make the two articles out of date, but if there were changes they would be pretty small and the articles above would still apply. Hope that helps! steven On Dec 11, 2007 12:21 AM, Panos Katergiathis wrote: > Hello all > > For a while, i've been studying java and python, trying to become fluent > in these languages, having a sole purpose in mind : the construction of > a system able to produce generative music via midi or csound (and > learning some oo programming along the way). > > So, i feel i am ready to start experimenting and the questions are: > > a) i assume it is possible to "drive" csound from java and/or python, in > real time, yes? > > b) if so, are there reasons (apart from personal ones) to choose among > these languages for such a task? > > c) can someone point me to tutorials for this, that is, driving csound > from python or java? (hint: easy ones are preffered at this point) > > d) is anyone else currently involved in such activities, at a level > similar to mine? > > Thank you all in advance > > Panos > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >