[CM] Re: Common Music and Csound 5
Tue, 11 Oct 2005 06:03:24 -0500
On Oct 10, 2005, at 2:38 PM, Michael Gogins wrote:
> Thanks for your prompt and helpful reply.
> I may leave the C++ binding out -- I was under the impression from
> (only) looking at SWIG that C++ was a better way to bind. The
> procedural interface in Python works fine now like this:
> cs = csound.csoundCreate()
> Presumably the Lisp version would be roughly as simple -- cs here is a
> pointer to Csound.
As you will probably find out nothing is simple in Lisp ffi work since
ffis are not covered in the language spec. but cffi will probably be
the closest you can get to "simple"!
> It does sound like the best thing for me to do is provide the CFFI
> interface. What do you need to do to make this interface accessible
> from CM?
Nothing special needs to happen. You could modularize your Csound glue
code as a Lisp package called Csound (or whatever) and then "export"
your API for other programs to use. That way your code will be a
generic Lisp API to Csound that any Lisp program could load, it
shouldnt have to know anything about CM. Then I (or maybe you and I...)
would add new CM input/output stream support based on your packge. This
is how I treat systems like CLM, CMN, Fomus, Midishare etc and it seems
to work well.
> As for Gauche, it doesn't seem to run on Windows, so it's out.
I think there is an mingw version, but I dont knwo if it works:
its a binary, so if you have mingw you can install and try it out.