[CM] FFI for Csound 5

Michael Gogins gogins@pipeline.com
Wed, 19 Oct 2005 21:58:20 -0400


I have created an experimental CLisp FFI file for Csound 5, which is in 
SourceForge CVS for csound5. You can exercise this by installing the current 
version of Csound 5. In the csound5 directory, execute "clisp 
examples/test.lisp".

I am just a beginner at this, and I plan to replace the CLisp FFI with CFFI. 
Still, I would appreciate it if some of you would look over the test.lisp 
and csound.lisp files and give me some feedback.

Csound obviously works well enough with CM as it is. The direct interface 
will not at first add a lot, though it should in the long run.

The main improvement in the short run will be the ability to run Csound in a 
separate thread, stop it in mid-rendering, and restart it. It should also be 
possible to start Csound performing at any point in the score. It will also 
be possible to embed Csound instrument definitions in the LISP code and to 
otherwise build up CSD files.

I suppose the next step would be a csd.lisp along the lines of sco.lisp, 
with support for the direct interface, stopping and restarting, and seeking 
in the score. I'm not a good enough LISP programmer right now to do this, 
though.

It is a problem for me that my main platform is Windows (that might change, 
but not right now), because CLisp does not appear to support threads, so I 
can't test the stopping and re-starting, etc. Is there another Windows LISP 
that runs CM that supports threads?

Thanks for any help you can provide,
Mike