< Back to IRCAM Forum

Could OpenMusic be ported to an open source Common Lisp compiler

I would like to request that OpenMusic be ported to an open source, freely available, cross-platform Common Lisp compiler, such as Steel Bank Common Lisp. I realize that this might present considerable difficulties for the developers of OpenMusic, but my perception is that the trend in Lisp systems is towards open source, that there exist full-featured graphical user interface toolkits for Common Lisp (e.g. Ceramic, cl-cffi-gtk, Qtools), and I wonder if the user base for computer music systems that have proprietary dependencies is shrinking.

My personal motivation for making this request is that I recently created a CFFI-based version of the OMTools interface from OpenMusic to Csound, which works fine, and then I wanted to port all of Common Music 2 (Common Lisp version) and Drew Krause’s algorithmic composition code (which I now host at https://github.com/gogins/csound-extended/tree/develop/nudruz), to work in OpenMusic.

First I created an .asd file for Drew’s code, and then I found that the free version of LispWorks included in the OpenMusic download for Linux does not include a Common Lisp compiler, and so does not support ASDF, so Drew’s code doesn’t run yet in OpenMusic.

A pity.

Regards,
Mike Gogins

Dear Mike, this is a long-lasting issue and as you can imagine everybody would prefer OM to run on an open-source compiler (including Ircam, who has to pay and renew a lincese every year so that we can release a free version of the software to the users).

Here are some elements of answer: first there is no “team” of developers here. Currently I am (not full-time) developing and maintaining OM pretty lunch by myself, and am lucky to be backed by Anders V. in Norway, who takes care of the Linux tweaks and releases. In this context, LispWorks provides us a reliable, reletively-good quality and performance, and multiplatform GUI environment that no other Lisp (commercial or not) is able to provide at the moment.

We have always encouraged motivated developers to join the effort and try to plug OM sources to other source compilers: actually OM source code is pretty much ready for that, and it used to run on both MCL (mac) and AllegroCL (windows) – also both commercial, including GUI libraries etc. – before we shifted to LispWorks a while ago. A couple of attempts to port OM to open-source Lisp compilers (on Linux) were carried out at Ircam (with CMUCL/SBCL and GTK), with no very successful result so far, but hope is still alive!
I know Karim is currently carrying out some work on it and I am sure he will be happy to use a hand! – I’ll let him reply and talk about it.

Jean

Dear Mike,

Yes it is one of the most requested demand from linux users including myself.
As Jean already wrote, there has been some attempts using sbcl, (which by the way is in my opinion the best Lisp compiler), to port OM on LInux.
THe main trouble was and still is, the API of the graphical support in sbcl which is inexistant. There are some projects bindings:

  • CLX which comes in most linux distributin and compatible with sbcl, The trouble with clx (by the way it was my firts choice) it is for X11 and very low level. So one must write a lot of code on top of it.(this is rather short descritption here sorry)

  • LTK was also a good choice BUT, not maintained anymore, and very very low level

  • THen we have GTK bindings. We started using cl-gtk for gtk2. And as you know gtk2 was abandoned to gtk3.So i started porting the old sources (i believe was related to OM 5.x) to the great cl-cffi-gtk http://www.crategus.com/index.php/projekte/ for gtk3 which looks promising enough, but it’s still gtk …
    However this project seems to be re-maintained.

My portage is not even alpha, that is the reason i didn’t put this yet on a git. Another reason is that i have a thesis in progress and hope to finish this year.

But i promise when i get back and clean it up will make it available.

Best
K

Thanks for your responses. I will be tracking this and will be available for testing.

You obviously have investigated the options for desktop user interface toolkits for Common Lisp. There are couple of other options that you may or may not have investigated.

First there are systems such as NW.js or electron, which provide what amounts to a Web browser with a builtin Web server, so that standalone applications can be built using HTML5. For OpenMusic, there would be a C shared library that would include Embeddable Common Lisp, Some glue code would implement the LispWorks user interface toolkit using the JavaScript engine, and would both call into, and be called from, the JavaScript interface of the application. Most of the actual code would be written in C++. For an example of how this works, see https://github.com/gogins/csound-extended/tree/develop/csound.node. Note that the glue code for the Csound API is not very much code!

Second there is WebAssemnbly, which compiles C, C++, Rust, and other languages to run on a simple efficient virtual machine that now is part of all standard Web browsers on all widely used operating systems. Currently, WebAssembly does not permit C or C++ code to directly call the Document Object Model, and it does not natively support garbage collection. I am tracking (a) progress towards the native DOM and (b) progress towards implementing SBCL or ECL in WebAssembly. Csound has at least two WebAssembly builds, check out mine at https://github.com/gogins/csound-extended/tree/develop/WebAssembly, with running examples at https://gogins.github.io/csound-extended/.

Regards,
Mike


Michael Gogins
Irreducibl

Thanx Michael,

A very interesting alternative, And great examples you have (message from another planet versions!)
Yes this would be ideal to have all the gui stuff in html5. But should see if drag and drop, mulsi windows etc…will be possible. If not the best is to redesign it from scratch.

Will talk about it to the experts.

THank you for your feedback

K