Csound Csound-dev Csound-tekno Search About

Re: It is that time of year

Date1998-12-19 14:13
FromMichael Gogins
SubjectRe: It is that time of year
Regarding the single file format and other changes to Csound, I think the
"official" distribution could use some of what I have done. I will be
posting a new AXCsound to the incoming ftp directory in the next few days,
which includes all of these changes.

The main point of this work is that it makes the existing Csound work
re-entrantly from Java, and also makes Csound easier to use as a component
to plug into other programs.

I have changed the central Csound build from a process (a program with a
main() function) to a static library with a C++ "Csound" class. The changes
involved in doing this are minimal, but it is the starting point for
everything else I have done.

(AXCsound now uses Maldonado's code, JCsound now uses your code.)

I changed the tags in the all-in-one file format to the following. It's
simpler, everything is just what Csound already uses, there's no
"arrangement" tag. Other code I've done reads the  element and
passes it on to the existing parsing code in main.c.



Any legal Csound command line.


Any legal Csound orc file.


Any legal Csound sco file.



99999

Binary data...



The only thing that remains to be done for JCsound is to build the
JCsound_Csound shared library for other platforms besides Windows. But this
could be done later; all the work I describe here could be put into the
public build and sources today without changing or breaking anything else
about Csound.

The Csound.h header file goes:

#ifndef CSOUND_H
#define CSOUND_H
// S I L E N C E
// A system for making music on computers by means of software alone.
// Copyright (C) 1998 by Michael Gogins. All rights reserved.
// This software is licensed under the GNU General Public License.
// P U R P O S E
// Implements SynthesizerInterface using "public-domain" Csound.
// Normally, the user will call play() as the thread routine of
// a rendering thread, and call cleanUpAfterRendering() if the
// thread is stopped before it returns.
#include "SynthesizerInterface.h"
#include 

class Csound : public SynthesizerInterface
{
public:
 // SynthesizerInterface functions.
 virtual ~Csound(void);
 virtual void setLogCallback(void (*function)(const char *logMessage));
 virtual int read(const char *xmlFilename);
 virtual int command(const char *text);
 // Initializes for rendering,
 // and calls the old Csound main() with stored command options.
 virtual int play(void);
 virtual int stop(void);
 // Other public functions.
 // Default constructor, sets default log callback.
 Csound();
 // Called to set command options from command line.
 static void command(int argc, const char **argv);
 // Prepares Csound for rendering.
 static void initializeForRendering();
 // Closes all open files and other resources after rendering.
 static void cleanUpAfterRendering();
 // Parses a Csound XML file:
 // calls initializeForRendering(),
 // and calls command() to set options.
 static int read(FILE *file);
private:
 static void logCallback(const char *message);
 static int argc;
 static char **argv;
};

#endif // CSOUND_H

I then used the Csound class in two different ways:

To re-implement the command line consound program:

#include 

void main(int argc, const char* argv[])
{
 Csound csound;
 csound.command(argc, argv);
 csound.play();
}

To implement a new Java native interface for Csound:

/**
 *  J C S O U N D
 * 

* A Java native interface (JNI style) to "public-domain" Csound. * Copyright (C) 1998 by Michael Gogins. All rights reserved. *

* This software is licensed under the terms of the GNU General Public License. * It is distributed without charge. */ #include "JCsound_Csound.h" #include /** * The actual instance of the Csound API. */ static Csound csound; #ifdef __cplusplus extern "C" { #endif /** * Called by Csound to print all messages directly to the console of the * Java virtual machine; equivalent to System.err.println(String message). */ void CSLogCallback(const char *message) { fprintf(stderr, message); } #ifdef __cplusplus }; #endif /* * Class: JCsound_Csound * Method: setCommand * Signature: (Ljava/lang/String;)V */ JNIEXPORT void JNICALL Java_JCsound_Csound_setCommand(JNIEnv *jniEnv, jobject object, jstring string) { const char *commandLine = jniEnv->GetStringUTFChars(string, 0); csound.command(commandLine); jniEnv->ReleaseStringUTFChars(string, commandLine); } /* * Class: JCsound_Csound * Method: run * Signature: ()V */ JNIEXPORT void JNICALL Java_JCsound_Csound_run(JNIEnv *jniEnv, jobject object) { csound.play(); } /* * Class: JCsound_Csound * Method: closeAfterRendering * Signature: ()V */ JNIEXPORT void JNICALL Java_JCsound_Csound_stop(JNIEnv *jniEnv, jobject object) { csound.stop(); } This implements the Java class: package JCsound; /** * Provides a low-level Java interface to a native implementation of "public-domain" Csound. * @version Silence 1.0. An extensible system for making music on computers by means of software alone. * @author Copyright (C) 1998 by Michael Gogins. All rights reserved. *

* gogins@nyc.pipeline.com *
* This software is licensed under the terms of the GNU General Public License. * It is distributed without charge. * @comment * Run javah -jni JCsound.Csound on the compiled class file to generate * JCsound_Csound.h for building the JCsound_Csound.dll or .so shared library. */ public class Csound implements Runnable { /** * The name of the Csound shared library. */ static final String libName = "JCsound_Csound"; /** * A Java thead is used to make the native code platform-neutral. */ static Thread thread = null; /** * The default constructor tries to load the Csound shared library. */ public Csound() throws Unsat isfiedLinkError, SecurityException { System.loadLibrary(libName); //{{INIT_CONTROLS //}} } /** * Sets the Csound command line. */ public final native void setCommand(String command); /** * If one does not already exist, * creates a new thread to run Csound. */ public final void start() { stopRunning(); if(thread == null) { thread = new Thread(this); thread.start(); int currentPriority = thread.getPriority(); int maxPriority = thread.getThreadGroup().getMaxPriority(); int newPriority = ((maxPriority - currentPriority) / 2) + currentPriority; thread.setPriority(newPriority); } } /** * Runs Csound with the current command line. * The standard Csound messages are printed to the Java console. * The rendering thread can be suspended, resumed, and stopped, * and a new rendering thread can then be started * without reloading the Csound shared library. * Note that although Csound runs in a separate thread, * it is not possible for a process to run * more than one Csound thread at the same time. */ public final native void run(); /** * Suspends the thread, if any, running Csound. */ public final void suspend() { if(thread != null) { thread.suspend(); } } /** * Resumes the thread, if any, running Csound. */ public final void resume() { if(thread != null) { thread.resume(); } } /** * Stops the thread running Csound * and removes the thread object. */ public final void stopRunning() { stop(); thread = null; } /** * Causes any thread running Csound * to return after rendering its current event. */ protected native void stop(); } -----Original Message----- From: jpff@maths.bath.ac.uk To: csound@maths.ex.ac.uk Date: Friday, December 18, 1998 8:41 AM Subject: It is that time of year >Message written at 18 Dec 1998 12:54:53 +0000 > >..when the university closes for over a week, and the students go >away. I am planning what to do in the dark days (with apologies to >southern hemisphere readers). So far i have collected the following >tasks: > >Invesigate reported bugs: > Schedule not always working > Scheduel not being re-initable > lfo option for sine not working > Various MIDI problems > >Work in progress: > Single file operation, and argument decode > >New opcodes: > I have two or three half written or less > MIDI sliders to do > >I have written to one or two people who I know are involved in opcode >updating. The purpose of this message is to ask if there are any >other known prpoblems or deficiencies to add to my list, with no >commitment or promises of course -- I do have a paper to write for >algebra by early next year as well as lectures to write. > >Also, if you have local fixes which have not been sent to teh list or >to me please now is teh time. > >==John   Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa10388; 19 Dec 98 14:05 GMT Received: from [144.173.6.14] (helo=exeter.ac.uk) by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2) for jpff@maths.bath.ac.uk id 0zrMzx-0003Ef-00; Sat, 19 Dec 1998 14:04:49 +0000 Received: from noether [144.173.8.10] by hermes via SMTP (OAA00824); Sat, 19 Dec 1998 14:02:05 GMT Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 19 Dec 1998 14:01:52 GMT Received: from camel8.mindspring.com [207.69.200.58] by hermes via ESMTP (OAA00287); Sat, 19 Dec 1998 14:01:51 GMT Received: from axe (user-38ld070.dialup.mindspring.com [209.86.128.224]) by camel8.mindspring.com (8.8.5/8.8.5) with SMTP id JAA03488; Sat, 19 Dec 1998 09:01:47 -0500 (EST) Message-ID: <005501be2b59$ced98c40$e08056d1@axe> From: Michael Gogins To: csound@maths.ex.ac.uk, jpff@maths.bath.ac.uk MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos Cc: Gabriel Maldonado , Richard Boulanger Subject: Re: It is that time of year Date: Sat, 19 Dec 1998 09:13:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: owner-csound-outgoing@maths.ex.ac.uk Precedence: bulk Regarding the single file format and other changes to Csound, I think the "official" distribution could use some of what I have done. I will be posting a new AXCsound to the incoming ftp directory in the next few days, which includes all of these changes. The main point of this work is that it makes the existing Csound work re-entrantly from Java, and also makes Csound easier to use as a component to plug into other programs. I have changed the central Csound build from a process (a program with a main() function) to a static library with a C++ "Csound" class. The changes involved in doing this are minimal, but it is the starting point for everything else I have done. (AXCsound now uses Maldonado's code, JCsound now uses your code.) I changed the tags in the all-in-one file format to the following. It's simpler, everything is just what Csound already uses, there's no "arrangement" tag. Other code I've done reads the element and passes it on to the existing parsing code in main.c. Any legal Csound command line. Any legal Csound orc file. Any legal Csound sco file. 99999 Binary data... The only thing that remains to be done for JCsound is to build the JCsound_Csound shared library for other platforms besides Windows. But this could be done later; all the work I describe here could be put into the public build and sources today without changing or breaking anything else about Csound. The Csound.h header file goes: #ifndef CSOUND_H #define CSOUND_H // S I L E N C E // A system for making music on computers by means of software alone. // Copyright (C) 1998 by Michael Gogins. All rights reserved. // This software is licensed under the GNU General Public License. // P U R P O S E // Implements SynthesizerInterface using "public-domain" Csound. // Normally, the user will call play() as the thread routine of // a rendering thread, and call cleanUpAfterRendering() if the // thread is stopped before it returns. #include "SynthesizerInterface.h" #include class Csound : public SynthesizerInterface { public: // SynthesizerInterface functions. virtual ~Csound(void); virtual void setLogCallback(void (*function)(const char *logMessage)); virtual int read(const char *xmlFilename); virtual int command(const char *text); // Initializes for rendering, // and calls the old Csound main() with stored command options. virtual int play(void); virtual int stop(void); // Other public functions. // Default constructor, sets default log callback. Csound(); // Called to set command options from command line. static void command(int argc, const char **argv); // Prepares Csound for rendering. static void initializeForRendering(); // Closes all open files and other resources after rendering. static void cleanUpAfterRendering(); // Parses a Csound XML file: // calls initializeForRendering(), // and calls command() to set options. static int read(FILE *file); private: static void logCallback(const char *message); static int argc; static char **argv; }; #endif // CSOUND_H I then used the Csound class in two different ways: To re-implement the command line consound program: #include void main(int argc, const char* argv[]) { Csound csound; csound.command(argc, argv); csound.play(); } To implement a new Java native interface for Csound: /** * J C S O U N D *

* A Java native interface (JNI style) to "public-domain" Csound. * Copyright (C) 1998 by Michael Gogins. All rights reserved. *

* This software is licensed under the terms of the GNU General Public License. * It is distributed without charge. */ #include "JCsound_Csound.h" #include /** * The actual instance of the Csound API. */ static Csound csound; #ifdef __cplusplus extern "C" { #endif /** * Called by Csound to print all messages directly to the console of the * Java virtual machine; equivalent to System.err.println(String message). */ void CSLogCallback(const char *message) { fprintf(stderr, message); } #ifdef __cplusplus }; #endif /* * Class: JCsound_Csound * Method: setCommand * Signature: (Ljava/lang/String;)V */ JNIEXPORT void JNICALL Java_JCsound_Csound_setCommand(JNIEnv *jniEnv, jobject object, jstring string) { const char *commandLine = jniEnv->GetStringUTFChars(string, 0); csound.command(commandLine); jniEnv->ReleaseStringUTFChars(string, commandLine); } /* * Class: JCsound_Csound * Method: run * Signature: ()V */ JNIEXPORT void JNICALL Java_JCsound_Csound_run(JNIEnv *jniEnv, jobject object) { csound.play(); } /* * Class: JCsound_Csound * Method: closeAfterRendering * Signature: ()V */ JNIEXPORT void JNICALL Java_JCsound_Csound_stop(JNIEnv *jniEnv, jobject object) { csound.stop(); } This implements the Java class: package JCsound; /** * Provides a low-level Java interface to a native implementation of "public-domain" Csound. * @version Silence 1.0. An extensible system for making music on computers by means of software alone. * @author Copyright (C) 1998 by Michael Gogins. All rights reserved. *

* gogins@nyc.pipeline.com *
* This software is licensed under the terms of the GNU General Public License. * It is distributed without charge. * @comment * Run javah -jni JCsound.Csound on the compiled class file to generate * JCsound_Csound.h for building the JCsound_Csound.dll or .so shared library. */ public class Csound implements Runnable { /** * The name of the Csound shared library. */ static final String libName = "JCsound_Csound"; /** * A Java thead is used to make the native code platform-neutral. */ static Thread thread = null; /** * The default constructor tries to load the Csound shared library. */ public Csound() throws Unsat isfiedLinkError, SecurityException { System.loadLibrary(libName); //{{INIT_CONTROLS //}} } /** * Sets the Csound command line. */ public final native void setCommand(String command); /** * If one does not already exist, * creates a new thread to run Csound. */ public final void start() { stopRunning(); if(thread == null) { thread = new Thread(this); thread.start(); int currentPriority = thread.getPriority(); int maxPriority = thread.getThreadGroup().getMaxPriority(); int newPriority = ((maxPriority - currentPriority) / 2) + currentPriority; thread.setPriority(newPriority); } } /** * Runs Csound with the current command line. * The standard Csound messages are printed to the Java console. * The rendering thread can be suspended, resumed, and stopped, * and a new rendering thread can then be started * without reloading the Csound shared library. * Note that although Csound runs in a separate thread, * it is not possible for a process to run * more than one Csound thread at the same time. */ public final native void run(); /** * Suspends the thread, if any, running Csound. */ public final void suspend() { if(thread != null) { thread.suspend(); } } /** * Resumes the thread, if any, running Csound. */ public final void resume() { if(thread != null) { thread.resume(); } } /** * Stops the thread running Csound * and removes the thread object. */ public final void stopRunning() { stop(); thread = null; } /** * Causes any thread running Csound * to return after rendering its current event. */ protected native void stop(); } -----Original Message----- From: jpff@maths.bath.ac.uk To: csound@maths.ex.ac.uk Date: Friday, December 18, 1998 8:41 AM Subject: It is that time of year >Message written at 18 Dec 1998 12:54:53 +0000 > >..when the university closes for over a week, and the students go >away. I am planning what to do in the dark days (with apologies to >southern hemisphere readers). So far i have collected the following >tasks: > >Invesigate reported bugs: > Schedule not always working > Scheduel not being re-initable > lfo option for sine not working > Various MIDI problems > >Work in progress: > Single file operation, and argument decode > >New opcodes: > I have two or three half written or less > MIDI sliders to do > >I have written to one or two people who I know are involved in opcode >updating. The purpose of this message is to ask if there are any >other known prpoblems or deficiencies to add to my list, with no >commitment or promises of course -- I do have a paper to write for >algebra by early next year as well as lectures to write. > >Also, if you have local fixes which have not been sent to teh list or >to me please now is teh time. > >==John   Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa10576; 19 Dec 98 16:56 GMT Received: from [132.162.1.220] (helo=mercury.cc.oberlin.edu) by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2) for jpff@maths.bath.ac.uk id 0zrPfi-0003LS-00; Sat, 19 Dec 1998 16:56:07 +0000 Received: from localhost by oberlin.edu (PMDF V5.1-12 #29794) with SMTP id <0F48001011PZJ7@oberlin.edu> for jpff@maths.bath.ac.uk; Sat, 19 Dec 1998 11:56:23 -0500 (EST) Date: Sat, 19 Dec 1998 11:56:23 -0500 (EST) From: Peter Blasser Subject: Re: It is that time of year In-reply-to: <005501be2b59$ced98c40$e08056d1@axe> To: Michael Gogins Cc: csound@maths.ex.ac.uk, jpff@maths.bath.ac.uk, Gabriel Maldonado , Richard Boulanger Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII What purpose, other than nice wrapping, does the JCsound library link serve? Can't you just start a process in Java, and call Csound? It seems like this might be a little faster, too, because it would use the OS's threading, instead of Java's. -Pete   Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11168; 20 Dec 98 0:15 GMT Received: from [207.69.200.30] (helo=smtp0.mindspring.com) by shaun.maths.bath.ac.uk with esmtp (Exim 1.92 #2) for jpff@maths.bath.ac.uk id 0zrWWj-0004jT-00; Sun, 20 Dec 1998 00:15:18 +0000 Received: from axe (user-38ld21g.dialup.mindspring.com [209.86.136.48]) by smtp0.mindspring.com (8.8.5/8.8.5) with SMTP id TAA14146; Sat, 19 Dec 1998 19:15:06 -0500 (EST) Message-ID: <001501be2baf$7bbce240$308856d1@axe> From: Michael Gogins To: Peter Blasser Cc: csound@maths.ex.ac.uk, jpff@maths.bath.ac.uk, Gabriel Maldonado , Richard Boulanger MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos Subject: Re: It is that time of year Date: Sat, 19 Dec 1998 19:27:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Yes, you can start a process in Java and call Csound. But the process is not faster, it's slower. This is because the library gets loaded once and used many times, while the process gets loaded every time it's run. The other purposes are: (a) It's easier to use JCsound from Java, because you don't need to start a process and call Csound. (b) You can pause and resume, or stop and restart, JCsound. (c) JCsound comes with a GUI (CsoundManager). (d) CsoundManager, in turn, comes with APIs for building, managing, saving, and loading Csound files. (e) JCsound and CsoundManager plop into other Java programs, so all of a sudden they have the most widely used really powerful software synthesizer under their programmatic control. -----Original Message----- From: Peter Blasser To: Michael Gogins Cc: csound@maths.ex.ac.uk ; jpff@maths.bath.ac.uk ; Gabriel Maldonado ; Richard Boulanger Date: Saturday, December 19, 1998 11:56 AM Subject: Re: It is that time of year >What purpose, other than nice wrapping, does the JCsound library link >serve? Can't you just start a process in Java, and call Csound? It seems >like this might be a little faster, too, because it would use the OS's >threading, instead of Java's. > >-Pete >   Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11174; 20 Dec 98 0:16 GMT Received: from [144.173.6.14] (helo=exeter.ac.uk) by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2) for jpff@maths.bath.ac.uk id 0zrWXb-0003e2-00; Sun, 20 Dec 1998 00:16:11 +0000 Received: from noether [144.173.8.10] by hermes via SMTP (AAA02203); Sun, 20 Dec 1998 00:15:33 GMT Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 20 Dec 1998 00:15:16 GMT Received: from smtp0.mindspring.com [207.69.200.30] by hermes via ESMTP (AAA10893); Sun, 20 Dec 1998 00:15:14 GMT Received: from axe (user-38ld21g.dialup.mindspring.com [209.86.136.48]) by smtp0.mindspring.com (8.8.5/8.8.5) with SMTP id TAA14146; Sat, 19 Dec 1998 19:15:06 -0500 (EST) Message-ID: <001501be2baf$7bbce240$308856d1@axe> From: Michael Gogins To: Peter Blasser Cc: csound@maths.ex.ac.uk, jpff@maths.bath.ac.uk, Gabriel Maldonado , Richard Boulanger MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos Subject: Re: It is that time of year Date: Sat, 19 Dec 1998 19:27:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: owner-csound-outgoing@maths.ex.ac.uk Precedence: bulk Yes, you can start a process in Java and call Csound. But the process is not faster, it's slower. This is because the library gets loaded once and used many times, while the process gets loaded every time it's run. The other purposes are: (a) It's easier to use JCsound from Java, because you don't need to start a process and call Csound. (b) You can pause and resume, or stop and restart, JCsound. (c) JCsound comes with a GUI (CsoundManager). (d) CsoundManager, in turn, comes with APIs for building, managing, saving, and loading Csound files. (e) JCsound and CsoundManager plop into other Java programs, so all of a sudden they have the most widely used really powerful software synthesizer under their programmatic control. -----Original Message----- From: Peter Blasser To: Michael Gogins Cc: csound@maths.ex.ac.uk ; jpff@maths.bath.ac.uk ; Gabriel Maldonado ; Richard Boulanger Date: Saturday, December 19, 1998 11:56 AM Subject: Re: It is that time of year >What purpose, other than nice wrapping, does the JCsound library link >serve? Can't you just start a process in Java, and call Csound? It seems >like this might be a little faster, too, because it would use the OS's >threading, instead of Java's. > >-Pete >   Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa12031; 20 Dec 98 11:19 GMT Received: from [144.173.6.14] (helo=exeter.ac.uk) by shaun.maths.bath.ac.uk with esmtp (Exim 1.92 #2) for jpff@maths.bath.ac.uk id 0zrgtE-0005BZ-00; Sun, 20 Dec 1998 11:19:12 +0000 Received: from noether [144.173.8.10] by hermes via SMTP (LAA09345); Sun, 20 Dec 1998 11:17:54 GMT Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 20 Dec 1998 11:17:42 GMT Received: from f81.hotmail.com [207.82.250.187] by hermes via SMTP (LAA08472); Sun, 20 Dec 1998 11:17:41 GMT Received: (qmail 18210 invoked by uid 0); 20 Dec 1998 11:17:10 -0000 Message-ID: <19981220111710.18209.qmail@hotmail.com> Received: from 193.74.7.113 by www.hotmail.com with HTTP; Sun, 20 Dec 1998 03:17:09 PST X-Originating-IP: [193.74.7.113] From: david ds To: csound@maths.ex.ac.uk Subject: any exciting sound xperiments ?? Date: Sun, 20 Dec 1998 03:17:09 PST Mime-Version: 1.0 Content-Type: text/plain Sender: owner-csound-outgoing@maths.ex.ac.uk Precedence: bulk Hello, I was wondering if anyone did some exciting new sound experimenting... i'm interested in textural experiments, drones... Also "movement" things like abstract speech, interactive soundelements that react with each other... David ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com

Date1998-12-19 16:56
FromPeter Blasser
SubjectRe: It is that time of year
What purpose, other than nice wrapping, does the JCsound library link
serve?  Can't you just start a process in Java, and call Csound?  It seems
like this might be a little faster, too, because it would use the OS's
threading, instead of Java's.  

-Pete