[CM] Common Music and Csound 5

Rick Taube taube@uiuc.edu
Tue, 11 Oct 2005 06:29:21 -0500

> So ... Rick ... how difficult would it be to put the CM GUI up on 
> Clisp or Guile?

Over the past two years it seems CLisp development has really been 
cooking, they now have a good ffi, callback support and it looks like 
they are working on native os threads too. So theoretically the GUI 
would work right now if there were a Clisp ffi binding for it.
But rather than writing a clisp specific ffi, if Lambda-GTK generated a 
CFFI backend then CM's gui code could use that to run in all 4 lisps 
(openmcl, sbcl, cmucl and clisp). At that point I would convert CMs 
other ffi's (Portmidi and Midishare) to CFFI, and then require that 
CFFI be installed before CM is compiled.

So thats the way to go I think, provided that CFFI can actully do the 
things that GTK requires,  like refereneceing included structs, setting 
slots in included structs (widget.rectangle.x), slots with arrays of 
pointers. If CFFI is strong enough, then it probably wouldnt be too 
much work to take the existing lambda-gtk backend for cmu/sbcl and 
change its output statements to output CFFI definitions rather than 
SBCL definitions. Its just a small matter of someone rolling up their 
sleeves and doing it.

Scheme is another story. Stklos, Guile and Gauche all have built in GTK 
apis, but as far as I know there is no SFRI for a common scheme FFI. 
This means someone would have to simply choose one, then take the CM 
gui sources and convert them to Scheme using either Guile or Gauche orr 

> Michael Gogins wrote:
>> I will undertake a Lisp or Scheme binding for Csound 5 so that the 
>> Csound API can be called natively from Common Music.
>> Before I do this, I would like to know which version of Scheme or 
>> Lisp I should target. I will be doing the development work on Windows 
>> and Linux. Rick Taube's book comes with CLisp for Windows and this 
>> also can be used on OS X and Linux, so I would guess this is the best 
>> target.  CLisp runs Common Music just fine on my PC.
>> I do not have time to maintain multiple bindings, so I need to know 
>> the best compromise.
>> Unfortunately, the most mature SWIG facilities for Lisp are actually 
>> for Guile and MzScheme (both Scheme). On my PC, Guile does not run 
>> and building it requires many dependencies, which I can obtain if 
>> consensus favors Guile over CLisp.
>> As part of this work, I will be moving the C++ form of the Csound API 
>> from the CsoundVST project into the Csound API library proper, and 
>> also moving the Python wrappers.
>> This will NOT introduce any additional dependencies in the Csound API 
>> library build except for SWIG, and I can book in the generated 
>> wrapper code so that even SWIG is not required for the normal build.
>> Please advise me which is the best version of Lisp or Scheme to use 
>> for Common Music and the Csound API.
>> I would like to finish this work before Csound 5 achieves release 
>> status.
>> Thanks,
>> Mike
>> _______________________________________________
>> Cmdist mailing list
>> Cmdist@ccrma.stanford.edu
>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
> -- 
> M. Edward (Ed) Borasky
> http://www.borasky-research.net/
> http://borasky-research.blogspot.com/
> http://pdxneurosemantics.com
> http://pdx-sales-coach.com
> http://algocompsynth.com